PaperMC + DynMap on Raspberry Pi 4 8GB
After discussion with some of the community over at r/AdminCraft, I decided to take a stab at switching my FabricMC server over to PaperMC and run the DynMap plugin. It ended up being a fairly easy switch. It should be noted that I loaded in a world that I’ve been playing since 1.14, so new chunk generation was at a minimum.
Run Flags
I’m using the standard aikars flags, setting Xms
and Xmx
to 6G
, which is just under the 8G
capacity for the Raspberry Pi 4 8GB. This leaves some room for the OS and any other miscellaneous services I have running.
/usr/bin/java -Xms6G -Xmx6G -XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200 -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -XX:+AlwaysPreTouch -XX:G1NewSizePercent=30 -XX:G1MaxNewSizePercent=40 -XX:G1HeapRegionSize=8M -XX:G1ReservePercent=20 -XX:G1HeapWastePercent=5 -XX:G1MixedGCCountTarget=4 -XX:InitiatingHeapOccupancyPercent=15 -XX:G1MixedGCLiveThresholdPercent=90 -XX:G1RSetUpdatingPauseTimePercent=5 -XX:SurvivorRatio=32 -XX:+PerfDisableSharedMem -XX:MaxTenuringThreshold=1 -Dusing.aikars.flags=https://mcflags.emc.gs -Daikars.new.flags=true -jar server.jar nogui
DynMap Rendering
I was able to do a full render, while having two simultaneous players move around the world, with very few complaints from the server except for the start:
Jul 09 20:30:42 ubuntu java[123761]: [20:30:42 WARN]: Can't keep up! Is the server overloaded? Running 48595ms or 971 ticks behind
Jul 09 20:31:26 ubuntu java[123761]: [20:31:26 WARN]: Can't keep up! Is the server overloaded? Running 14277ms or 285 ticks behind
During the full render, I was getting statistics around these (this many tiles rendered is at ~1 hour of full rendering):
Full render of map ‘flat’ of ‘world’ in progress - 18900
tiles rendered (332.65 msec/tile, 293.30 msec per render)
After majority (if not all) of the map had had rendered, I switched to using /dynmap radiusrender
.
Check out the current render of dynmap on my server: mcmap.mdunn.io
Timings Report
Using the /timings report
command, I was able to generate the following report after doing some nether fortress raiding with two concurrent players:
https://timings.aikar.co/?id=c7c579402a264a7da95e06b36633a3c6
The largest percentage of time is spent on tickEntities
. This isn’t surprising given how many villagers I have (plus animals). If I were to look into any optimization via plugins or otherwise, that would be my place to start.
Conclusion
Overall, I’d say that running PaperMC on a 8GB RasperryPi 4 is very suitable for a few players with little to no lag. I’m looking to see if I can get more players so I can do some more rigorous benchmarking!