Hey I've been having quite a bit of trouble lately with Ram usage, which seems to be out of control and constantly overloaded, and it's driving me crazy because it's been causing lag and I've even had a crash the other day... I have 8Gb of Ram on the server. When I launch it, it seems to stabilize at 20% of Ram usage, and after a few hours (so far 3 and a half), I'm at 55%, with only 15 players online left (night time over here ). I used to have MinecartMania and MinecartManiaSignCommands installed, but they were eating up a lot of ressources, I'd be at 110% CPU and 90% of total Ram in just a few minutes after a reboot. So I've had to disable them, but I'm still getting quite high Ram usage, which I don't think is normal... It depends, the other day we were over 60 online, and no lag at all, everything was working flawlessly. Sometimes when someone uses the subway system using the automated minecarts, it causes big lag, and even freezes which leads to everyone getting disconnected. That's why I started looking at MinecartMania. After disabling it, things are now *almost* normal. I'm running CB #1000 using this command : Code: screen -dmS minecraft java -d64 -native -server -Xincgc -Xmx7G -Xms2048M -Xmn512M -XX:NewRatio=3 -XX:+UseThreadPriorities -XX:CMSFullGCsBeforeCompaction=1 -XX:SoftRefLRUPolicyMSPerMB=2048 -XX:+CMSParallelRemarkEnabled -XX:+UseParNewGC -XX:+UseAdaptiveSizePolicy -XX:+DisableExplicitGC -Xnoclassgc -oss4M -ss4M -XX:+UseFastAccessorMethods -XX:CMSInitiatingOccupancyFraction=90 -XX:+UseConcMarkSweepGC -XX:UseSSE=4 -XX:+UseCMSCompactAtFullCollection -XX:ParallelGCThreads=4 -XX:+AggressiveOpts -cp "craftbukkit.jar" -jar "craftbukkit.jar" I'm running these plugins : CommandBook CommandHelper BigBrother DailyBonus FoundDiamonds iChat iConomy Lockette MagicCarpet MapMarkers McDocs MineMail Multiverse-Core (2.0 dev version) OpenInv PanelMaster Permissions PlayerCount ProperTime Ore_Obfuscation SignColours Warpz0r WordReplace WorldBorder WorldEdit WorldGuard Has anyone got any idea on how I could improve performance and waste less RAM ? Thanks a lot !
Gentoo secret #1 probably applies here: More flags does not always make it faster. Try -server and -Xmx7168M
Wow, that actually worked ! I really thougt all those settings were supposed to "optimize" Java After one hour with 20 people online, I'm at 16% Ram usage, running this : Code: screen -dmS minecraft java -server -Xmx7168M -Xincgc -jar craftbukkit.jar I'll keep checking Ram usage to see how it goes, but so far so good, thanks a lot ! Edit : It's been two hours since the last reboot, and I'm only at 19% ! Edit2 : 3 hours, 18.2%, this is brilliant !
Glad it works It's the lure of speed increases many fall into. There are indeed uses for all of the flags, and many may be beneficial for you. But some have tradeoffs, or turn off other things, or don't do what they sound like. Here's the overly long one I use and probably don't need: "-XXarallelGCThreads=2 -XX:+UseParNewGC -server -XX:UseSSE=3 -XX:+UseLargePages -Xmx3072M -Xms3072M" the large pages has been causing me hell with windows7 UAC though.
If you think thats long check out mine lol (Don't use unless you understand it) Code: -XX:PermSize=128m -XX:MaxPermSize=256m -XX:+DisableExplicitGC -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:+CMSParallelRemarkEnabled -XX:ParallelGCThreads=3 -XX:MaxGCPauseMillis=40 -XX:+UseAdaptiveGCBoundary -XX:-UseGCOverheadLimit -XX:+UseBiasedLocking -XX:SurvivorRatio=8 -XX:TargetSurvivorRatio=90 -XX:MaxTenuringThreshold=15 -Xnoclassgc -XX:UseSSE=3 -XX:+UseLargePages -XX:+UseFastAccessorMethods -XX:+UseStringCache -XX:+UseCompressedStrings -XX:+OptimizeStringConcat -XX:+AggressiveOpts