It has been known for a long time that Minecraft servers are heavily single threaded. I’ve always wondered how much Minecraft Servers benefited from Ryzen CPUs with X3D ever since they came out, but I have never been able to find any definitive answer online.
With a recent upgrade, I now have the means to run real world tests, not on the latest gen 7000 series but on Ryzen 5000 series. I now own both a 5800X and a 5800X3D and I would like to find out for myself. However, I don’t know what way of generating load would be most realistic and I would like to ask for help in this community.
Known things:
I will be running the tests on the 2 CPUs using all the same other hardware, under Ubuntu LTS.
Unknown things:
How do I generate load? What type of load - Chunk Generation, Redstone, Lighting, Entities? What server software - Vanilla, PaperMC, Modded? Any specific things the community would like to see tested?
Ideally I would like the tests to be as repeatable as possible.
Proposed test systems:
CPU - Ryzen 5800X, Ryzen 5800X3D
RAM - DDR4-2666 8GB *4 (i don’t have enough 3200 memory to assemble 2 systems with 32GB each so 2666 is the best I can do)
Motherboard - Gigabyte Aorus or Asus Tuf B550 (Exact variant not sure but will be 2 of the same.)
Cooler - ID-Cooling SE-224-XT
Storage - Nvme SSD (Might be different models but this shouldn’t affect results too much)
GPU - Some random low end cards I have lying around. I will make sure to use 2 same models (Likely going to be AMD HD7450)
These systems will exclusively be hosting the server and I will have a separate machine for the client.
Going to leave the above questions to the community, and I will be able to start testing in about a month.
minecraft performance has always been munted primarily by garbage collection. there is some super goofy java trickery that can be done to try and minimize the impact of garbage collection.
here is the command i use to launch my minecraft server, seems to be pretty good, server performance only takes a hit when new chunks are being generated, but my server stays at 20tps even when there’s an obscene amount of things going on in existing chunks. it should be noted that ive disabled ecc on this system, because ive noticed a huge improvement in minecraft performance without it. just gotta manually down the everything and run memests every now and then. as for why ECC munts java performance, it’d take somebody smarter than myself to answer that.
this is on an sp3r2 system, and im sure my setup isnt completley optimal, but its gotta be close to the best it can be. i know i could significantly reduce the impact of chunk generation if i disabled the world data compression entirely. unfortunately a significant number of my users just dont have the bandwith for uncompressed minecraft, even when trying to crank up the timeout, the TCP transmission just times out before most of my players can download the world. wish there was some way my clients can precache the world based on the seed, and would only need the uncompressed differences. or even save the world to cache based on the last time they rendered whatever chunk theyre visiting.
i run modded 1.12.2, but java is java, so most of this black magic should still apply to whatever the latest garbageversion is.
I remember running a MC server something like 10 years ago now back in alpha and beta and those are a lot of the same options I used. Looks like there are a couple new options available in java now too that would have been useful back then. The latest version of java back then was V6. lol
but yes, back then the biggest performance factors of a server were tuning garbage collection and having enough RAM.
Well if it is of any help, my server keeps crashing when playing with Eureka! for Valkyrien Skies and moving big ships/airships with quite a lot of engines (fast as fuck)
Time to generate a new world (averaged across several ofc, or using the same seed)
Lag when generating or loading new chunks (could try flying in creative or using a tool like chunky)
Redstone machine lag, like flashing redstone or something
Mspt in a normal world
Maybe more but I can’t think of any right now
You can install carpet mod to test these (and I think it has an unofficial forge port too). You could also try these in fabric vs forge and in memory hungry modpacks, or with optimization mods like lithium. The lightning engine is mostly fixed in new versions and doesn’t have a huge effect on mspt.
Also, this isn’t server side, but I’d be interested in seeing some general client side tests with fps and especially fps lows, and with the mod distant horizons.
I will be doing all tests using a 1.20.4 paper server, as it is the most popular server software. I am choosing 1.20.4 because many tools haven’t caught up to newer versions as they require Java 21.
Tests Planned:
World generation test. I will use a plugin to pre generate a 10000 block radius around world spawn and measure the time taken in a normal world.
Redstone test. I will build a redstone lag machine and measure the mspt of it in a superflat world.
Entities test. I will build a guardian farm and measure the mspt of the farm.
I am not testing modded because I don’t really know what to test. If there are any other suggestions on what I could test, I am willing to accept worlds and/or server files if they are provided with test information.
Web Map Rendering Test:
I will use the map from test 1 and render a web map using default settings in Bluemap standalone version, measuring how long it takes to complete the render.
Changes for the tests run:
I realized that using 10000x10000 for the area in the tests will very quickly blow out storage space. Therefore I am reducing the world size in the world generation test and the web map rendering test to 2000x2000.
For the web map rendering test, I will be using the world files from the first world generation test run, instead of using a new one every time. This is mainly to save trouble but it should also in theory generate more consistent results (?)
For the redstone test, I am using this machine, but cut down to a single layer, as it is already enough to overload the server.
The first round of results are in:
5800X3D with SMT enabled.
World Generation Test:
Using the plugin Chunky to generate a 2000x2000 area around spawn. This test uses about 4 cores when observing CPU usage with htop.
Start at log line “Task started in world for the square region centered at 0, 0 with radius 2000” and end at log line “Task finished for world. …”
Start: 18:45:36 UTC, End: 18:53:21 UTC Time taken: 7m45s
Entities Test:
I will use an account to AFK at the designated AFK spot of the farm in the overworld, and another account at the collection system in the Nether.
Data will be collected using the built-in /mspt command after the farm has started for a few minutes. 1 minute mspt values: min: 4.2, avg: 7.6, max:18
Redstone Test:
I will start the lag machine and wait for a few minutes, then collect the data using the built-in /mspt command. 1 minute mspt values: min: 0.4, avg: 86.8, max: 179.7
Web Map Rendering Test:
Using BlueMap CLI to render the map from the World Generation Test. This test is configured to use all available CPU cores.
Times calculated using start at log line “Start updating 1 maps…” and end at “Your maps are now all up-to-date!”
Start: 19:23:51 UTC, End: 19:27:15 UTC Time taken: 3m24s
Minor nitpick, but if it’s “radius 2000”, then the area is more like 4000x4000.
I wanted to make a smartass comment about being off by π, but it says “square region” right there so ¯\_(ツ)_/¯