Solved General WorldEdit and RAM question

Discussion in 'Bukkit Help' started by imaxorz, Jul 18, 2012.

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



    On my server we have a quite a bit of players that have access to WorldEdit and it seems that it makes it crash. The server has 7000MB of RAM dedicated to it and is set to restart every 4 hours (used to be 6) The cpu is a i7 990x and it averages about 20-30 players online at peak times.

    Basically what happens is it will kick everyone off like it crashed, but it doesn't actually crash. It kind of just sits there doing nothing for 30 seconds then comes back and everyone can log back in. There is nothing in the console at all. This happens about ever 2-3 hours almost spot on and has been going on for weeks.

    I took away WorldEdit permissions away from everyone last night to see how it goes. Since then it has stayed up with no issues like before at all.

    My question is how much does WorldEdit effect RAM usage? Does it use memory a lot faster when players are using WorldEdit? (more number of players using it vs how much is used since I have the block limit set pretty low)

    My thought is that the server runs of out ram and then "pauses to reclaim some?" Could throwing more ram at the server help it, or is it not really a good solution?

    Any help or suggestions are appreciated. Th
  2. Offline


    Mine does the same thing, but I have a much more people on that are already using a ton of resources. I have 10Gb allocated out of the server in my sig.. My server has lately been crashing, especially the past few days. I limit my 3rd tier donators to 10k blocks at a time and I'm starting to think that's too much. I get player peaks of 80-100 and an average of 50 on at a time. I would like other opinions. Anyone else give a lot of WE to donors :p
  3. Offline


    WorldEdit uses a lot of RAM for speed and versatility, and because no one has really touched that code in 2 years. Now, if you have enough RAM (I give about 1-2 GB for WE so I can do 1-2 million block changes), it should be able to handle your changes without trouble.

    However, since Java uses a garbage collector, when that history gets expired, Java has to, as you guessed correctly, pause to reclaim that memory. Throwing more RAM at the problem won't really fix it, but if you have a free CPU core or processor, you should adjust Java's garbage collector to be parallel (and run in a separate thread) so that your main server's thread rarely has to deal with significant garbage collection. That should do away with the pauses, and possibly make your server run better overall regardless of WorldEdit.

    If you use Java 6, you can start CraftBukkit with these flags to switch on the Concurrent Mark & Sweep garbage collector:
    java -server -Xms???G -Xmx???G -XX:+UseConcMarkSweepGC -XX:+UseAdaptiveGCBoundary -XX:+CMSIncrementalPacing -XX:ParallelGCThreads=?? -XX:+AggressiveOpts -XX:MaxGCPauseMillis=10 -XX:-UseGCOverheadLimit -XX:SurvivorRatio=16 -XX:UseSSE=3 -cp craftbukkit-skcraft-combined.jar org.bukkit.craftbukkit.Main
    There's plenty of documentation that you can lookup to explain each flag, but, I'd like to point out ParalellGCThreads, as that configures the number of extra cores your JVM will use for garbage collection. 1-2 should work, but anything above than that has highly diminishing returns. Some of other listed flags do not directly relate to the number of GC threads, but they may help you anyway.

    If you are using Java 7, it has a new garbage collector algorithm that you can try too. It is multi-threaded, however, last I checked you cannot configure the number of threads that it uses. Whether you use the older Concurrent Mark & Sweep garbage collector or Java 7's new G1 garbage collector is up to you, as both will likely help either way. There are also other garbage collectors that you can try, as available in OpenJDK or Oracle's JRE.
    afistofirony and imaxorz like this.
  4. Offline


    Googling about 'G1 bad' will lead to plenty results like:

    tl;dr G1 seems to die under extreme circumstances.
    CMS with Parallel threads seems to be the best under huge load from my experience.
  5. Offline


    I will have to admit myself that G1 completely killed everything for my server (system loads -> above 80) a few times and everything was smooth sailing since I went back to ConcMarkSweep.
  6. Offline


    JAVA_PARAMETERS="-server -Xms5G -Xmx5G -Xincgc \
    -XX:ParallelGCThreads=2 -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:UseSSE=3\
    -XX:+CMSIncrementalPacing -XX:+AggressiveOpts -XX:+CMSParallelRemarkEnabled \
    -XX:+DisableExplicitGC -XX:MaxGCPauseMillis=500 -XX:SurvivorRatio=16 -XX:TargetSurvivorRatio=90 \
    -XX:+UseAdaptiveGCBoundary -XX:-UseGCOverheadLimit -Xnoclassgc \

    This is what I have on my modded server.. Just added UseSSE=3 when I saw it on your prams...

    - Edit Fing smilies! -
  7. Offline


    Thanks guys!
  8. Offline


  9. Offline


    In my experience yeah.
  10. Offline


    Alright, thanks :)
  11. Offline


    i hae this error wich crash my server after i remove world guard it was fine

    [SEVERE] java.lang.NullPointerException
    2012-07-19 06:02:12 [SEVERE] at net.minecraft.server.PathfinderGoalSelector.a(
    2012-07-19 06:02:12 [SEVERE] at net.minecraft.server.EntityLiving.z_(
    2012-07-19 06:02:12 [SEVERE] at net.minecraft.server.EntityLiving.e(
    2012-07-19 06:02:12 [SEVERE] at net.minecraft.server.EntityMonster.e(
    2012-07-19 06:02:12 [SEVERE] at net.minecraft.server.EntityLiving.F_(
    2012-07-19 06:02:12 [SEVERE] at net.minecraft.server.EntityMonster.F_(
    2012-07-19 06:02:12 [SEVERE] at net.minecraft.server.EntityCreeper.F_(
    2012-07-19 06:02:12 [SEVERE] at net.minecraft.server.World.entityJoinedWorld(
    2012-07-19 06:02:12 [SEVERE] at net.minecraft.server.WorldServer.entityJoinedWorld(
    2012-07-19 06:02:12 [SEVERE] at net.minecraft.server.World.playerJoinedWorld(
    2012-07-19 06:02:12 [SEVERE] at net.minecraft.server.World.tickEntities(
    2012-07-19 06:02:12 [SEVERE] at net.minecraft.server.MinecraftServer.w(
    2012-07-19 06:02:12 [SEVERE] at
    2012-07-19 06:02:12 [SEVERE] at
    2012-07-19 06:02:12 [SEVERE] Unexpected exception
    at net.minecraft.server.PathfinderGoalSelector.a(
    at net.minecraft.server.EntityLiving.z_(
    at net.minecraft.server.EntityLiving.e(
    at net.minecraft.server.EntityMonster.e(
    at net.minecraft.server.EntityLiving.F_(
    at net.minecraft.server.EntityMonster.F_(
    at net.minecraft.server.EntityCreeper.F_(
    at net.minecraft.server.World.entityJoinedWorld(
    at net.minecraft.server.WorldServer.entityJoinedWorld(
    at net.minecraft.server.World.playerJoinedWorld(
    at net.minecraft.server.World.tickEntities(
    at net.minecraft.server.MinecraftServer.w(
  12. Offline


  13. Offline


    How do you give RAM to WE? I'll be getting 32GB and I want to give a good amount to it.
    Also, what WE build do you recommend using? Are the newer ones safe?

    Edit: I have the server in my sig. and I can't do more than 200k blocks without the server lagging.
  14. Offline


    hey where do u buy RAM at? I want somewere that sells it REALLLY cheap plz:) im poor:p
  15. Offline

    sillyrosster ;)
  16. Offline


    wuttt?? Newegg's 8GM of ram is like 50 dollars :/ there isnt anyone cheaper?
  17. Offline


    You should first see what type of ram you need, then find that type on Newegg. Newegg is very cheap. I've gotten 4x2 GB of ram for $30. That's cheap imo.
  18. Offline


    Yeeah 30 dollars is pretty cheap. Can i know what RAM i need without opening my computer up and looking? Is there like a :

    Computer -> Properties
    and i can see what type of ram i have?
  19. Offline


    Google Speccy, download it, then run it and find the RAM tab. It'll be in there ;)
  20. Offline


  21. Offline


    DDR3 is the type, sure, but you need to find the model name, I think. You can't just buy any DDR3 RAM and expect it to work.
  22. Offline


    Do these parameters truly help optimizing the server load? I just added the Xincgc option, I hope it'll help, 'cause my server gets a lot of crashes, and is getting pretty big so I'd like to fix it...
  23. Offline


    Where would I add this if i wanted to use it on my linex server? Is this the start up script?
Thread Status:
Not open for further replies.

Share This Page