Inactive [FIX/ADMN] NoLagg v1.88.1 - Prevent common lag causes on your server [2338]

Discussion in 'Inactive/Unsupported Plugins' started by bergerkiller, Sep 17, 2011.

  1. Offline


    I had already made this plugin before after having a major lag issue. (lots of torches being filled, turned into items, lag for 20 minutes) It also works for 1060.

    Some feature ideas are taken over from PerformanceTweaks by @LexManos so some credit goes to him. Code, however, written from scratch by me. :)


    If you get a warning message [NoLagg TLN] followed up with a stack trace in the log, this has to do with the main thread not having responded within 10 seconds. When a plugin takes more than this time to enable, it will show that. The warning is NOT an error and is no bug, and not a bug related to NoLagg. To disable this feature, disable 'threadlocknotifier' in the config.yml. This feature is mainly intended to notify you what plugin is causing the server to freeze, may it ever happen. It is used to debug plugins in general, as they may get stuck for whatever reason.

    NoLagg's features in a nutshell


    Prevent lag caused by many items

    Every time an item gets spawned, it is buffered per chunk. For example, you spawn 30 items using Q and the maximum allowed items per chunk is 20, then the 10 remaining items are not spawned. They are spawned as soon the item count in this chunk is < 20 again.


    Form item stacks - fully automatically

    Whenever two or more (configurable) items or experience orbs get near each other, they form a single stack of that item type. If someone drops 64 dirt blocks on the ground using Q, it will show a single item of 64 dirt instead.


    Prevent lag caused by TNT

    This plugin takes over tnt ignition caused by explosions. When exploding stacks of tnt, it does not rush all tnts into a single tick, but detonate them nicely in sync. This results in pretty awesome fireworks. :)


    Prevent lag caused by lighting glitches

    Whenever a new chunk is generated, it's lighting information is generated and all nearby players receive the updated chunk data. If the auto-method fails, you can use /nolagg fix to do it manually. This fixing fixes, for example, dark spots in and around caves lagging the client.


    Set entity spawn limits

    You can set a spawn limit on virtually every entity in the game. From mobs to items to TNT. Only thing being excluded is Players, since I can't simply kick someone 'like that'. :)
    Note: It removes already spawned entities too. So, if you want to keep your animals alive, don't set mob or animal limits, or it will possibly clear your farm animals. (or you can disable the spawn limiter all together)

    I recommend finding an alternative plugin for this instead. Removing entities after they are spawned causes more lag than it prevents!

    Global auto-saver

    Since asynchronous chunk saving is now implemented internally, it is no longer a problem to save entire worlds frequently. You can set auto-save intervals in the configuration. If used with an interval higher than 400 ticks (20 seconds) it will use a scheduled task instead of the internal saver to prevent chunks never getting saved. Another benefit is that player information is also auto-saved, preventing your players losing their inventory state.

    New chunk sending mechanics

    Instead of loading chunks all around the player, the player direction is used to load the visible chunks first. This means that players can expect chunks in front of them to load quickly, while chunks on the sides take a bit longer to appear. When the player looks into another direction, the direction changes and thus the new visible chunks get loaded first. Only if all chunks ahead of the player are loaded, chunks around the player are sent. This all can be configured using a simple minimum and maximum sending rate.


    Examining the server tick rate

    If you encounter very low tick rates and you want to find out what plugin is causing it, you can use the examine component to find it out. It comes with a graphic viewer, which makes bug tracking the easiest thing ever.


    Prevent cross-thread access for events

    As it seems, some plugins don't follow the rules and use Bukkit methods in another thread. This plugin will notify you and cancel if possible whenever this happens so other plugins understand their mistake. If you encounter a lot of spam in the console, first check the stack trace for the plugin that caused the error. Report this error to the author or remove the plugin, if you have questions you are free to ask.

    Configuration (on BukkitDev)

    Commands and Permissions (on BukkitDev)

    Synchronized code accessed by another thread? (BukkitDev)


    Video by brandcool86


    - Help I experience missing chunks
    If you are using Spout, don't use Reloads. This is also the reason why Spout added a warning when a player tries to reload the server. Not using Spout, then it's a bug which you can report.

    - Can this plugin be used with PTweaks
    (this message was really old...) Yes, they are compatible, but if certain features overlap, make sure you disable these features in either plugin.

    - I get a warning about the async auto save and interval. Wat do?
    Change the autoSaveInterval value in the configuration to a value higher than 400, like 600. The warning is to prevent endless autosaves to occur, clogging up CPU.

    - I have experienced CPU usage
    CPU usage is not the same as lag. NoLagg uses multiple (2-3) extra threads to prevent tick and network lag. If a lot has to be done, it does this quicker, but this takes more CPU obviously.

    - I have lag when using NoLagg
    See also the FAQ above. Explain what type of lag you have: tick lag, client lag, network lag and/or 'block placement' lag. You can use /nolagg monitor to check the tick rate. If this is normal (>15), then you have network lag. Client lag is when the FPS drops. Block placement lag is lag when the tick rate is normal and other network messages, like chat, are instant.

    - WorldEdit causes lag...
    YES because it is unsafe to take over the main thread while another plugin is having hold over it. I can try fixing this, but it could ultimately lead to some serious concurrency exceptions. Don't expect this to be implemented very soon...

    - Do spawn limits interfere with mob-spawning plugins like MobArena?
    No, it does not. It only limits mobs spawned by 'nature': all custom creature spawns are ignored throughout the run of the plugin. Only after you reload will it lose track of these entities and will it remove custom-spawned mobs. If you use MobArena, be sure nothing is going on when you reload the server.

    - Does item stacking interfere with Showcase or BleedingMobs?
    It supports Showcase and ShowcaseStandalone entirely. (showcased items are completely ignored at all times) The same applies to the 'particles' created by the BleedingMobs plugin. Know of a plugin where it stacks items which should not be stacked? Post the plugin name so I can add support. You are an owner and want to add support? Only having a function in your plugin to check if an item is 'ignored' is enough.

    - Can this plugin be used with Chunk Manager
    If you want to use the Chunk Manager with Nolagg, disable the chunk sending of Nolagg first. If you don't do that, this plugin will do that by itself and send a warning in the log. Of course, compare the results first. :)

    - What are the best settings if I have a lot of RAM memory?
    This plugin does not deal with reduced RAM memory. If I could, I would, but you simply can't reduce the amount of memory Java uses. This data is locked and secured, so I can't simply throw away bits of data or write and read data from/to disk. Any plugin claiming to reduce RAM usage on a server, is probably 'garbage collecting'. This fakes having less RAM usage by removing unused data, but Java does this by itself as well once it hits a certain limit. All these plugins will do is make the Garbage Collector run in overdrive, which will only kill your tick rate and/or CPU speeds. A bad thing.

    - I get a lot of 'Synchronized code accessed from another thread' errors
    Find out what plugin is acting up by inspecting the stack trace. If the plugin that causes this is inactive, all you can do is wait for a refurnished version or someone to fix it for you, or use an alternative plugin. If it's still under development, notify the author of this, it IS an error caused by that plugin. If you can't find out the cause, PM me or post in this thread.

    Before you begin writing a lag issue

    This is very important, just posting a 'it causuz lagz und shitz' won't do, won't help and I won't be able to help you any further either. Question is if I even want to help you, if you post such a message without anything worth looking at. Things to include in your message:
    - Errors in the log if possible
    - What CB version you use and what NoLagg version you use
    - When this lag occurs. Tick rate drop in general?
    - The configuration you used when running this plugin
    - What type of lag if applicable. Options are: tick lag, client lag, network lag (see above)

    Important links

    NoLagg Download page and others at Dev Bukkit
    View the source code of NoLagg at GitHub

    Use an archive extracting program (WinRar, WinZip) to open the archive.

    - Add option to disable physics when the tick delay becomes too high


    Show your appreciation for my plugins by donating
  2. Offline


    NolaggChunk 1.73 is currently NOT working with Orebfuscator 1.4.1-beta4

    Edit: Should probably explain it better. Nothing is being "obfuscated" when the chunk sender from nolagg is active
  3. Offline


    It seems that NoLagg's author has removed support for Orebfuscator in his coding
    (Here, all the code has been commented out:

    Why though?

    EDIT: Oh I also had something to say.
    If there's an error, don't just stop obfuscating chunks. I'm suggesting that worst case scenario you should warn admin and/or automatically disable NoLaggChunks if anything happens and let Orebfuscator take over. If server admins have Orebfuscator, chances are that they're dealing with x-ray problems. If you simply 'remove support' for Orebfuscator because of some exception, hackers might be getting the real chunk.
  4. Offline


    Is there gonna be support for the beta build or should I downgrade?
  5. Offline


    lishid I couldn't compile because of it, so had no choice. But, support for Orebfuscator added back in 1.74 (see GitHub until it is properly uploaded on BukkitDev)

    The examine tool is now in a separate plugin and significantly improved. It can now render the graphs lagless and everything is a lot more detailed.

    ezzitthehezzit Seems all right, I guess you don't have tick rate issues then. And don't host a server using a wireless network....there is no way it can handle all of the data through thin air.

    nunber1_Master only 2 builds up, I guess you can ignore the warnings. (guess I'll remove the warnings again, it's tiresome having to reply over and OVER again that it is just a notification and it doesn't cause anything at all...)

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: Jun 6, 2019
  6. Offline


    i havent downloaded this plugin yet, but im not sure if it will help. all my players complain about ALOT of lag so im guna post all the info, and plz help me. i probably shud download the plugin first, but im not sure if its worth it.
    - no errors in log
    - CB 1.2.3 R0.1, no version of nolagg
    - players seem server is always lagging, not sure about the tick rate
    - not using this plugin
    - chat lag and small network lag, but not for host (me) just other players

  7. Offline


    ezzitthehezzit Then I recommend using NoLaggChunks, as it balances and optimizes chunk sending. This way your internet connection will be less filled with chunk packet requests that hinder the important packets (chat and block placement) from being sent.

    As I'm not sure what is going wrong, install 'NoLaggExamine.jar' and examine the server. Then open the generated report and check the tick rate. If you notice the process time/tick is hanging around 10 ms or so, you know for sure you have a problem. Find out what plugin is causing all this lag and remove it, or report it to the respective author.

    This means a network issue. Check if your DNS provider is giving you enough mbits and check all your wiring from your computer/server to the connection for bended wires or maybe even damaged wires. Old or damaged wires can cause a lot of distortion to the connection, which may also explain the lag.
  8. Offline


    well my browser speed is fine and also the computer is on wireless internet but thanks and the only plugins i have are worldedit/worldguard, essentials and essentialsspawn, worldsaver, lockette, mobarena (outdate), and permissionsbukkit. im thinking it could be mobarena
  9. Offline


    I'm using the beta build, and it says it is too old to run it (cb 2034).
  10. Offline


    what does it mean (or where should i refer to) if my ticks are at 19.5 tick (98%)?
  11. Offline


    Ok. I was thinking in my head that, 'Maybe NoLagg isn't working 100% of the time.'
    I think you should change the message to something like it might or might not work.
  12. Offline


    typing /lag or /nolagg

    says unknown sub-command!

    I am using the latest NoLaggTNT and NoLaggItemBuffer
  13. Offline


    shanko The main /lag command is in NoLagg.jar (monitor component still needs to be separated)

    nunber1_Master Nah I am going to remove the message. Else I keep on getting these comments...
  14. Offline


    ive always been hosting on a wireless network since beta 1.7 and im only having issues now. i cant even host on a wire connection my players always log in then get end of stream right away
  15. Offline


    ezzitthehezzit I don't know what the sudden change is though, it could be the new chunk format (256 height), but other than that...

    Though it seems like the connection isn't too strong...maybe something changed besides the server?
  16. Offline


    so what would you recommend I DO to fix it? something that has been helping is i boosted the ram on the server and deleted some of the unneeded plugins and the players are reporting that it is a bit better...
  17. Offline


    I got a Mob Spawning issue (as in monster spawning), again. It isn't a Multiworld thing. Yesterday (March 6, 2012) I was about to kill people. I was ready to blow up North America. I got WAY to many complaints about lack of mobs/monsters. Mobs do spawn, but not enough. When I typed /NoLagg monitor , I get 366 mobs and over 400 entities. The pretty much stay at 366.

    The Mob Spawning setting is set to false, but here is my NoLagg config:
    Here is the NoLaggChunks config:

    Other Information:
    I am running NoLagg version 1.75. This issue still happened in all NoLagg versions greater than version 1.70.
    Yes, I do have MobArena and mobs do spawn there. People haven't seem to complain about that.
    Yes, I do have OreBFusticator and the startup says it uses that for sending chunks.
    Like the information on top... yes, Mobs (really monsters) do spawn, except rarely.

    Any ideas?

    Edit: Should I remove the NoLagg.jar or something?
    OH, and I'm now getting this error with the new OreBFusticator:
  18. Offline


    bergerkiller "If you host around 100 players and have over 10K chunks loaded on average, I recommend not to use the main NoLagg.jar, as it functions best on lesser-performance servers." I'm also curious what this means. So it is best not to use NoLagg.jar but we can use everything else?
  19. Offline


    nunber1_Master Uploaded version 1.76, with updated support for Orebfuscator. Item stacker is now a separate plugin and heavily improved to run less on the main thread and use less re-generation of the item/orb lists. Now that the item stacking ability is removed from the main NoLagg, it is able to perform the general updates a lot faster.

    I couldn't find out why it limited mobs even with spawn limits disabled, since every single call to the spawn handler is blocked if it is disabled. Are you sure it's not another plugin acting up?

    I still haven't added some sort of improvement to check if a player is nearby a chunk. It currently still performs this for all players which takes fairly long, so the main NoLagg.jar is still a bit slow on high-count servers. But it is getting better. :)

    Item stacker does not have this issue, so one main reason I decided to cut it out as well. The ONLY features currently in NoLagg.jar are:
    • Spawn limiter
    • Chunk unload delay (use 1.2.3 R2 or later)
    • Auto-save changer
    • /clear command
    Ignore the item stacking settings in the config.yml of NoLagg, they are not used. Use the respective plugins' folders instead.
  20. Offline


    I'll do my testing.
  21. Offline


    Planning on Ditching the main NoLagg.jar, does this mean I need to get a auto save pluign? Does CB do this on its own? Thanks.
  22. Offline


    Puremin0rez yeah I recommend seeking a plugin more focused on auto-saving. CraftBukkit does save all required chunks every 2 seconds, but it doesn't save the player inventory states.

    sabboy update Orebfscator to the latest version, and use the latest version of NoLaggChunks. May need a re-download of NoLagg. (7 people downloaded the wrong one which I reuploaded a few secs later)

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: Mar 26, 2019
  23. Offline


  24. Offline


    rtcabooservb The /lag command is in NoLaggMonitor, together with /lag lagmem , /lag mem, /lag monitor, /lag log etc. All monitoring commands and tools are in there now.
  25. Offline


    Does NoLaggChunks work fine with CB++?
  26. Offline


    Puremin0rez I haven't tested it, but I am pretty sure it will work. Not much got changed on the netserverhandler side of things.
  27. Offline


    i am getting this error i am using the latest orevfuscator and the latest nolag and i get this

    12:42 PM [SEVERE] [NoLaggChunks] An error occured in Orebfuscator: support for this plugin had to be removed!
    12:42 PM [SEVERE] java.lang.NoClassDefFoundError: lishid/orebfuscator/utils/Calculations
    12:42 PM [SEVERE] at com.bergerkiller.bukkit.nolagg.chunks.ChunkCompressionThread.getCompressedPacket(
    12:42 PM [SEVERE] at
    12:42 PM [SEVERE] at com.bergerkiller.bukkit.common.AsyncTask$
    12:42 PM [SEVERE] Caused by: java.lang.ClassNotFoundException: lishid.orebfuscator.utils.Calculations
    12:42 PM [SEVERE] at$ Source)
    12:42 PM [SEVERE] at Method)
    12:42 PM [SEVERE] at Source)
    12:42 PM [SEVERE] at
    12:42 PM [SEVERE] at
    12:42 PM [SEVERE] at java.lang.ClassLoader.loadClass(Unknown Source)
    12:42 PM [SEVERE] ... 3 more
    12:42 PM [SEVERE] java.lang.NoClassDefFoundError: lishid/orebfuscator/utils/Calculations
    12:42 PM [SEVERE] at com.bergerkiller.bukkit.nolagg.chunks.ChunkCompressionThread.getCompressedPacket(
    12:42 PM [SEVERE] at
    12:42 PM [SEVERE] at com.bergerkiller.bukkit.common.AsyncTask$ 
  28. Offline


    i need help this plugin does not work im running craftbukkit 1.2.3 latest build and everybody on the server lags but the admin doesn't i dont know how to fix this issue i have tried NoLagg and adding more ram and deletingmy player's .dat file but nothing works i need help Thanks :)
  29. Offline


  30. Offline


    I only get that error once i log in but when it loads it says its working
  31. Offline


    nimeow321 Client lag (slow frame rate) or network lag? In the case of network lag, install NoLaggChunks and configure the chunk sending max rate in the config.yml to something low. This way the network load will be less high, at a cost of slower chunk loading.

    Noxturno not yet, I was waiting for that plugin to publish a new 1.2.3 build. I guess it's out, so expect a fix soon.

    sabboy that's because the entire Orbufscator is disabled once that error is thrown. So it never happens again. Pick up the latest NoLagg to fix it and make Orebfuscator work again.

Share This Page