Thread: Minecraft
View Single Post
Old 3rd October 2011, 16:08     #2461
^BITES^
 
Quote:
Originally Posted by Cowboy
Java config?

I'm not sure, I wasn't involved with the setup. What should I be looking at?
(firstly before providing advice ... I advise I am not a java guru ... I figured most of this out via the java docs....and some minecraft forum jazz...).
Yeah theres a number of things you can do to java to make it run more optimal for large load/high through put etc etc...

My server runs heaps of other shit besides Minecraft but minecraft is the most "resource critical" eg ... if its running like ass .. users notice .. .people using the http/file sharing components? ... Don't notice or care so I setup mine around that.

That being said this has been the best config/setup I've found so far for my server:
screen -t "MinecraftServer" -S "MinecraftServer" bash -c 'ionice -c1 -n1 nice -n -2 /usr/bin/java -server -verbose:gc -Xms1024M -Xmx1024M -XX:PermSize=256m -XX:SurvivorRatio=10 -XX:TargetSurvivorRatio=90 -XX:UseSSE=3 -XX:+UseParallelGC -XX:ParallelGCThreads=4 -XX:+UseParallelOldGC -XX:+UseBiasedLocking -XX:+AggressiveOpts -jar craftbukkit.jar nogui ; exit'

Brief explanation of my understanding...
I use screen to run the shell in ... if shell = quit then the screen session dies ... etc etc (can also use this to create auto reload scripts if req).
ionice -c1 -n1 nice -n -2 = Modifying the nice levels of Minecraft to have higher than normal process priority etc etc..

-XX:PermSize=256m = burst over ram allocation
-XX:SurvivorRatio=10 -XX:TargetSurvivorRatio=90 = Ram/memory recovery (and how fierce it is)
-XX:UseSSE=3 = Use SSE3/AMD accel (not always needed afaik)
-XX:+UseParallelGC -XX:ParallelGCThreads=4 = Mutli threaded garbage collection (ram recovery/old chunks etc)
-XX:+UseParallelOldGC = Use old Garbage collector, this lowered the number of "pauses" the server experienced.
-XX:+UseBiasedLocking = I cant remember .. but this one was recommended.....
-XX:+AggressiveOpts = Turn on fancy/new/optimal features.

Again I'm no pro .. but I bashed the shit out of this config this weekend and found that it worked best on these for my box .... ymmv...
__________________
, ______
/l ,[____],
l---⌐¬-0lllllll0-

()_) ()_)--o-)_)

Last edited by ^BITES^ : 3rd October 2011 at 16:09.
  Reply With Quote