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

    imaxorz

    Hello,

    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

    sillyrosster

    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

    sk89q

    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:
    Code:
    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

    md_5

    Googling about 'G1 bad' will lead to plenty results like:
    http://nerds-central.blogspot.com.au/2011/11/comparing-java-7-garbage-collectors.html

    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

    sk89q

    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

    JoneKone

    Code:
    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 -Dcom.sun.management.jmxremote \
    -Dfile.encoding=UTF-8"
    

    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

    imaxorz

    Thanks guys!
     
  8. Offline

    sillyrosster

  9. Offline

    md_5

    In my experience yeah.
     
  10. Offline

    sillyrosster

    Alright, thanks :)
     
  11. Offline

    shaynedtran

    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(PathfinderGoalSelector.java:37)
    2012-07-19 06:02:12 [SEVERE] at net.minecraft.server.EntityLiving.z_(EntityLiving.java:1243)
    2012-07-19 06:02:12 [SEVERE] at net.minecraft.server.EntityLiving.e(EntityLiving.java:1126)
    2012-07-19 06:02:12 [SEVERE] at net.minecraft.server.EntityMonster.e(EntityMonster.java:21)
    2012-07-19 06:02:12 [SEVERE] at net.minecraft.server.EntityLiving.F_(EntityLiving.java:447)
    2012-07-19 06:02:12 [SEVERE] at net.minecraft.server.EntityMonster.F_(EntityMonster.java:25)
    2012-07-19 06:02:12 [SEVERE] at net.minecraft.server.EntityCreeper.F_(EntityCreeper.java:88)
    2012-07-19 06:02:12 [SEVERE] at net.minecraft.server.World.entityJoinedWorld(World.java:1262)
    2012-07-19 06:02:12 [SEVERE] at net.minecraft.server.WorldServer.entityJoinedWorld(WorldServer.java:106)
    2012-07-19 06:02:12 [SEVERE] at net.minecraft.server.World.playerJoinedWorld(World.java:1244)
    2012-07-19 06:02:12 [SEVERE] at net.minecraft.server.World.tickEntities(World.java:1151)
    2012-07-19 06:02:12 [SEVERE] at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:558)
    2012-07-19 06:02:12 [SEVERE] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:459)
    2012-07-19 06:02:12 [SEVERE] at net.minecraft.server.ThreadServerApplication.run(SourceFile:492)
    2012-07-19 06:02:12 [SEVERE] Unexpected exception
    java.lang.NullPointerException
    at net.minecraft.server.PathfinderGoalSelector.a(PathfinderGoalSelector.java:37)
    at net.minecraft.server.EntityLiving.z_(EntityLiving.java:1243)
    at net.minecraft.server.EntityLiving.e(EntityLiving.java:1126)
    at net.minecraft.server.EntityMonster.e(EntityMonster.java:21)
    at net.minecraft.server.EntityLiving.F_(EntityLiving.java:447)
    at net.minecraft.server.EntityMonster.F_(EntityMonster.java:25)
    at net.minecraft.server.EntityCreeper.F_(EntityCreeper.java:88)
    at net.minecraft.server.World.entityJoinedWorld(World.java:1262)
    at net.minecraft.server.WorldServer.entityJoinedWorld(WorldServer.java:106)
    at net.minecraft.server.World.playerJoinedWorld(World.java:1244)
    at net.minecraft.server.World.tickEntities(World.java:1151)
    at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:558)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:459)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:492)
     
  12. Offline

    sillyrosster

  13. Offline

    sillyrosster

    sk89q
    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

    isleepzzz

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

    sillyrosster

    www.newegg.com ;)
     
  16. Offline

    isleepzzz

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

    sillyrosster

    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

    isleepzzz

    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

    sillyrosster

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

    isleepzzz

  21. Offline

    sillyrosster

    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

    macmc

    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

    MrMime22

    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