[Problem] CPU loaded

Discussion in 'Bukkit Help' started by pomo4ka, May 27, 2011.

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

    pomo4ka

    1. Linux (Ubuntu Server).
    2. x64.
    3. Java version:
    Code:
    OpenJDK Runtime Environment (IcedTea6 1.9.7) (6b20-1.9.7-0ubuntu1~10.04.1)
    OpenJDK Client VM (build 19.0-b09, mixed mode, sharing)
    
    4. Craftbukkit #766.
    5. Plugins:
    Code:
    AntiTower, AuthMe, Bandages, BasicCircuits-beta, Bedheal, BlockOnGlass, BorderGuard, CommandBook, Craftbook, FenceStack, iConomy, IPGet, Lightvote, Lottery, LWC, mcMMO, MinecartMania, MyHome, MyWarp, NoCheat, obuJustShutTheHellUp, Permissions, Plugman, PumpkinDiver, RedstoneChips, SaddleBack, SensorLibrary, SoupBowl, StopFlood, Tombstone, Vanilla, WorldEdit, WorldGuard.
    
    6. Errors that I get, I will describe below.
    7. java -Xincgc -Xmx2G -jar craftbukkit.jar nogui

    The problem is that when the server online order of 15-20 people, the server is operating normally. But when the day starts to go increase the players, about 50 people, the server begins to greatly shall assume about the delay of 20-30 seconds. Most recently, I began to notice that the server is switched off completely without any reason, when online was 47 people. The server uses 2GB of RAM.

    I have already don `t know how to deal with this problem, people always complain. Processor on the machine is very powerful (Intel @ Xeon). We have a server cost about 20 servers, including (CS, L2, Wow, CSS, BattleField, COD4, Unreal Tournament, Quake, IL2, and many others), none of them does not load as much CPU as it does Minecraft.

    Please help me solve the problem.
     
  2. Offline

    jamescosten

    Are you running MC 1.6?
     
  3. Offline

    Phaedrus

    No he's not. He's using build 803.

    Have you tried without any plugins?

    It kind of sounds like you're asking for too much from the server. 2 gigs of ram is probably not enough, and the CPU usage is likely due to garbage collection going nuts trying to keep it under 2 gigs.

    Also, are you using MySQL for your databases?
     
  4. Offline

    pomo4ka

    Yes I am for all plug-ins are only possible using MySQL. How can miss memory? The game is not great..

    I understand the whole problem of garbage collection Java. Are there any methods of auto cleaning garbage?

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 16, 2016
  5. Offline

    Phaedrus

  6. Offline

    pomo4ka

    Problems with clearing debris, I decided to help plug http://forums.bukkit.org/threads/me...0-07-disc-usage-minimizer-and-more-740.15827/ but this is still not enough, the server runs a maximum of 3-4 hours. After the server reaches the 2GB of memory (allocated by the server) it just hangs.
    Thanks, but this start a server not help me, in 30 minutes the server was working, the latter in scription was "The soup was eaten", and the server crashed.

    Good people help. :(
     
  7. Offline

    anon

    Put remotetoolkit and make it restart every 3 hours :3
     
    pomo4ka likes this.
  8. Offline

    pomo4ka

    I want to achieve from the server, the best result.
    Make it productive and for the machine, and for players who play on it.

    But while I do not get. What would the server was popular, he has to work 24/7, no lag, and reloaded at 5-6 in the morning when no one no.

    A reboot it every 3 hours, bad idea.
     
  9. Offline

    pomo4ka

    Everything works fine, but when the garbage in the memory reaches 2GB, the server just hangs. Have to constantly reboot.

    Here's the launch:
    java -Xincgc -Xmx1024m -jar craftbukkit.jar nogui
     
  10. Offline

    TnT Retired Staff

    Have you tried to increase the max RAM?

    Code:
    java -Xincgc -Xmx3G -jar craftbukkit.jar nogui
     
  11. Offline

    pomo4ka

    Now I have a server dedicated 2GB of RAM. More 2300MB Java does not pass :(. In total, the machine 4GB. On-line order of 20-40 people, sometimes more.

    Oh, sorry that so many problems. I would like to improve the performance of the north. Thanks to the team bukkit, patience and effort. :'(

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 16, 2016
  12. Offline

    Phaedrus

    it sounds like maybe you have 32 java installed since it can't go past 2.3 gigs of ram?
     
    pomo4ka likes this.
  13. Offline

    pomo4ka

    Thanks, I'll definitely check out, and immediately reported.
     
  14. Offline

    GehennaGirl

    I would say you have been lucky thus far. 33 Plugins is really your issue. I can tell you now that you have never done experimenting with your server. 2GB of ram is poorly underpowered for your 30 plugin set. I don't want to label any specific plugin, i but in that setup, one plugin alone that you are running can eat up 2-4 gigs of RAM by itself, after a restart even. And I tested that plugin and with 4 users it was literally eating 5.5 gigs of Ram (ubuntu eats around 500-750 with MySQL); and when i ran the server on a fresh session without that plugin it used 2.5-2.7gigs of Ram for 25 people.

    Generally speaking your plugin set is going to determine your ceiling on when issues start and stop. And many plug-ins that monitor all your players or blocks - lots of tracking and logging - are going to perform dramatically different in a tiered manner from <10 to 20> to >35, you will very much experience performance differences in persistence of data, and cpu response and overall processor latency.

    30 Plugins +2 gig of ram is not going to cut it. And If you are using a host instead of your own machine, that would explain why the server is switched off since most of those places do not want to host popular servers that can max out their ill-suited machine for the task of Minecraft server hosting.

    Java 32bit will not go past 1.5 gigs of ram. So if you see Java at 2gigs + then you are 64 bit. If unsure, in a terminal window type: java -version
    You should get a return that looks like this but possibly says SUN instead of OPEN (Sun is recommended)


    Code:
    java version "1.6.0_20"
    OpenJDK Runtime Environment (IcedTea6 1.9.7) (6b20-1.9.7-0ubuntu1~10.04.1)
    OpenJDK 64-Bit Server VM (build 19.0-b09, mixed mode)
    
    .
    Good luck. Also, have you tried running with just the basics:
    AuthMe, BorderGuard, CommandBook, Craftbook, FenceStack, iConomy, LWC, mcMMO, MyHome, MyWarp, NoCheat, obuJustShutTheHellUp, Permissions, WorldEdit, WorldGuard.

    I assume those would be your basics. They have been mine when i ran the exact same set up except no AuthMe. Have you tried a basic setup and seen how that ran? And then if it fails, go to just: worldedit/guard, permissions, iconomy, commandbook <--- My extreme basics aka bukkit vanilla setup.

    I do suspect you will notice a huge huge drop in memory use with just 1 of those plugins pulled, until it is better optimized.

    Here is what i use:

    Code:
    java -server -Xmx8192M -XX:+UseConcMarkSweepGC -XX:+UseParNewGC  -XX:+CMSIncrementalPacing -XX:ParallelGCThreads=2 -XX:+AggressiveOpts  -jar craftbukkit.jar nogui
    Good luck.
     
    pomo4ka and Phaedrus like this.
  15. Offline

    pomo4ka

    Thank you very much for your help. I have no choice but to limit the amount of playing to 20 people, and remove a huge number of plug-ins? No other choice?
     
  16. Offline

    Lolmewn Retired Staff

    What helped for me was disabeling TuneUp Utilities tubo mode. Ahh well, since you have deddi, that cant be it.
     
  17. Offline

    GehennaGirl

    Remove mcMMO for 8hrs or so and see the impact.
     
  18. Offline

    pomo4ka

    What does this argument?
    Code:
    -XX: ParallelGCThreads=2
    
     
  19. Offline

    GehennaGirl

    Us this link to seek out the various string arguments used for Java garbage collection:

    http://java.sun.com/docs/hotspot/gc1.4.2/faq.html

    The argument: -XX: ParallelGCThreads=2 does the following:

     
  20. Offline

    pomo4ka

    Thank you very much for your help and clarification of the argument. Another small question. Is it possible to do automatic cleanup debris, without plug-ins?
     
  21. Offline

    GehennaGirl

    I have no answer for that. Nor did i know plug-ins performed such functions.
     
  22. Offline

    pomo4ka

    Clearly, I hope someday it is implemented. Thank you for your help. :)
     
  23. Offline

    GehennaGirl

    Well, let me know what you try today. I am serious about mcMMO. I love that plugin, and Nossr50 is honestly, one of the nicest coders i have ever met on this site. He is very helpful and tries his hardest to do the best he can, as you can see from mcMMO, he learned to code just so he could make that for us and has done a damn good job for a first time coding work ever.

    I just had memory issues with it however, so it had to be removed, and when i did so, I literally saved over 3 gigs of ram. 4 users online using 5.5 gigs with mcmmo, and when i pulled it, i had 25 users online using 4.x gigs or so. And when i pulled precious stones - and later replaced it with a dramatically reduced stone set for players(1 stone), ram use dropped to 2.5 gigs on average for anything between 10-25 users depending on where they are on the world.

    So all it takes is one or two plug-ins to cause you grief for weeks to months or the entire life of your server and you not realize this because you classified them as essential/mandatory and thus never tested your servers performance without their presence.

    I know now that Minecraft servers really should not need more than 8 gigs of ram. 12 Gigs should give you way more than you need so that you can sit at your server and websurf, irc, etc, without anyone in world ever feeling lag associated to it. 16 gigs is really I guess for a cushion that will rarely be hit, and 24+ is just a waste of money, completely, and is really more about the admin loving computer stuff like all us geeks do than Minecraft needing it.

    With my 63 plugin set, and hitting 30-45 users, we never crest over 4 gigs of ram for long, I have seen it it hit 5.1, and then drop back down to as low as 3.7 with that load on the server.

    2-4 gigs of ram is not adequate for a server to run Bukkit and plugins reliably without having issues related to memory leaks caused by bukkit or a plugin. The moment that happens, your server will crash from lack of ram, and if you are really unlucky, depending on your server setup, and plugins (like ramdisk etc) you may actually corrupt and cause chunks to be overwritten. As what happened to me when my 4 gig ram disk ran out of space and the server out of memory with 8 gigs, no optimization, no garbage collection, a few plugins that handled memory poorly, and the sadly dumb tech i had at the time living with me. lol.

    For a comfortable run under a Linux environment, 6-8 gigs of ram will suit all your purposes as long as you don't harbor any poorly performing plugins. Only since updating to 12 gigs of ram, and seeing what the server looked like with 45 people online have I realized that 12 gigs of ram is way more than I will ever need, even if the server load doubled or tripled, and we use 2 NPC plugins - which only increase the load of the server as if the NPCs were players.

    Good luck.
     
  24. Offline

    pomo4ka

    @GehennaGirl
    2 weeks ago we had another car at the server, well, here there was a virtual drive to 512MB and 4GB allocated to the server itself. All plug-ins and Java were the same. Line was 30-40 people, everything worked fine.

    Because of what there reasons from the administration host, we had to move the server to another machine. Now have 2GB of RAM, and 30-40 people playing normally. But recently the server started it off.

    I decided to install a plug-in "Remote Toolkit" thought it would help, in the end it turned out that he also does not help. After that I searched the forum a similar theme, and came across a plug-in "Performance Tweaks", and thought that At last a miracle happened. But no matter how well, after 3-4 hours of the server, he fell again.

    Now I'm trying to make a plug-in myself, who ran to a server on all cores, and not eating so much RAM. And yet, if possible, to make peace in MySQL.
     
  25. Offline

    GehennaGirl

    MySQL will save you ram especially with plugins that do a lot of logging and Flatfile (horrible) accessing.

    RemoteTool kit will most likely simply add to your CPU load. I always notice how it sends 1 out of the 8 cores to max. Performance Tweaks I did not like that well either.

    Honestly 3-4 hrs is about the window for a restart. I have zero crashes, but if i dont restart, the server WILL "Read Timed Out" in a 4-8hr window. So right now it restarts ever 3 or 4hrs. This is mandatory for bukkit and the number of plugins you run - with a busy server. A non-busy server that only gets 1-8 people in a day never has to be restarted because it never uses the resources that busy servers use that eventually lead to "read time out" errors.

    You will not be able to do multi-threaded programming for Minecraft. Minecraft is a not multi-thread aware nor friendly. In fact, playing with threads and bukkit is a sure way to crash your server every time, which was a big deal in Minecraft Server 1.3 with bukkit 300-400 series and plugins that shared threads crashing the server.

    One issue for sure, is RAM. 2GB is not going to server your needs with that plug-in set.
     
  26. Offline

    pomo4ka

    Thank you.
    If I use plug-ins:
    Code:
    AuthMe
    BorderGuard
    CommandBook
    CraftBook
    LightVote
    LWC
    MyHome
    MyWarp
    NoCheat
    Permissions
    WorldEdit
    WorldGuard
    
    Enough for me 2 GB of RAM for 20-30 people daily?
     
  27. Offline

    drdanick

    @GehennaGirl
    You should have reported this. If it is indeed doing that, I consider it a serious issue (although I have most certainly not encountered that on any of my test servers). Especially seeing as it is usually doing little more than reading the stderr stream from the server.
     
  28. Offline

    GehennaGirl

    For sure.

    However, WorldEdit will be the one to do you in if you are not careful. I was about to tell you my ram use with 20-30 users online, just checked java and it is using 6.5 gigs with 16 people on - which is insane. The reason? Wolrd Edit. If you go about your server doing area effects such as /replacenear 100 or regenning chunks to the tune of 600k blocks or so at a time, you will eventually crash. Those World Edits never clear ram. They eventually add up and bring you down if you do not restart. So, what is fine to do at one moment like replacenear 100 grass to netherack, will after an unknown amount of edits (you need to watch your ram) bring you down in a crash. So now, thankfully I looked, i did not think i would chew my way up 5 gigs in ram in 15 or so minutes, time to restart the server. Which was just restarted about 45 minutes ago. Funny how that works.

    Good luck.
     
Thread Status:
Not open for further replies.

Share This Page