posting a log is generally a good idea, but it won’t help us in this case unless there’s something exceptional in there which might give us a hint. Raspbian comes with a lot of extras, including X11 and a full-blown desktop. It also comes with some cron jobs that are detrimental to the SD card and system performance at times (updating metadata, cache, etc).
Presuming that your 1s delay is consistent throughout multiple test runs, it might be handy to display the rules involved. Also, what’s the latency on the fileserver?
Also, don’t take this the wrong way, but you can hardly compare the MQTT performance of an ATmega with a Pi. Not only does the ATmega not have an operating system, but the MQTT implementation is very, very spartan, like most implementations of protocols and services for such things. Your Pi is running all that inside a JVM, together with a lot more. It’s like comparing a wheelbarrow to the TGV…
If you’re interested, the ‘real’ way to look at the cause (or at least effect) of the problem would be to open up JMX on the JVM and take a look at the data, metrics and threads.
You can enable JMX by adding the following parameters to your command line/startup script:
-Djava.rmi.server.hostname=<IP OF BOX HERE>
Do note, however, that JMX itself can incur a performance penalty…