Memory Cycling Issue

Discussion in 'Bukkit Help' started by Grimmy777, Oct 23, 2011.

Thread Status:
Not open for further replies.
  1. Offline

    Grimmy777

    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:
    [​IMG]

    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.
     
  2. Offline

    c0mp

    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.
     
  3. Offline

    Grimmy777

    Ok, I wish there was a way to see how much cpu and memory each plugin is using..
     
  4. Offline

    c0mp

    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.
     
  5. Offline

    Rwembee

    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.
     
  6. Offline

    Grimmy777

    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 -XX:parallelGCThreads=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 -XX:permSize=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!
     
  7. Offline

    TnT

    @Grimmy777, you should read this post.
     
  8. Offline

    Grimmy777

    @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!
     
Thread Status:
Not open for further replies.

Share This Page