I do not know if this is normal for everyone else but I want to post and make sure. I have lagmem installed on my server and track loading closely all the time. I have noticed that my memory cycles greatly. It goes from 342 meg(for example) one second and then jumps up to almost all free the next. It looks like it slowly goes down and then once it is almost all used then it will jump back up to being mostly free again. This happens no matter how much memory I throw at it. here is a pic: Is this normal or is a plugin using too much memory? I think something is at least using too much cpu being that on a 30 man server It keeps going down as low as 7 for cpu lag sometimes. Thanks for any help you can provide.
Granted, I'm not too up to par on EXACTLY how Java works behind-the-scenes, but I believe what you're looking at is the built-in Garbage Collection doing its thing. It will use up memory until it starts to run out, then it will look for stuff loaded into memory that it no longer needs, and dumps it so that it can have more room for new stuff. At least that's my guess. Hopefully someone slightly more educated will be able to provide a more rock-solid answer.
Like so many great things in life, the process is long, arduous, and requires linux, but at least part of your previous statement is possible.
If you want a better baseline, use -Xincgc (as long as you aren't giving it other garbage collection flags). It's the incremental/periodic collector and does it at fixed intervals.
well I managed to get the memory cycling to stop and my memory to be way more stable with this command: "screen -dmS minecraft java -Xmx5250M -XXarallelGCThreads=8 -server -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:+CMSIncrementalPacing -XX:+AggressiveOpts -XX:+CMSParallelRemarkEnabled -XX:+DisableExplicitGC -XX:MaxGCPauseMillis=500 -XX:SurvivorRatio=16 -XX:TargetSurvivorRatio=90 -XX:+UseAdaptiveGCBoundary -XX:-UseGCOverheadLimit -Xnoclassgc -XX:UseSSE=3 -XXermSize=128m -XX:LargePageSizeInBytes=4m -jar craftbukkit-0.0.1-SNAPSHOT.jar nogui" this is on a 7gb server w 4 cores. I just updated to java 1.7 to see if it works any better and so far it is stable and seems to be running better but I just wanted to see if anyone that knows anything about java flags could tell me if those are the best flags for my server. Thank you!
@TnT Do you think if I sent you a list of my plugins, you could tell me which one is most likely causing my high cpu usage? Also what is considered a good cpu usage % in top or htop? is 130% really bad for the main thread? Thanks man!