If those are your arguments, then you really haven't allocated 3 GB of Ram. However, I wouldn't allocate that much to vanilla Minecraft. 1 maybe 1.5 should do the job nicely enough. If you give it too much RAM, the Java garbage collector gets lazy.
The information learned from the object allocation behavior
can be used to enhance the performance of the JVM. Therefore, the heap
is broken up into smaller parts or generations. The heap parts are:
Young Generation, Old or Tenured Generation, and Permanent Generation
The Young Generation is where all new objects are allocated and aged. When the young generation fills up, this causes a minor garbage collection.
Minor collections can be optimized assuming a high object mortality
rate. A young generation full of dead objects is collected very quickly.
Some surviving objects are aged and eventually move to the old
generation.
Stop the World Event - All minor garbage collections
are "Stop the World" events. This means that all application threads are
stopped until the operation completes. Minor garbage collections are always Stop the World events.
The "n" in Xmn is for "new", i.e. New Gen, AKA Young Generation.
If Xmn equals Xmx there is NO OLD GEN. Garbage collection occurs when New Gen fills and it is STOP THE WORLD, AKA a total LAG FEST.
Same thing if Xmn is just way larger than need be. You need it to be small enough that you will not notice every time that the world stops.
There's real documentation out there about what Java parameters do, there's no reason to just guess what they are for.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
i have severe lag spikes on 1.9 1.8 and 1.10 i have 3gbs of ram alllocated to minecraft and two cores.
-Xmx1G -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode -XX:-UseAdaptiveSizePolicy -Xmn1032M
If those are your arguments, then you really haven't allocated 3 GB of Ram. However, I wouldn't allocate that much to vanilla Minecraft. 1 maybe 1.5 should do the job nicely enough. If you give it too much RAM, the Java garbage collector gets lazy.
^^^^^^^^^^ ^^^^^^^^^^^ why you have severe lag spikes.
DON'T DO THIS.
Uncheck the parameter box, go back to the default arguments, and your lag will disappear.
thx man it worked
Out of curiosity, and an urge not to run into this myself, why does this cause lag spikes?
I support this, this, and this. And this now. Also this.
thx everyone
The "n" in Xmn is for "new", i.e. New Gen, AKA Young Generation. If Xmn equals Xmx there is NO OLD GEN. Garbage collection occurs when New Gen fills and it is STOP THE WORLD, AKA a total LAG FEST. Same thing if Xmn is just way larger than need be. You need it to be small enough that you will not notice every time that the world stops.
There's real documentation out there about what Java parameters do, there's no reason to just guess what they are for.