Additional Java arguments


#1

It was brought to my attention I might be running outdated Additional Java arguments on my servers, any recommended settings for Java 8?

I have this now:
-Xmn2G -Xss4M -Xms4G -Xmx4G -XX:+UseLargePages -XX:+AggressiveOpts -XX:+UseFastAccessorMethods -XX:+OptimizeStringConcat -XX:+UseBiasedLocking -Xincgc -XX:MaxGCPauseMillis=10 -XX:SoftRefLRUPolicyMSPerMB=10000 -XX:+CMSParallelRemarkEnabled -XX:ParallelGCThreads=10 -Djava.net.preferIPv4Stack=true

from google I found this; just not sure if the -jar at the end is needed in MineOS ?

-XX:+UseG1GC -XX:+UseConcMarkSweepGC -jar


#2

Here’s a four-page thread about Java arguments.

I recommend you read the thread, instead of just the original posting. Notably, 1, 2, 3 and finally 4 (most important).


#3

well the server wouldn’t start with, “-XX:+UseG1GC -XX:+UseConcMarkSweepGC -jar” so I cut it back to what the guy first told me that was helping with my lag issue, “-XX:+UseG1GC -jar” my question is since he gave me a line for a start.sh file is do I need the “-jar” or does MineOS add that already?


#4

MineOS already handles Xmx, Xms, and -jar filename.jar.

Anything beyond that, I’d realllllllly wonder if it has been tested well enough to know that it is applicable, helpful, non-hurtful to use.

-XX:+UseBiasedLocking

-XX:+UseFastAccessorMethods – are you sure you know what these do–and more importantly, whether they actually would have a real, measurable impact to include them? (for starters, BiasedLocking is already on by default in 1.6, presumably beyond that, again making these arguments questionable to use)


#5

ok Thanks, so best to only run this argument

-XX:+UseG1GC