What kind of plugins can cause LATENCY lag?

Discussion in 'Bukkit Discussion' started by LEOcab, Aug 1, 2011.

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


    Hello everyone!

    My server is laggy. Most of my regular players say it's fine most of the time unless the server is full. However some other players complain of too much lag and can only play with CraftProxy on.

    My server is a quad-core Phenom II with 4GB of RAM, and my internet is 30MBps down and 4MBps up. I'm sure that the bottleneck here is the upload speed. Everything else runs smooth; the Java process never uses more than 80% CPU according to top (rarely goes even that high) and that's 80% of one core... (someone should have told me that Bukkit isn't multicore before I spent $100 on a CPU upgrade:D)

    I'm wondering what plugins can cause bandwidth lag. For example I've heard that BigBrother is very resource hungry, but does it affect bandwidth?

    Also what are ways to optimize bandwidth, besides getting a faster internet connection? Maybe some Java tweaks (running 1.7) or Linux tweaks (running Slackware 13.37) or router tweaks (I have a D-Link DIR-601)?

    I forgot to post my current Java command line:
    java -Xmx3584M -XX:ParallelGCThreads=8 -server -Xincgc -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:+CMSIncrementalPacing -XX:+AggressiveOpts -XX:+CMSParallelRemarkEnabled -XX:+DisableExplicitGC -XX:MaxGCPauseMillis=500 -XX:SurvivorRatio=16 -XX:TargetSurvivorRatio=90 -XX:+UseAdaptiveGCBoundary -XX:-UseGCOverheadLimit -Xnoclassgc -XX:UseSSE=4 -XX:PermSize=128m -XX:LargePageSizeInBytes=4m -jar craftbukkit-0.0.1-SNAPSHOT.jar nogui


    Thanks in advance! :D

    Here are my plugins:
    • AdminMode
    • AfkKick
    • BananaChunk
    • BigBrother
    • BookWorm
    • CommandHelper
    • DeathTpPlus
    • Essentials (Chat/Protect/Spawn)
    • FoundDiamonds
    • HigherExplosives
    • Inception
    • LogOres
    • LWC
    • MCStats
    • MultiVerse
    • NoCheat
    • NoSuffixedKill
    • Permissions
    • PickBoat
    • RegexFilter
    • Reporter
    • SimpleTips
    • SkyPirates
    • SpyerAdmin
    • WorldEdit
    • WorldGuard
  2. Offline

    Daniel Heppner

    I'd suggest replacing Essentials with CommandBook, MyHome, MyWarp and any others that you need. Essentials is buggy. But it's probably not causing the lag. For that, I'd suggest getting a server in a datacenter.
  3. Offline


    You're probably just running into a bandwidth issue, there are (As far as I know) no plugins that cause excess bandwidth usage, only CPU time and RAM usage. Most ISPs do not actually give the listed speeds, they give 'Up To' that speed. Run a speedtest ( http://speedtest.net ) to see what you're actually getting.
    On top of that, under Linux you can install/run "iftop -B" to see how much bandwidth is being used overall and who is getting how much. Most likely you're just choking on chunk loading (On my dedi I see it go up to ~2MB/s when sending chunks to people) This could be why CraftProxy helps.
  4. Offline


    Actually speedtest.net gives me more than what Comcast advertised. Comcast says 16Mb/4Mb but with a booster thing that gives you 20Mbps down instead of 16 for the first something-megabytes of a file. I doubt it applies to Minecraft servers. Speedtest.net always shows 30Mbps down and between 4 and 4.5Mbps up. Go figure. :eek:

    I downloaded that iftop thing - very useful; I've been wanting just that for a long time. Could you explain what the numbers mean? I'm guessing I should be looking at the three far-left numbers ("Rates" under "TX"). It's only showing like 50 to 200KBps up though; right now there are like 7 people online and it's at ~45KBps, yet some users still complain about lag. Shouldn't it run smooth until it hits 512KB or something like that? What am I not understanding? There's another computer connected to the router but I only use it for Minecraft and web browsing and barely ever download any large files. :(

    Thank you!
  5. Offline


    One thing to keep in mind is with the "-B" option the numbers are in bytes. The numbers you want to pay attention to are the ones on the far right, the "rates" at the bottom of the screen. The top number is your upload, middle number is download, and bottom is combined.
    If you're only doing 45K/s up then it may be a ping issue that your users are experiencing. Are they located in the same area as you? And what kind of a connection are they playing on?
  6. Offline


    High Priority Can cause stress on it
  7. Offline


    That's what I was thinking. I watched it all day yesterday while playing and it never got to 300KB/s even with 10 people on. The 2 users who report the most lag live really close to me, but when I ask people who live in the other side of the world they say it's just fine. Oh well, so it must be that... nothing I can do then. Thanks a lot for your help though! :D

    High priority...?
  8. Offline


    Plugins that need be registered more important like worldedit will lag sometimes because its high priority
  9. That shouldn't cause an issue, it's not process priority it's the order in which they are invoked.
    If I remember it goes lowest->...->highest priority, so highest priority have last say in event cancelling, with Montior priority being the very last but unable to affect outcome.

    How many worlds are you running with MultiVerse?
    emericask8ur likes this.
  10. Offline


    It's DeathTpPlus. It starts off fine, but after a few minutes it starts using more CPU than the server plus all your plugins combined.
  11. Offline


    Try the command line from http://forums.bukkit.org/threads/op...reme-way-p-need-feedback-thx-i-am-back.25994/
    you can get a much nicer throughput and install the program "saidar" in linux console and start it ... there you can see what parts are handling data when you play on the server ;) AND there is a big big problem with CPU Frequency Scaling and minecraft and i have a nice working answer .... but not today :p Today is command line day
  12. Offline


    If you've got spout installed, spoutcraft users use 50-70% less bandwidth than vanilla players.
  13. Offline



    How did you guys manage THAT?

    I have a host on some gigabit backbone, so server side is bandwith not a problem, some of my users however...
    Do they need to install the client side spout for that to work? (seems obvious but its way easier to ask you in stead of testing myself).

    edit: 'spoutcraft users', spoutcraft is purily the client side eh...?
    I'd still like to know where you guys were able to cut so much bandwidth away...
  14. Offline


    Spoutcraft is the client and Spout is the plugin. Your users need to be using the Spoutcraft client and Spout plugin. It's achieved because they dev of CraftProxy is also the dev in Spout. Thank @Raphfrk .
  15. Offline


    Isn't it because the Spoutcraft client cache chunk on their side? I wonder if there could be incremental chunk syncing between the clients and the proxy to further reduce the bw usage.
  16. Offline


  17. Offline


    Spout doesn't actually cache entire chunks. It caches chunk pieces (2048 byte sequences). When the server sends a chunk, it breaks it up into 40 pieces. If any of the pieces are known to the client, it just sends the hash of the piece (8 bytes) instead of the piece. (It actually is slightly more complex since MC then compresses the resulting data).

    This means that the client doesn't have a clean version of every chunk to do an XOR against (for incremental caching).

    If you change 1 block in a chunk, it only needs to send 1/40th of the chunk anyway, so most of the benefit of incremental is already there.

    If Notch had a stable world generator, his best bet would be to send the differences between the generated world and the actual world. However, given that it keeps changing, the server would have to keep a store of the world as each client knows it.

    The way I did it was so that the server doesn't have to remember anything about any of the clients. The client just tells the server the hashes of pieces that are likely to be in the world (stored in the cache file near the used pieces) and the server assumes that the client knows about any pieces that it sends in full.

    If the server sends the client a piece of all air, then it can just send the data for that piece once. In fact, it can do it in the same chunk:

    Chunk data
    piece 1: AIR
    piece 2: hash(AIR)
    piece 3: hash(AIR)
    piece 7: ground level
    Piece 15: bedrock
    Piece 16 - 39: Light levels and meta data

    This means that even without client hints, it can cache data.

    Also, by doing it this way, server admins don't have to worry that the cache is a record of their world. You can't regenerate a world from the cache data.
Thread Status:
Not open for further replies.

Share This Page