Bukkit, advanced memory problem?

Discussion in 'Bukkit Help' started by Erlend Ellingsen, Jan 25, 2011.

Thread Status:
Not open for further replies.
  1. Well, hello there Bukkit :)

    I have a kind-of-advanced problem with my vps. It uses a technology my hoster calls "Sharing Memory" which loans out the free RAM i have on the server to ther servers if i dont use it.

    But once the server needs the Memory, it will return it back to my server.

    My server loans out ca 6 gigabyte RAM ( i have 8 GB total ).

    -

    Im running bukkit, but the same thing happend with vanilla.

    Once i start up both servers (i run two) they seem to be working fine, they are startup by the following batchfile:

    Code:
    @echo off
    java -Xms1024M -Xmx1024M -jar bukkit.jar nogui
    pause 
    But then suddenly, after half'n'hour the following appears, and then the server starts to lag enourmously for everyone online, and then one of the mc server crashes, because it had used too much RAM.

    [​IMG]
     
  2. Offline

    TnT

    Try it with 2048 instead of 1024.
     
  3. Offline

    Hubbe King

    Remove the -xms1024m tag.
    Replace it with -Xincgc
    Reduces memory leaks by ~ a lot.
    And yeah, try setting -Xmx2048M
     
  4. @echo off
    java -Xincgc -Xmx2048M -jar bukkit.jar nogui
    pause

    will that be correct?
     
  5. Offline

    TnT

    The -Xms flag sets the initial java heap size. The -Xmx flag sets the maximum java heap size. The -Xincgc flag enables incremental garbage collection. I do not think you need to remove the -Xms flag (however, I'm no java expert. Some sysadmin with lots of java experience may say otherwise).

    Using his flag, I'd try to do this if I were you (i'm going to try this later myself):

    java -Xincgc -Xms1024M -Xmx2048M -jar bukkit.jar nogui
    or
    java -Xincgc -Xms2048M -Xmx2048M -jar bukkit.jar nogui

    Also, another thing you can try (only if you have x64 OS and x64 java) is:

    java -d64 -Xincgc -Xms1024M -Xmx2048M -jar bukkit.jar nogui

    The -d64 flag tries to run native 64 bit binaries if possible.
     
  6. Ok, the system have been running perfectly with

    Code:
    @echo off
    java -Xincgc -Xmx2048M -jar bukkit.jar nogui
    pause
    for two hours now, but ill check it out.

    Thanks for answers :)
     
  7. Offline

    Hubbe King

    The -xms flag is quite unnecessary if you use -Xincgc, as Xincgc states that the minimum heap size is the amount of RAM that the .jar needs to load properly. (RAM is allocated as it is needed)

    And since it runs with -Xmx2048M, you are obviously using 64-bit JVM.

    Which is all good. Hope I helped! ;D
     
  8. Offline

    TnT

    I have been educated, and thus I am thankful. I have been looking for someone who actually knows what each java argument does and not someone who just spews out what commands to run without knowing why they run them. Now I must update my guides to reflect this new knowledge. Thank you.
     
Thread Status:
Not open for further replies.

Share This Page