[Analysis] Minecraft (server) lagging

Discussion in 'Bukkit Help' started by Schinken_Manuel, Apr 2, 2011.

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

    Schinken_Manuel

    Okay, i am currently analysing the huge lags some people are encountering.

    First: My server setup
    Debian
    1.4 Vanilla Server (No mods etc).
    AMD 3400+ Dual Core CPU
    3,5 GB RAM
    2x 320GB HDD

    It seem that the lag is caused when someone is too far from the coordinates x,y,z (0,0,0).

    First testing showed, that the y axis (up and down) can be fully used (0 - 127).

    First lag was encountered, when i moved to z = -450.
    I don't know about the x axis yet.
    X axis seems to cause lag at around -700.

    Can someone confirm/reproduce this?

    A friend tried, and startet lagging: x,y,z (-219, 65, -736)
    Edit: We tested it again, he startet lagging at z = -710.


    [​IMG]

    What does Min./Max. lag points mean?
    Well, it's quite easy, lag may occur at the min. lag point, but it will definitly be there at the max. lag point.

    Note: To find coordinates, i recommmend Zan's Minimap (minecraftforum.net)
    (I'll expand this thread soon)
     
  2. Offline

    Lodran

    We have a player who's set up shop at x:2300, y:2300 - doesn't seem to cause any particular lag for us. I'm not saying there's no relationship between distance from spawn and lag, just saying that it's probably not that simple.
     
  3. Offline

    Schinken_Manuel

    Oh :/ really thought i've found the reason for lagging, mainly because it's reproducable everytime i try it...

    Well, another thought was, that Minecart boosters are lagging (we had some Minecart boosters with up to 14 invisible Minecarts in it...). Well, i removed them all and it is still lagging.

    The shop, is it at + or - 2300?

    Could you try to walk to -1000 or something?
    I just tried walking to +1500, still no lag, but as i mentioned earlier, it starts lagging at -450(+)
     
  4. I got the same Problem on my VServer. Yesterday all works Perfect. Today i have Update CraftBukkit and the problem Start. When iam on Spawnpoint from my World all works good, but if anyone walks to far away he's starting lagging like hell. I have tryd to change the Craftbukkit back to my version from yesterday but the problem is still there ...:/
     
  5. Offline

    AgentKid

    I've had issues on my server (though it DOES have mods) in which if a player goes more than ~700 blocks out via any method that everyone on the server times out due to MASSIVE lag. Only fix for me is to tphere them back to within 700 blocks. I'll do more testing later tonight on a vanilla server to see if it's the same.

    Although, now that I think about it, it could have something to do with chunk loading/unloading. When you first turn on the server, it generates and loads 625 chunks (25x25 chunks). Going past that would be about 200 out from origin in any direction, so it...........doesn't have anything to do with it xD
     
  6. Offline

    Schinken_Manuel

    Okay, I guess I found the problem:
    So Minecraft has a "Multiplayer Chunk Cache", which is 441 chunks:
    sqrt(441) -> 21
    So it's a field of 21*21 chunks (aka 21² or 21^2).
    Each chunk with 16 by 16 length (i will only go for one direction here, for example the X axis)
    So: 21*16 = 336
    336*2 (for + and -) = 672 blocks of chunk cache, so the server has problems loading chunks outside of that range.

    Short: sqrt(441)*16*2 = 672 range in each direction.

    Maybe because the main chunks (around the spawn) are updated too frequently for the server to be able to load other chunks...

    Just a theory, could someone confirm this?

    Edit: Is a chunk 16 by 16? Or is it 32 by 32?
     
  7. Offline

    xupwup

    16x16
     
  8. Offline

    EvilSeph

    Not having any issues with lag on 1.4.
     
    Nate204 likes this.
  9. Offline

    LlmDl

    Would you mind telling us your rig/cb#/plugins?

    I see so many setups that are having problems, it would be nice to see what you use. Thanks!
     
  10. Offline

    Orcworm

    Just gonna' chip in here and say that my server seems to be running smoothly on 1.4 as well, much better than 1.3 at least. Running a fresh 4000x4000 map.

    (Then again, every update Notch rolls out seems to be luck of the draw on how well your server will cope with it)
     
  11. Offline

    MrAdam

    My server got the exact same problem.
    Tried tp'ing everyone to spawn. The lag stopped immediatedly.
    The lag is with blocks and chat, and makes it pretty unplayable.
     
  12. Offline

    Schinken_Manuel

    Okay, i just had a new test with a friend.
    It seems that the problem is more client side than server side.

    First: The client's seem to break down to 100% CPU usage first, then the server is following.

    Theory:
    He was out of that -700 range, then i tp'd him to my place.
    His playermodel was actually ported. (So i could see him right next to me).
    But his client wasn't answering correctly (e.g. fast enough because of the lag).
    So the Server keeps trying to update the player's information, and as the client is not sending packets back,
    the server overloads to a high CPU-usage (as shown by all the "Can't keep up" messages).

    So my theory is, the (server cpu-usage) is just a result of the "-700-Lag", because the Client and Server can't
    sync each other correctly.

    -----
    It's just a theory, but some of it might be true.
     
  13. Offline

    AgentKid

    Even causes console lag for me, not just chat and block. I think it's a plugin doing it, since this is being reported by very few people. Can all the people (not just the ones who have been having the issue) post what plugins they have so we can try to weed it out?
     
  14. Offline

    Orcworm

    Code:
    bLog
    BorderGuardLite
    CommandBook
    ecoCreature
    Growbie
    HeroicDeath
    Honeypot
    iAuction
    iChat
    iConomy
    iConomyChestShop
    iConomyPunga
    LogBlock
    LWC
    MagicCarpet
    mcbans
    MinecartMania (Full set)
    Minequery
    MobNerf
    MobRider
    NoCheat
    Permissions
    Runecraft
    SimpleHome
    Vanish
    WorldEdit
    WorldGuard
    
    Oh, and these are the flags I use during startup:

    Code:
    java -d64 -Xincgc -Xmx6G -server -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:+CMSIncrementalPacing -XX:ParallelGCThreads=4 -jar craftbukkit.jar nogui
     
  15. Offline

    MrAdam

    Code:
    BigBrother.jar
    BorderGuardLite.jar
    CraftBukkitUpToDate.jar
    dynmap.jar
    ecoCreature.jar
    Essentials.jar
    iConomyChestShop.jar
    iConomy.jar
    LWC.jar
    mcMMO.jar
    MinecartManiaAdminControls.jar
    MinecartManiaChestControl.jar
    MinecartManiaCore.jar
    MinecartManiaSignCommands.jar
    MinecartManiaStation.jar
    NoDrop.jar
    OChestDump.jar
    Permissions.jar
    Questioner.jar
    SimpleShop.jar
    Towny.jar
    Vanish.jar
    Whitelist.jar
    WorldEdit.jar
    EDIT: Towny, BigBrother and LWC are running unofficial builds, due to the plugin authors being away.
     
  16. Offline

    AgentKid

    What build of BigBrother are you on?
     
  17. Offline

    MrAdam

    Removed BigBrother, runs smoother than ever now ;)
    Can't believe I didn't figure that out..
     
  18. Offline

    kretu

    Have you solved that ? i've got similar problem on my map there is a place on map that cusing 100% CPU usage even with one player online.
     
  19. Offline

    Kartus

    Same to mee. It suddenly exists after a manual serverrestart on 27.03.11 MC1.3 #556. Since then I have a huge lagg who is growing more and more at beginning after few seconds only block/chat lagg (10-100 seconds chatlagg) and after minutes also Clientlagg 1-2FPS. Other players on other locations on map haven't any lagg. it only laggs at players at the "lagg" location, the more near i come. i use #617 since Friday, it doesn't solved laggproblem.

    now it seems it can happen also at spawn, but after restart spawnlagg was done compared with "lagg" location, but this "spawnlagg" was happening a few times weeks ago.

    i posted infos& pictures here: http://www.minecraftforum.net/viewtopic.php?f=10&t=250231&p=3533320#p3533320

    I have tried to set animals&monsters=false, lagg still exists.
    I have tried to delete "level.dat", "level.dat_old" and "session.lock" in /world, lagg still exists.
    I have tried to remove the building "cube" with MCEdit tool and only the ground with glass remains, lagg still exists.
    I have tried to start server instead of #617 with Vanilla and LAGG GONE!!! It seems to be a bukkit issue!
     
  20. Offline

    AgentKid

    ......uhhhh, so you're saying that you HAD lag and now it's gone? If so, good for you. If not, send me the world files and I'll run it on my server and see if I have the same issue.
    Yea, something's wrong with it ATM. Something to do with the MySQL connection, as (when it starts lagging) top reads java 148% CPU and MySQL reads 48%
     
  21. Offline

    Kartus

    i have to say that bukkit #617 clean without any plugin also had same lagg problem. but vanilla solved it. but i'm playing not vanilla, im playing bukkit with plugins, so issue is remaining. i can send you the world files, it's 117MB in .rar. I hope you can find a solution. but i tested it on a friend's Home-Game-PC vanilla server and how i can remember the lagg still existed there, but not sure. its ridicolous.

    i have also bigbrother, but with BB 1.7.1 and #556 the lagg also existed at building. so BB can't be the reason for my issue. but yes, its more laggy with new BB >#235 and cb #617

    i tried it with newest bukkit #642, issue is remaining.
     
  22. Offline

    Scyfi

    Im getting 100% cpu with 10 people on a qaud core at 3ghz. But if I bring everyone to spawn it runs at 40%
     
  23. Offline

    Kane

    You need to stop trolling bro. I could quote you on that line since like alpha lol. 100's people post issues but You never have problems :p
     
  24. Offline

    Kartus

    i solved laggissue with WorldEdit and /butcher 300. Killed 336 Mobs. The reason were the squids. ca. 100 pieces on one place occur laggs. i think collission calculating is the problem. bukkit or minecraft should watch how to solve this bigsquidspawnlocations or laggs.

    [​IMG]
     
  25. Offline

    Schinken_Manuel

    Okay, I just tested that, and it seems that you're right, although it worked together with the -700 thing.
    In short: Mobs are heavily increased at -700 :/
    Screenshots:
    [​IMG]
    As you can see, as soon as a friend joined the game (his location was at -700) the mobs heavily increased!

    [​IMG]
     
  26. Offline

    parker_digg

    I have a full city of players at 5200 and I haven't really noticed lag. Bukkit is just so memory heavy. I wish it could be fixed.
     
  27. Offline

    Nate204

    Try and limit your Mobs with the mob limiter plugin?

    I use that, and run BigBrother. I seem to be fine until around 10+ people. I run a home grown server though with a 2 mb up.... Honestly though, I'll add one thing and lag goes through the roof. Other times, It's still smooth.

    My mob limit is set to 200 max. Yeah, Not as fun. I had 15 people online one night, and my /butcher killed 800+. The next day, I disabled mobs all together and the lag was alllll gone. Try and limit it.
     
  28. Offline

    blutherz

    great guys
    /butcher 300 had helped me that now all 5 multiverse worlds working again.
    I had only with on world problems there i killed with butcher 347 mobs....
     
  29. Offline

    Kartus

    I'm happy that my solution can help other serveradmins due this heavy lagg issue taking me >10 hours of testing/researching/communicating until i found the solution.

    Can you please give me the exact name of the plugin?
     
  30. Offline

    Nate204

Thread Status:
Not open for further replies.

Share This Page