High CPU with not that much players

Discussion in 'Performance Tweaking' started by mussonking, Aug 20, 2013.

  1. Hi, I have some questions to ask and to make sure I understand things clearly. I am still a novice with linux and bungeecords and I hope some guys on the forum will be able to point me the right dirrection!

    I have a dedicated E3-1240v2 processor with 32gb of ram.
    First of, I want to say that i did a whole system update with the latest java version last night.(1.7.0_25) And for system update i did ''yum update'' (I am on centos 6.3)

    Is it normal that Bungeecoord take 50-85% of cpu with 120-140 users online?
    I have bungeesuite installed too. (running the latest bungeecoord dev build)

    When a server use 150% cpu, it obviously means it is using more than one core right? So if I have 4 core, 4 minecraft server plus the bungeecoord software, It is possible that One minecraft server cause lag on the other minecraft server right? (I also have mysql for bungeesuite and apache for webpanel, but they dont use more than 0.5% cpu)

    I know it have alot of plugin on my faction server, but it often run 80-110% with only 30-40 users on it, I removed some faulty plugin, but I still get very high cpu, Even last night after all the updates, i had a tps of 19 for few seconds, but we were only 6 on the factions server due to my very long shutdown for updates. But even with 6 users i was running over 50-60%.

    Also, I dont have alot of plugin in my cops and robbers server, it always run over 80% and peek 200% when maps restart, always 75 users on. My question is, with my kind of processor, how many players should I be able to get on one single server with not alot of plugin, i tough it would be more than 100... I know it will ask way more cpu when more than one maps restart at the same time, but even when now maps are restarrting, its still at 80%+
    Is it normal?

    edit: I would also like to know when you use ''top'' on ssh, is it core or thread '%' ??
    and to finish, why does mcMyAdmin tell me 10-15% when 'top' tell me over 100%?
    Does mcmyadmin look at total dedicated server available raw?

    So if someone know what is missing or what I should add, i guess your gonna need more info, but just ask and i will provide it!

    I gladly appriciate the help of anyone in advance.

    Best regard,
    Mussonking
     
    #1 mussonking, Aug 20, 2013
    Last edited: Aug 20, 2013
  2. TitanicFreak

    Patron

    Well there's alot of questions here i got to Answer. I'll start with your "Top" question. Its per thread last time i checked and your server CPU is a 4 core 8 thread processor. So it acts like a 8 core in some applications. So 4 servers plus a BungeeCord shouldn't cause much of a CPU problem between all the servers and your Apache with MySQL.

    Now for your servers using like 80%-200% per server. You must make sure you have Spigot installed. Then on EACH server. Do /timings on and then wait 120 seconds then do /timings paste, click on the "http://aikar.co/timings.php?url=XXXXXXX" link. That will show you your timings on that server. Please do that on all your servers and paste each link for each server you have so we can help you figure out your CPU issues.

    I recommend pasting your timings a fashion like
    Cops And Robbers: "http://aikar.co/timings.php?url=XXXXXXX"
    Factions: "http://aikar.co/timings.php?url=XXXXXXX"
    and so on.

    I'm just telling you to do that just so we can help you as quick as possible. Also when i say we, im talking about the Spigot community. I'm not the best at timings but im sure someone else can help you if you give us the timings.

    Now onto your McMyAdmin CPU, that is the total CPU of the entire dedicated rig. So if that reports 100 percent, it reports the entire rig being maxed out with 100% Cpu usage. When it reports around ~12.5%, it means its using one thread. Now thats a rough estimate so it may not be EXACTLY what i said however it will give you an idea on what the server is using in terms of CPU.

    Now BungeeCord is multi-threaded so it can use more cores with ease. My network with ~80-110 peaks can hit 70-90% on my CPU. Now remember thats only one core so BungeeCord can use others. Use this picture from another thread, http://i.imgur.com/hNS9k47.jpg, that is when 1400 people are on one BungeeCord instance. BungeeCord is multi-threaded and it can use alot of CPU as its trying to link servers together in a proxy/cloud. It can get demanding when it's given the players. Hopefully that answers all your questions you asked. If i forgot a question, just reply back and ill try to answer it.
     
    • Like Like x 2
  3. Wow, to be honest i didnt think i would get a full answer like this, i really apreciate it.
    I dont think you forgot anything! Thanks :)

    I am running all of my servers on craftbukkit, since thats the one i know, and was on it when i only had one server. I was scared to install spigot since i didnt know if all my plugins would be working, mostly for the faction server, since it have ALOT of plugins.
    Since spigot use crafbukit, I should be ok right?
    Can someone confirm me that commandhelper would work with spigot? since I have alot of ''plugin'' running with it, my whole cops and robbers is scripted with commandhelper since i dont know java .. at all :(

    If I can be sure it wont break anything, i will of course do the move and install spigot on all my servers, since from what i have read, it helps ALOT.

    So, if someone can confirm me this, i will install it and to what you told me to do.

    Again thanks again for the reply. Really apreciated! :)

    Best regards,
    mussonking
    (p.s.: Im french canadian that's why my sentences sometime looks weird :p)

    edit: so if i clearly understand, they have a 12 cores (24 thread) dedicated server only to run there bungeecord?
     
    #3 mussonking, Aug 22, 2013
    Last edited: Aug 22, 2013
    • Like Like x 1
  4. CommandHelper works fine. Almost no plugins are broken on Spigot. Just give it a try. It's just swapping .jar files. If it doesn't work for you, you can still ask for help again and swap back while waiting for an answer. :)
     
    • Agree Agree x 1
  5. TitanicFreak

    Patron

    Sorry for the late reply, got caught up with my own server. Anyway like Netto said above, Spigot and Bukkit are basically the same API wise. The only possible plugins that can break is plugins that modify the chunks such as Anti-Xray and NoLagg. Only possible way that a plugin breaks in spigot from what I've seen. Spigot should work without harm and with the Netty engine, it may even lower your ping and CPU.
     
  6. TitanicFreak

    Patron

    Also the "o if i clearly understand, they have a 12 cores (24 thread) dedicated server only to run there bungeecord?" part you edited in. Its a dual E5-2620 setup just for bungeecord. May seem a tad extreme but when you hit the 1000+ mark, you got to do some massive hardware setups just for one program.

    Edit: Also i personally use an E5-1650 processor. Best bang for your buck for Bungee setups for what i use it for.
     
  7. oh, cool.. thanks for the info, May i ask who is your hosting provider??

    Also, i did add spigot to my faction server, everythings seems to work well so far.

    The server is almost empty at this time of the night, i dont knoww if i should do my timing on/paste when its over 30 users?

    well anyways, here is the timming for faction server
    http://aikar.co/timings.php?url=6016832


    edit: idk why, but with spigot i cant get 20 fps.. but with craftbukkit i had 20 fps until i reach 20+ users, sometime it was droping to 16 when 2 cops and robbers map where reseting and the cpu (when looking at ''TOP'' on ssh) for cops and robbers was showing 300%.
    Thanks again :)
     
  8. joehot200

    Supporter

    Craftbukkit/spigot cannot change your client FPS. Your client FPS is how fast your client can render everything onto the screen. Spigot stops server-side lag, and so this wont affect FPS in any way. Note that a lot of signs in a small space can massively reduce FPS.
    Yes spigot can reduce increase* client FPS when turning the "entity tracking distance" down, but that is pretty minimal gains.

    As for your timings, they look fine. 19.97 TPS is close enough to 20 that nobody would notice a difference anyway. Its if your tps gets to 16 or less that people will start to notice lag.
    Try giving us a timings report when your server has more people in it.

    There is a lot of things in the "spigot.yml" that you can change to increase/decrease performance.
     
    #8 joehot200, Aug 23, 2013
    Last edited: Aug 23, 2013
  9. TitanicFreak

    Patron

    Like joe said up there, Give us a timing report of when the server is either has more people on it or when it starts lagging so we can help you even further.
     
  10. Oh, Thats what i tought about the /timming, and i will obviously do it when it get more people or some lag, and probably will have it on all my server before that.

    I know people wont see a difference at all between 20 and 19.8, I just wanted to make sure it was ''normal'' because i am used to see a plain 20 there..

    Also, sorry for the Time lost.. lol, i didnt mean fps at all -_- I totally mean TPS. I'm not a pro, but i'm not that noob :p I guess i was too much under the influence of alcohol :p haha, well anyways.. Thanks againg for fast replies!


    mussonking
     
  11. TitanicFreak

    Patron

    The way i check my timings is
    First: /Timings on
    Wait like 30-120 seconds
    Then /Timings paste
    It will give ya better example of the timings.
     
  12. TitanicFreak

    Patron

    Well the TPS is in the high 19s. I wouldn't worry too much about the CPU usage as long as the TPS stays high
     
    • Agree Agree x 1
  13. Yeah, it only drop down to 16-17 when jails resets. I dont really care if they get lag spike when it happens, i have no control over it I think anyways.
    Its mostly for my faction server, where i dont want any lag! i'll try to catch some lag today when server get over 30
    I mostly wanted to know if it make the faction server tps drop when the jails are reseting in copsandrobbers.

    Also, I know i still have over 19.5 tps all the time on Creative server, but the cpu run 90-100% even when There is 1 user on it.
    Is it possible that updating java from 7u19 to 7u25 make some plugin to struggle?
    I think it started to do this after my update, but since the tps still good, i cant see anything wrong when i use /timings. But it still using way to much cpu for nothing, I wish there was a way to find the faulty plugin without removing them 1 by 1.

    Thanks again :)
    Really apreciate how fast i get answers in here! :D
     
  14. TitanicFreak

    Patron

    You should only worry about the TPS if it gets below 17 as thats where the lag becomes noticeable.
    Anyway, ill be here when ya paste the timings for when ya have over 30.
     
  15. joehot200

    Supporter

    @mussonking, whats the CPU the server is using?
     
  16. the total % of the server?
    I know it doesnt cause lag.. yet :p because there is enough space left on the server and creative dont really go over 20 users.. for now. So i would like to find it before it gets a problem by using raw that is needed for other server.

    And TitanicFreak, i dont think it will be usefull to run a /timings on the faction server yet, Since it is around 50-60% cpu use instead of 90-100 with 30-40 users. :D im very happy about it tho!
     
  17. Dmck2b

    Services Staff


    Zombies are taking up half of your entity time.

    [​IMG]

    Their AI is currently bugged to kill TPS, so if your looking for 0 lag, it might be worthwhile removing them like many of us have.
     
  18. I used a plugin to stop to many mobs from spawning, but It was giving huge lag spike,
    May I ask what are you guys using to prevent too many zombies to spawn?