server performance arguments/mods

Hello! I have ran a server for the better part of a year now (I say server but what I mean is an old gaming laptop that has good specs but I have no use for) and I have ran my Minecraft server for friends out of it. while performance has been good I've noticed that there are weird stutters when blocks change states (tilling earth, breaking blocks, etc) that I don't see in SP. I've also noticed the server is not using all 4 cores of the CPU and despite having 4 cores I get FPS drops that also done occur in SP. Are there java arguments I can user to get java to use all 4 cores? or maybe some garbage collection things I can add. Maybe even a server side mod to help though I would much prefer adding it myself.

Posted Jul 17, 2020, 12:11 PM UTC

14
Lazz45MultiMC | E2:E•

Try adding in vanillafix (same with phosphor, foamfix, tex fix, and betterfps but some packs include these already). You could free up some resources and get better performance by switching to OpenJ9 for your Java VM instead of the standard Hotspot VM that comes with java. Its lighter, faster, and also open source. I found it from a reddit post I will link below that explains what it is, the benefits, and how to change your launcher to use that VM instead. I switched and haven't gone back. r/feedthebeast/comments/as6p87/java_vms_and_you_how_to_reduce_your_ram_and_cpu/ If you switch, your standard java args wont work, and I did a lot of digging to find out what works for OpenJ9 and found this

-Xmns(this value is 50% of your max assigned ram)M -Xmnx(this value is 80% of your max assigned ram)M -Xgc:concurrentScavenge -Xgc:dnssExpectedTimeRatioMaximum=3 -Xgc:scvNoAdaptiveTenure -Xdisableexplicitgc

If you dont switch use these for hotspot:

-XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:G1NewSizePercent=20 -XX:G1ReservePercent=20 -XX:MaxGCPauseMillis=50 -XX:G1HeapRegionSize=32M

Also if not already, dont run windows, run (if you're willing, if its your personal rig vs. another box its understandable that you wouldnt want to)Linux mint cinnamon if you want a windows like ui with about 40% of the ram usage. Mint runs sub 1GB normally and if you go for the XFCE desktop its even less, this gives you more ram and horsepower for other things.

Note: The Xmn args for OpenJ9 are not in place of the standard ram allocation commands. They are in addition to them. Also ram arguments cant have a space between the operator and the number (like so -Xmns6144M)

FYI: to change your java vm for the server go to start-->environment variables-->path-->and guide it to java.exe for the OJ9 jvm

3
ElkilloOP•

unfortunately i run more then just a MC server with this rig or i would have already gone to linux. as for the VM ill speak to my server peeps as this is new to me and the server will be down for as long as it takes for me to get it right lol. also due note the rig does have 16 gigs or ddr 4 2333 rams so at the moment ram isnt an issue ( i know with larger packs it can be)

2
Lazz45MultiMC | E2:E•

Mostly its trying to reduce the load on thr CPU/keep hear down on the laptop. OJ9 also has a special VM mode for reduced cpu usage for when running in a box, this may help as well

1
ElkilloOP•

I will definitely give that a look.

1