Jump to content

Java Virtual Machine tuning information request.


nacalal

Recommended Posts

Based on recent testing I've done, I was curious if anyone had a greater degree of knowledge with JVM tuning for low latency and execution speed.

Ideally, in depth documentation on JVM arguments would be best, but I seem to be having a hard time finding it.

 

Recently I was poking around with the zomboid launch script when I decided to try added a few parameters to it in a bid to see if I could improve performance.

Since the latest IWBUMS version runs on Java 15 and takes advantage of ZGC, I tried adding the following options:

-XX:+AlwaysPreTouch
-XX:ParallelGCThreads=4
-XX:ConcGCThreads=4

As it turns out, this combined with a higher maximum heap size (-Xmx8g) seemed to drastically improve performance and seriously reduce garbage collection time.

(For reference, I'm running on a Ryzen 1700, 16GB DDR4@3200MHz)

My machine's a bit aged at this point but having a friend try this out on their end, spawning in to raven creek with the suvivors mod, insane spawns and a massive amount of other mods all while zoomed all the way out brought their performance from powerpoint levels to roughly 40FPS.

I'm mostly curious what further improvements could be made with just JVM tuning at this point, I know these settings aren't the defaults because it would not be ideal for most computers to run the game with them, but for the sake of individual system performance I think it would be helpful to know.

Link to comment
Share on other sites

If you really want to tune it, grab visaulgc so you can see what it's doing.

For example, setting the xmx value so high might mean it's just collecting trash instead of clearing it. When it does a more complete collection, it might cause issues given it has 8 threads dedicated to gc on an 8 core processor (3 and 3 would probably be fine for parallel/conc). 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...