Server laggs very much?

Discussion in 'Bukkit Help' started by jasperino, Jan 25, 2011.

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

    jasperino

    Hello,

    I've been hosting my minecraft server for over 2 months now, but since 1/2 weeks, it laggs very much. First it wasn't cpu intensive at all, but now, when there are more than 2 players in the server, it takes every cpu % it can and starts lagging like hell. I even have to set affinity to 2 cores to keep my system stable. it has 2GB availlable, but I also tried it with 3GB, the same result. We're with a max of 7 people in the server, so 2GB should be more than enough. Most of the times all the memory is used.
    I'm also getting many warnings of the server being overloaded. When the server has all the 7 people in, there sometimes gets an error each 3 seconds.

    Does anyone know how to solve it? My specs:

    CPU: AMD phenom x4 955 @ 3.6GHz (stable, the lagg is also there at 3.2GHz)
    Windows 7
    8GB of ram
    Using Craftbukkit now, Hmod before (also lagged)

    I hope I gave you enough information, tell me otherwise :)


    Jasperino
     
  2. Offline

    DerpinLlama

    What plugins do you have loaded?
     
  3. Offline

    TnT

    Are you playing the game on the same system as you're running the server? The client is very CPU intensive. You can also fill this out to give us some details.

    Also, what is the command you use to run your server? What is your internet connection like (upload speed?)
     
  4. Offline

    jasperino

    In Hey0, I used the Iconomy and Cuboid Plugin. In Craftbukkit, I only use SimpleWarp and Permissions. I've tried running the server without plugins and even without Craftbukkit, but the lagg's still there. My internet speed is good enough i guess, 30mbit (~3.5MB/sec) download speed (speedtest.net sais 300mbit). I will fill in the list:

    1. What OS are you using (Brand and version - Ex. Windows XP SP3)? Windows 7, Has'nt got a SP yet right? (system=updated)
    2. What architecture is the OS you are running (x64 or x86)?x64
    3. What version and architecture is your java install? (Type: java -version in command prompt.)1.6.0_21 (checked it yesterday, java said it was the latest version
    4. What build of CraftBukkit are you running? (do NOT say latest. Say the build number.) I don't know where to find this, but since it was also in hey0, I don't know if it's really important
    5. What plugins are you running? SimpleWarp and Permissions, but I also tried running the server without plugins and the lagg was still there
    6. What error are you getting?Server overloaded. Taking many CPU and lagging very hard
    7. What have you tried already? Running it without craftbukkit/plugins, giving it more memory (gave it 3gb for 7 people, looks enough to me)
    8. Have you tried any of the things below? Turning off plugins. I didn't try the vanilla server, but I used hey0 before this
     
  5. Offline

    Hubbe King

    Update your java, install x64 JVM if you haven't already. (Make sure bukkit actually USES the 64-bit java)

    Then, run the server like this:
    java -Xincgc -Xmx2048M -jar craftbukkit.jar nogui

    (Xincgc enabled incremental garbage collecting, which helps with Minecrafts inherent memory leaks.)
    (It also makes it so that RAM is allocated as it is needed.)
    --- merged: Jan 25, 2011 6:52 PM ---
    Also, make sure to update to craftbukkit #141.

    It seems to further reduce RAM usage.
     
  6. Offline

    TnT

    We need your upload, not download speed. Upload is how fast you can serve up data to everyone running on your server. Download is how fast you can get anything from a remote server.



    Are you getting the "Warning: Can't keep up... blah blah blah" messages on your console? Is your CPU maxed out? Again, are you running the client on the same system as you are running your server? Keep in mind, that if you are running the client on the same system as the server, you getting a lot of chunk updates will pin the CPU for a short time, starving out the server which is trying to feed you all those chunk updates. That will create lag.
     
  7. Offline

    jasperino

    I will try and running it in that different way (with xincgc). after that I will also try to update Craftbukkit. Since I actually think it has'nt really anything to do with craftbukkit itself, I also don't know if it'll work because it was in Hmod as well, buy I'll see

    [​IMG]


    That's my upload speed. Don't know if it's really high, but does it really matter? Because the strange thing is, I'm also getting the lags, while I run the server on the same pc as the game


    I do get that error, yes. The server would take every % of cpu it can. The client itself isn't really asking a lot of cpu. With loading new parts it does, sometimes, but the server asks everything it can for the whole time, as long as there are more than 2 people in it...
     
  8. Offline

    TnT

    With that upload speed you should be fine, it's about 3x what I have and I can host around 5-10 people comfortably (yes, it matters, but not when you run it from within the same lan).

    Yes, please do run it with -Xincgc. I've started to run my server that way and have noticed a very significant ram usage reduction (however, no noticeable difference in lag, not that I had any to eliminate).

    As for your CPU usage, that is incredible. I run my server on a Athlon X2 4600+ and never see the CPU go above 40% on any one core, with the majority of that being Gnome system monitor usage (I run on Ubuntu Server 10.10 x64).

    If you are getting the "Warning: Can't keep up..." messages, its probably either your CPU load (which you state does hit 100% for some reason) or your I/O load. What is the size of your world? How fast are the disks it runs on?

    Things to try:
    New world. You may have a corrupted world or something causing the lag. Doesn't hurt to try (obviously back up your old world).

    Ramdisk for faster I/O. I can't help you much there (setting up a ramdisk on Linux is much easier than on Windows imo.) However, given your information, I doubt I/O is your problem, unless its a corrupted world trying to reload corrupted chunks all the time, spiking your I/O and CPU or you have really slow disks.
     
  9. Offline

    jasperino

    I am running it with -xincgc right now. I can't say if the lag has been reduced yet because not many people are on it atm, but I will do it when I know the result

    I guess it isn't my Hard drive. I'm running it on a Samsung SpinPoint F3 1TB, which has been reviewed as the best hard drive for quite some time now (not taking SSD's in account). Windows 7 is installed on another hard drive than where the MC server is on, so it should be no problem (client=on windows 7 disk).

    The world size is 45MB or 65MB on Hard Drive, (don't know which one you need), containing 15000 files. Don't know if that's much or not, considering that there are multiple players on the server?
     
  10. Offline

    TnT

    No, its pretty small. That's about a 1/3 the size of my world.

    Try running a new world to test it out. I'm honestly a little stumped on what else it can be.
     
  11. Offline

    Hypo2010

    Hey same problem by me.
    since 1/2 week or so as i updated my craftbukkit version my Cpu goes 100% at all
    using AMD 4x 3,0 GHz and 4Gb Ram
    before I updated to build 110+ (dont know the exact version) everything was stable and my Cpu dont went over 40%
    I used Hmod before and ther wasnt laggs anyway.
    hope you can help
     
  12. Offline

    Greedish

    Getting this too, as soon as a third player joins.
     
  13. Offline

    jasperino

    Lagg was still there. I tried checking the world for errors, but none were found. I copied my server map to singleplayer to make it be checked, because TreasureChest doesn't support multiplayer and I don't know another one, so that could be the reason of finding 0 currupt files. I will see if it works with another world, but is it possible to copy parts of the world? Because we just made a huge city which we actually don't want to see dissapear... :(
     
  14. Offline

    Greedish

    It's not the world's fault - even with a clean bukkit server with no plugins and a new world it takes up 80% cpu with three players. I don't know what the hell is going on.
     
  15. Offline

    M1sT3rM4n

    The latest versions of Craftbukkit and Bukkit also frees memory when players connect/disconnect, which is also another great feature that I'm sure no one noticed :p
     
  16. Offline

    Greedish

    This is driving me nuts, I have no idea why Java is taking up a huge percentage of my CPU, I have been able to host servers just fine in the past
     
  17. Offline

    wallnuss

    @M1sT3rM4n I do noticed it feels great to see player xyz leaving freed 200mb of ram ;-)
    I have a similar problem (running bukkit on an amzon aws micro instance) what's the best way to check the integrity of a world ? (Sometime we have some really weird chunk errors.)
     
  18. Offline

    Hypo2010

    I#ve tried yesterday to install an older version of craftbukkit but he same problem is going on. The Cpu goes (over) 100%. We all need help so help us plz. If 1 player is online without meself ists ok cpu 30% with the second the Cpu 75% and with the third 100% and more. Dont know why!!!
    We need help!!!
     
  19. Offline

    TnT

    What antivirus are you running?
     
  20. Offline

    jasperino

    Kaspersky Internet Security. Do you think this will cause the problem?
     
  21. Offline

    TnT

    Potentially, yes. Am I 100% positive? No.

    If you have already narrowed down that it's not your Java, your CraftBukkit build, your world, or your server specs, there are few other things to try. Try disabling it and running for a while, see if that helps. If it does, throw your world (and possibly your entire Minecraft) directory into the exception list for your Antivirus.
     
  22. Offline

    causs

    Exactly the same problem here. When my server holds 3 peeps at the same time, the CPU goes 100%.
     
  23. Offline

    dzekins

    i have newer seened my pc go more than 0% but my memory hits the highest spot atlist after 2 players have been joined
     
  24. Offline

    jasperino

    I just tried running it without my antivirus, but it didn't make any change. My friends say that the server does lagg when I'm not in, but that it is actually worse when I am in. Don't know if this is of any use?
    --- merged: Jan 30, 2011 8:53 AM ---
    Since none of the things seem to work, does anyone know a descent plugin/program to copy/paste bluidings into another map, so I can see if it works to start with a new world?
     
  25. Offline

    Nathan C

    Yeh, I feel your pain guys. I am spiked to 100% CPU usage with 14 players...

    No it's not upload speed. On full 100 mbit connection.
    Makes me miss hmod :(
     
  26. Offline

    jasperino

    I had this at hmod as well, so gues that craftbukkit's not the problem...
     
  27. Offline

    sexyexample

    I also have the same problem.
    Third person hits and BAM!!!!
    sever lag.
    Any fixes yet?
     
  28. Offline

    jasperino

    Hello,

    Sorry, but no. I still haven't found any solutions. I tried running the server through Hamachi. This made the lagg a little less, but it was still not fun to play with more then 2/3 people.

    Does anyone maybe have a solution now? :(
     
  29. Offline

    Hypo2010

    most of my problem is fixed but the prob was i only have reinstall my windows so i have a clean version now sometimes 5-6 players are on my server without laggs but you can prob to run CCleaner and put the trash files out of your Pc and clean the Registry only test it and say if its work i do it now every day^^
     
  30. Offline

    jasperino

    Tried CCleaner already several times, without luck :( Anyone else? :( [​IMG]
     
Thread Status:
Not open for further replies.

Share This Page