High CPU Usage

Discussion in 'Bukkit Help' started by ManBearWaffle, Mar 12, 2011.

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

    anon

    same happens for me.
    I indeed have a very big area filled with mob spawners, a "warzone", it has something like 15 - 20 mobspawners. Is that the problem?

    Look at my htop data
    [​IMG]

    Sorry for the screenshot, but the dam putty+byobu keeps reseting my selction :(
     
  2. Offline

    Valdiralita

    i just downgraded from 531 to 493 and the cpu load decreases by 30% and the ram load by 1GB
    -3 world loaded
    -12 players
     
  3. Offline

    EvilSeph

    There's a new Recommended Build 556 but I doubt it will help anything.

    Still waiting on a world I can grab (needs to be wgettable) to try and reproduce these issues.
     
  4. Offline

    Spazmic

    I confirm this. My server has been able to handle 30 players without lag with build 493, and I had to disable the mobs with build 522 because we were having lag (extreme chat lag too). Disabling mobs completly solved the problem. Sorry but I can't be more specific, since I am only using recommended builds :S

    Lag due to CPU usage*
     
  5. Offline

    ManBearWaffle

    My friend made me a plugin that limited mob spawning, and even though their popluation was cut by more than 50%, CPU usage didn't improve. The only way to fix it for now is to shut mobs off completely.
     
  6. Offline

    Xin_TiGeR

    i noticed with the /gc command that before i had always around 1700mb free from the 2056mb and know it shows all the time i have only around 300mb free...

    does the new recommended build(#556) fix this?
     
  7. Offline

    MrPendulum

    I have not tried the Recommended Build yet but I have just pm'ed you a link to a backup of my entire minecraft server, including the world, plugins and configs.

    I have tested plugin isolation with this server, and still experienced sparodic high CPU usage. I have also ran it on a range of hardware, ranging from 600MHZ single core to 3GHz dual core CPU's, 512MB-4GB of RAM, SSD to SATA2 drives, Windows 77 64 bit and Ubuntu Server 10.10, and experienced it on all tested environments.

    I haven't ruled out the resulting lag being the fault of my router yet, but as others are experiencing similar issues I am doubtful on this. I hope this provides some help to you, EvilSeph.
     
  8. Offline

    EvilSeph

    Probably due to the fact you don't turn off spawning, rather kill mobs as they spawn.

    Thanks, I'll check this out when I have time!
     
  9. Offline

    stolen_insanity

    I've turbed mobs off and my CPU lowered to 12%
    but as people joined the server it rose to 100% again.
    Also, when they left the server, the CPU did not drop back down by much, only back down to about 70%
     
  10. Offline

    GhostToast

    thanks for this thread. i was having a hell of a time trying plugin isolation - kept second-guessing my setup, even second-guessing my hosting/provider. now that i think about it, my problems definitely occured after moving from build 493 last friday. even stripping down to only essential plugins (worldguard, etc), i still experienced intense, unexplainable lag within 10-60 minutes of a fresh restart.

    i will try running w/o mobs for a while to see if this helps.
     
  11. Offline

    fffizzz

    Hey guys.. try running a vanilla MC server as a test (no bukkit, no plugins) you'll see its probably about the same.
     
  12. Offline

    tremor

    No. Vanilla MC runs on my VPS at 7% CPU. Raised about 2% per player logging in. Goes back down when they logout. Even on my primary world which is about 20k blocks in all directions, about 1.7GB.


    Confirmed... CB #531 - initialized server at at 200% CPU, falls to 14% CPU after a few minutes.. Watched usage for a day.. it never comes back down below 30% even with 0 Players... assuming handling mobs and other world issues.

    - Addressing the GAP from #493 to #522 in builds, it's because that's the recommended gap. I as well as most responsible admins probably avoid the builds in between, as do the plugin developers. I could try and go through the builds in between but I really hate to go backwards.. any changes in mob handling?

    One thing that I noticed.. I warped to an area on my server while there were 0 players on for atleast 30 minutes.. and mobs were already present. I didn't think mobs spawned in areas unless players were present?
     
  13. Offline

    GhostToast

    very interesting discovery. hey i can't for the life of me remember which plugin utilizes "/gc" as a command, but i recommend whoever has it try it. you can see how many entities are loaded. entities is only players and mobs right? ive seen it be over 1000 with 10 or less players online.

    edit: that's Essentials
    • /gc: Displays chunk, memory, and world information.
      • essentials.gc
      • No Syntax
     
  14. Offline

    tremor

    yes.. I just restarted my server slowly adding plugins in again one at a time (the non essential ones like snowballz and bigcatch) - before I read this post I fired off a /butcher command so we'll have to wait awhile for it to be accurate.. i'll update in about 4-6 hours:

    AFTER REBOOT & BUTCHER - 0 Players - 10:00 AM USA EST
    GC reports: 353 chunks, 141 entities.
    CPU Usage: 16.2%
     
  15. Offline

    GhostToast

    for a moment I only had monsters off. i didnt actually see any animals spawn though. but i then turned off animals as well (had accidentally left it on). the entity count seems to be a bit odd. does it count things like boats and minecarts too? i think it might be anything that moves.

    it seems to bounce around between 10, 15, 17, with 0, 1, or 2 players online. still, very low number. but i wonder what is being counted if mobs are all off.

    performance is great so far. now i just need a bunch of players to stress test my server. anyone want to help me out? world.bluffcheck.com
     
  16. Offline

    tremor

    From end of Feb to Last week I had 20/20 players almost 24 hours a day. Now 5 or 6 is busy lol. Shows how fast this community will turn on you. I can help later.. been at my job working on minecraft for the first 2 hours.. bout to get fired.

    -- edit --
    I upgraded to 556, restarted and tested with GC. Stats are about the same as above.
     
  17. Offline

    EvilSeph

    Wait, your server.properties has spawn-animals and spawn-monsters set to false?
     
  18. Offline

    GhostToast

    get this - my server.properties has spawn-animals and spawn-monsters set to false - and my entities is growing. i just did /gc and have 53 entitites with me and one random player on. then i did /butcher. killed 32 mobs. now i have 21 entities. it was 13 a couple of minutes ago.

    what???
     
  19. Offline

    EvilSeph

  20. Offline

    GhostToast

    This is after restarting, warping somewhere, then checking /gc a few times, walking around, and butchering experimentally a few times. notice the entity count and the mobs killed.

    I am assuming minecarts are entities. but why would there be mobs still? slimes? mobs don't get saved with chunks when shutting down server though. And this is with the experimental build you linked to.

    [​IMG]

    edit:
    just FYI i think stationary carts count as 1 entity. a pair of boosters moving in tandem seems to count as 3 entities. this of course doesnt explain why there were mobs to butcher.

    i assume any entity above the player count (at this point) would be minecarts and boats. and that "perpetual motion" carts are being counted as 3 (1 for each cart, and 1 for the "marriage" lets call it). that's my hypothesis to account for entities higher than players. moving near/far from these perpetual machines seemed to verify this to some extent.

    -- anyway back to the point. are mobs causing this? should i turn mobs back on? were mobs being populated by two different forces?
     
  21. Offline

    EvilSeph

    I don't think the output of /gc is helpful.
     
  22. Offline

    GhostToast

    maybe not. but look at this. this was after an established player logged in. i warped to his house cause /gc was showing high entities. check out how many it raised to, and how many mobs i butchered. are these just hanging in memory but invisible?

    [​IMG]

    so after a little research i think minecraft animal spawning still occurs with animals turned off. i think what happens is they are invisible and quickly despawn. they are not actually disabled. monsters may very well behave the same way. this might explain the ability to still butcher entities.

    what i guess i want to know @EvilSeph, is what do you think the build you linked me to will accomplish? i am running it and would like to keep mobs/animals on as this is a survival server. i seek your council kind sir!

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

    Xin_TiGeR

    Maximum memory: 2034 MB
    20:30:46 [INFO] Free memory: 974 MB
    20:30:46 [INFO] World "HorizontePt": 1186 chunks, 552 entities

    this was taken a few minutes from a server with 1200x1200 blocks wide and only 3 players on the map!!

    i remembered never seen so much few memory available even when i got around 17 people running on #440 and #493..
     
  24. Offline

    GhostToast

    i was still having loads of lag issues on 531 and the build that EvilSeph linked me to. I decided to take a risk and go find 493. So far so good, I must say. Only thing not running correctly as a result of this rollback is HeroBounty, but I will probably dig up an old version of that and just deal with feeling "behind the times"

    I've been spamming /gc a lot to see entity count. It seems to me that the average player populates about 100+ entities. I don't have a baseline for how many were being populated on #531. Even if it is the same number, I wonder if something about how the garbage collection or something else, is what may be causing this extra lag. More CPU resources, assumes the original OP. I don't actually have a way to test CPU on this host, just RAM through the garbage collector.

    But anyway, so far so good.

    I want to add that a lot of the "lag" we feel is especially true when someone leaves the server, which seems like anecdotal evidence in support that this has something to do with garbage collection. this seems to be lessened on #493.
     
  25. Offline

    EvilSeph

    We don't support the Essentials free memory report and it really isn't useful here.

    My custom build reverted some changes we made to world saving but it doesn't appear to have made a difference. Some people report that the newest Recommended Build fixes the issues, has anyone tried it?
     
  26. Offline

    MrPendulum

    Correct. Monsters were off as it started off with a focus on designing instead of survival. We did test turning on monsters, but then experienced a 30+ second lag on all interactions...was quite unplayable sadly.

    I turned animals off the other day to see if it helped with the CPU usage.

    I will try the newest Recommended Build tonight (#557). I have noticed this in the changes: "Added missing EntitySquid, you can now prevent them from spawning!". I'll let you know how I go.
     
  27. Offline

    ManBearWaffle

    I'm also having the issue where /butcher kills mobs even with mobs turned off completely.
     
  28. Offline

    GhostToast

    my assumption is that mobs still exist but are just not displayed, and are "more quickly" eaten by the garbage collector. like, they spawn and are immediately thrown away. has anyone ever seen flickering zombies right after they turned monsters off and restarted? i have.

    anyway EvilSeph I am trying the latest RB now and will see how it goes. it seems everything just decays after so much time too...sure wish my provider had automagic restarts.
     
  29. Offline

    Valdiralita

    i can confirm that monsters spawn and nearly instantly despawns when monsters are disabled
    my server is a little slow so i can see monster near a monster spawner for 1 frame then they despawn.
     
  30. Offline

    Kainzo

    Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
    permitted by applicable law.
    You have mail.
    Last login: Thu Mar 17 09:41:59 2011 from 164.57.113.60
    kainzo@DHSERVER:~$ top
    top - 17:28:48 up 10 days, 23:57, 2 users, load average: 1.00, 1.05, 1.07
    Tasks: 150 total, 1 running, 149 sleeping, 0 stopped, 0 zombie
    Cpu(s): 8.6%us, 0.4%sy, 0.0%ni, 90.9%id, 0.0%wa, 0.0%hi, 0.1%si, 0.0%st
    Mem: 24741452k total, 15350944k used, 9390508k free, 317528k buffers
    Swap: 63175572k total, 0k used, 63175572k free, 6694544k cached

    PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
    21243 kainzo 18 -2 19.3g 7.5g 9920 S 229 31.9 1044:16 java
    41 root 15 -5 0 0 0 S 2 0.0 1:28.84 events/2
    331 kainzo 18 -2 18960 1308 944 R 1 0.0 0:00.02 top
    1 root 20 0 10316 752 624 S 0 0.0 0:23.48 init
    2 root 15 -5 0 0 0 S 0 0.0 0:00.00 kthreadd
    3 root RT -5 0 0 0 S 0 0.0 0:11.24 migration/0
    4 root 15 -5 0 0 0 S 0 0.0 0:03.24 ksoftirqd/0
    5 root RT -5 0 0 0 S 0 0.0 4:11.56 watchdog/0
    6 root RT -5 0 0 0 S 0 0.0 0:00.36 migration/1
    7 root 15 -5 0 0 0 S 0 0.0 0:53.66 ksoftirqd/1
    8 root RT -5 0 0 0 S 0 0.0 0:05.72 watchdog/1
    9 root RT -5 0 0 0 S 0 0.0 0:00.20 migration/2
    10 root 15 -5 0 0 0 S 0 0.0 1:20.71 ksoftirqd/2
    11 root RT -5 0 0 0 S 0 0.0 0:04.20 watchdog/2
    12 root RT -5 0 0 0 S 0 0.0 0:00.14 migration/3
    13 root 15 -5 0 0 0 S 0 0.0 1:47.51 ksoftirqd/3
    14 root RT -5 0 0 0 S 0 0.0 0:01.12 watchdog/3
    15 root RT -5 0 0 0 S 0 0.0 0:00.06 migration/4
    16 root 15 -5 0 0 0 S 0 0.0 1:33.98 ksoftirqd/4
    17 root RT -5 0 0 0 S 0 0.0 0:00.72 watchdog/4
    18 root RT -5 0 0 0 S 0 0.0 0:00.04 migration/5
    19 root 15 -5 0 0 0 S 0 0.0 1:17.06 ksoftirqd/5
    20 root RT -5 0 0 0 S 0 0.0 0:00.62 watchdog/5
    21 root RT -5 0 0 0 S 0 0.0 0:00.04 migration/6
    22 root 15 -5 0 0 0 S 0 0.0 2:42.23 ksoftirqd/6
    23 root RT -5 0 0 0 S 0 0.0 0:04.44 watchdog/6
    24 root RT -5 0 0 0 S 0 0.0 0:00.00 migration/7
    25 root 15 -5 0 0 0 S 0 0.0 1:05.57 ksoftirqd/7
    26 root RT -5 0 0 0 S 0 0.0 0:00.68 watchdog/7
    27 root RT -5 0 0 0 S 0 0.0 0:00.00 migration/8
    28 root 15 -5 0 0 0 S 0 0.0 0:56.44 ksoftirqd/8
    29 root RT -5 0 0 0 S 0 0.0 0:00.66 watchdog/8
    30 root RT -5 0 0 0 S 0 0.0 0:00.00 migration/9
    31 root 15 -5 0 0 0 S 0 0.0 0:48.30 ksoftirqd/9
    32 root RT -5 0 0 0 S 0 0.0 0:00.60 watchdog/9
    33 root RT -5 0 0 0 S 0 0.0 0:00.00 migration/10
    34 root 15 -5 0 0 0 S 0 0.0 0:36.22 ksoftirqd/10
    35 root RT -5 0 0 0 S 0 0.0 0:00.66 watchdog/10
    36 root RT -5 0 0 0 S 0 0.0 0:00.02 migration/11
    37 root 15 -5 0 0 0 S 0 0.0 0:30.10 ksoftirqd/11
    38 root RT -5 0 0 0 S 0 0.0 0:00.62 watchdog/11
    39 root 15 -5 0 0 0 S 0 0.0 5:47.42 events/0
    40 root 15 -5 0 0 0 S 0 0.0 1:14.12 events/1
     
Thread Status:
Not open for further replies.

Share This Page