Problem Massive server lag issues with new packs.

ch_breezy

New Member
Jul 29, 2019
2
0
0
Ok now it said "unrecognized VM option 'CMSparallelremarkenabled' could not create virtual machine."
 

glasspelican

New Member
Jul 29, 2019
187
0
0
if your having trouble please post the error message, your system specks (ram cpu operating system), the command line your using
then open a terminal or command prompt and run
Code:
java -version
 

CrazylikE

New Member
Jul 29, 2019
55
0
0
Code:
Unrecognized VM option 'CMSParallelRemarkEnabled'
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

Btw, I tried to remove the CMSParallelRemarkEnabled option, but then it just gave me a new error. I had to remove 3 or 4 of them for the server to start. Probably better than it was before anyway, so thanks :p
 

rationalOgre

New Member
Jul 29, 2019
4
0
0
Code:
Unrecognized VM option 'CMSParallelRemarkEnabled'
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

Btw, I tried to remove the CMSParallelRemarkEnabled option, but then it just gave me a new error. I had to remove 3 or 4 of them for the server to start. Probably better than it was before anyway, so thanks :p
I realize this is kind of thread necromancy but for those coming in via a search later on this is somewhat important. The issue was that you needed a + before CMSParallelRemarkEnabled like this:
Code:
 -XX:+CMSPArallelRemarkEnabled
The script someone posted above accidentally left out several + symbols. The corrected line follows.

Code:
java -server -Xincgc -Xmx6G -Xms2G -Xmn1G -XX:NewRatio=2 -XX:CMSFullGCsBeforeCompaction=1 -XX:SoftRefLRUPolicyMSPerMB=2048 -XX:+CMSParallelRemarkEnabled -XX:+UseParNewGC -XX:+DisableExplicitGC -Xnoclassgc -XX:+UseFastAccessorMethods -XX:CMSInitiatingOccupancyFraction=90 -XX:+UseConcMarkSweepGC -XX:UseSSE=3 -XX:+UseCMSCompactAtFullCollection -XX:ParallelGCThreads=2 -XX:+AggressiveOpts -XX:+UseLargePages -XX:ReservedCodeCacheSize=1G -cp direwolf20.jar -jar direwolf20.jar
pause

Hope that helps people in the future.
 
  • Like
Reactions: glasspelican

sinner4

New Member
Jul 29, 2019
2
0
0
We've recently been getting this same lag on our new DW20 server. We've tried your fix script above but we don't have that same amount of memory available.
So we changed the values somewhat but still get an "out of memory" error (which is what we got when we copy-pasted).
We are running on a dedicated server with 1.5G available for Minecraft. We have played with the numbers above and made Xmx1228M and Xms1024 and Xmn756M but it still doesn't work.

Now from what I remember about Java from college...the Xms is the max-heap and the Xmx is the max size that the heap can grow to. but the one part of the script that we don't think is correct for us is the SoftRefLRUPolicyMSPerMB-2048...what I have read is that: SoftRefLRUPolicyMSPerMB= (.9*xms)....is this right?

Basically, to make it easy for us...could someone post a correct .bat script for me taking into account that our max memory is only 1.5G?
It would help us out immensely.
 

rationalOgre

New Member
Jul 29, 2019
4
0
0
Without knowing more about your specific setup it's tricky to tweak much. SoftRefLRUPolicyMSPerMB is a timing thing, not a size thing. What it does is tells the Garbage Collector how long to wait before attempting to collect a softly referenced object. 2048 is a bit over 2 seconds per MB of Free Memory. What this means is that if you have 50mb of free heap space it will not try to purge SoftRef objects for ~100 seconds. As your heap size shrinks, the amount of time it waits before attempting to purge SoftRef objects shrinks.

I would more be looking at the max amount of ram you can allocate. For that you need to know what the typical load of all other programs are on your instance. Realize that Xmx sets the max "heap" size, but java can still consume more memory than that. SO if you only have 1.5G to allocate to the minecraft server you may need to make your max heap size 1G, max start size (xms) to 768m and leave off the Xmn (though keep the NewRatio setting even though it's the default).

The part I think that is throwing you off is the ReservedCodeCacheSize. 1G is a HUGE code cache only intended for big beefy servers. I would change that to 256m for your server and see how it does. (EDIT: Further research has lead me to understand that even 256m is a "large" amount. You could probably reduce it to 96m and have no issues. I need to test it to be sure but I will once the players get off my server so I can reboot.)

With those changes it would look like thus:
Code:
java -server -Xincgc -Xmx1G -Xms768m -XX:NewRatio=2 -XX:CMSFullGCsBeforeCompaction=1 -XX:SoftRefLRUPolicyMSPerMB=2048 -XX:+CMSParallelRemarkEnabled -XX:+UseParNewGC -XX:+DisableExplicitGC -Xnoclassgc -XX:+UseFastAccessorMethods -XX:CMSInitiatingOccupancyFraction=90 -XX:+UseConcMarkSweepGC -XX:UseSSE=3 -XX:+UseCMSCompactAtFullCollection -XX:ParallelGCThreads=2 -XX:+AggressiveOpts -XX:+UseLargePages -XX:ReservedCodeCacheSize=96m -XX:+UseCompressedOops -cp direwolf20.jar -jar direwolf20.jar

Also, if this machine is not at least a dual core machine you will need to adjust the number of threads for the parallel garbage collector.

EDIT: Added another tweak that I've been testing out myself. Seems to be working nicely.
 
  • Like
Reactions: bliss

sinner4

New Member
Jul 29, 2019
2
0
0
Perfect answer! Thank you...we will be trying this out today. Sorry if my post was unclear in anyway, I'm actually trying to relay the issue through another party as I am not the one doing the tweaks to the server. if this doesn't help, i'll post all the server specifics.
Thanks again!
 

Globbits

New Member
Jul 29, 2019
1
0
0
try launching the server with this
Code:
java -server -Xincgc -Xmx6G -Xms2G -Xmn1G -XX:NewRatio=2
-XX:CMSFullGCsBeforeCompaction=1 -XX:SoftRefLRUPolicyMSPerMB=2048
-XX:+CMSParallelRemarkEnabled -XX:+UseParNewGC -XX:+DisableExplicitGC -Xnoclassgc
-XX:+UseFastAccessorMethods -XX:CMSInitiatingOccupancyFraction=90
-XX:+UseConcMarkSweepGC -XX:UseSSE=3 -XX:+UseCMSCompactAtFullCollection
-XX:ParallelGCThreads=2 -XX:+AggressiveOpts
-XX:+UseLargePages -XX:ReservedCodeCacheSize=1G
-cp server_name_here.jar -jar server_name_here.jar

it may take several minutes to see any change ~5 depending on the computer, mods what you are doing etc

Man...this information was epic. We had major issues, sheep jumping around like an enderman, teleporting from a to b, and we couldn't think of anything else other than the methods we tried to get this problem sorted. We tried so many different things to get our Ultimate pack running smoothly and achieved nothing. I tried this (had no idea what it really does if I'm completely honest) and everything is so damn smooth.

Thank you very much, this has made me and my gang a very happy bunch :D
 

Louietheflyisme

New Member
Jul 29, 2019
3
0
0
I'm Running a singleplayer world on Yogcraft and getting the same issues. It's not as bad as what everyone else is saying, but it's pretty bad. I'm not too good with java, but if anyone could help me that would be great.
Thanks