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. Thanks for clearing that out. I will however wait with this plugin until I notice that I actually need it. Mainly because I have a ton of other plugins as well that I need to configure correctly and the server doesn't lag atm anyway.

    Will be back later. :)
  3. Offline


    Hey man, i got a weird error mind looking on it? i tryed with deleting nolagg, and then it worked, but as fast as i adding nolagg, i get this, and it works every second time, like if i start server once i get this, then restart it, and it works, and if i restart it again i will get this errors, please help me!
  4. Offline


    tryy3 I really have no explanation why other plugins start having all of those problems unrelated to plugins...all I can say is: try disabling all components of NoLagg in the config.yml and enable the ones you need one by one.

    Btw...that's a lot of plugins you have there...
  5. Offline


    okej i gonna try that at next plugin update i will have ^^

    Ye i having plugin updates once in a while when i add several plugins and checking if plugins is up to date ^^ but with that i know what to do with nolagg then i will have my plugin update faster xD
  6. Offline


    Sorry for reply and give you this information so late:
    Right after the huge laggs the server went out of memory....
    The server is doing that all the time now.
    It looks like that something is causing a memory-leak (I am not fit with this so I dont know if this is the right name). After removing Nolagg the server is working fine again.
    Because Nolagg worked perfectly for me before I started a new map and added some new plugins I come to the conclusion that another plugin and Nolagg are not compatible with each other.
    The new Plugins are "Citizens2 (Beta)", "NoCheatpluss", "WorldBorder", "BiomeEdit" and "Orbfuscator".
    It would be logical for me if "Orbfuscator" is incompatible because of its working with chunks... on the other hand I disabled your chunk-feature (see my config.yml).

    If I have some time I will try to check if the memory-leak appears while I am using Nolagg without Orbfuscator.

  7. Offline


    @GrullGuth It could very likely be a problem with Orebfuscator. If that plugin has a memory leak when allocating one of the hundreds of chunk buffers it can cause the server to crash, I am pretty sure of that. But orebfuscator without NoLagg should cause the same problem in the end, unless the author did something strange.
  8. Offline


    False alarm ^^ it had nothing to do with your plugin xD, i only thought it was but for some reason it looked like it was yours cuz i took it out and it worked, but when i added another plugin i got some error, and now i tested to drag out a plugin called bettershop and now it works i think it conflicted with another plugin called chest shop, thanks anyway bergerkiller now i can start using your plugin again ^^
  9. Offline


    Downloaded NoLagg and started the server, above the error.
    This is the log of the server start:

  10. Offline


    i have the plugin treeassist installed and when i chop a tree it will crash the server with this plugin installed
  11. Offline


    barry123best Tree assist is the blame here, as it breaks blocks from another thread. (while it is clearly stated that you can't alter the world from another thread) Nag him about it, although I doubt it will ever be fixed.
  12. Offline


    When i use this plugin, my donators cannot use creeper eggs? Can some 1 explain to me how i allow it?
  13. Offline


    hello i just made an account but i'm no noob i have a port forwarded server:
    Question? how can i lower my CPU usage? any idears? (server:
  14. Offline


    This plugin has worked great for us up until now, I've tried installing latest jars/files a few times now, it doesn't seem to be removing entities any more? Maybe I've done something wrong or maybe this plugin needs an update?
  15. Offline


    Can i JUST get the ITEM STACKER THINGY And NOTHING else? how can i do that? cuz i REALLY want that, just nothing else
  16. Offline


    This plugin is amazing! I found my memory leakage problem within 1 minute using /lag examine, this plugin has fixed all the problems in my server and i can now hold up to 400 player without any lag!

    @joshuadaman78 You could probably just disable some features such as chunk rendering, or item stacker. I haven't had any problems with the high CPU usage, it seems to just make your server run that much faster.

    @bugmeet Check the config
  17. Offline


    does this perform pretty much the same actions as what craftbukki++ does(any pros and cons between the two)? also does this effectively nerf using worldedit? or does the lag that you mentioned just refer to normal lag caused by worldedit? Am converting my test server from canary to something else and am trying to find something would be relatively efficient in the long run (like not needing to restart the mc server on a regular basis, etc), sorry for all of the questions lol, thanks for your help/advice though!
  18. Offline


    Well craftbukkit++ seems to have alot of problems right now, also this plugin can examine your plugins and show the higher users.
  19. Offline


    I got this error when i start my server. This is meant to read from bottom to top (I dont know if that matters). What should i do about it? Im using Multiverse for my world management stuff if that has to do with any of this. If this either doesn't have anything to do with an issue with your plugin or it is an issue with Multiverse please let me know.


    13.06 18:50:58 [Server] INFO at
    13.06 18:50:58 [Server] INFO at
    13.06 18:50:58 [Server] INFO at net.minecraft.server.MinecraftServer.init(
    13.06 18:50:58 [Server] INFO at net.minecraft.server.MinecraftServer.a(
    13.06 18:50:58 [Server] INFO at net.minecraft.server.MinecraftServer.t(
    13.06 18:50:58 [Server] INFO at org.bukkit.craftbukkit.CraftServer.enablePlugins(
    13.06 18:50:58 [Server] INFO at org.bukkit.craftbukkit.CraftServer.loadPlugin(
    13.06 18:50:58 [Server] INFO at org.bukkit.plugin.SimplePluginManager.enablePlugin(
    13.06 18:50:58 [Server] INFO at
    13.06 18:50:58 [Server] INFO at
    13.06 18:50:58 [Server] INFO at com.onarandombox.MultiverseCore.MultiverseCore.onEnable(
    13.06 18:50:58 [Server] INFO at com.onarandombox.MultiverseCore.utils.WorldManager.loadWorlds(
    13.06 18:50:58 [Server] INFO at com.onarandombox.MultiverseCore.utils.WorldManager.addWorld(
    13.06 18:50:58 [Server] INFO at com.onarandombox.MultiverseCore.utils.WorldManager.addWorld(
    13.06 18:50:58 [Server] INFO at org.bukkit.WorldCreator.createWorld(
    13.06 18:50:58 [Server] INFO at org.bukkit.Bukkit.createWorld(
    13.06 18:50:58 [Server] INFO at org.bukkit.craftbukkit.CraftServer.createWorld(
    13.06 18:50:58 [Server] INFO at org.bukkit.plugin.SimplePluginManager.callEvent(
    13.06 18:50:58 [Server] INFO at org.bukkit.plugin.RegisteredListener.callEvent(
    13.06 18:50:58 [Server] INFO at$1.execute(
    13.06 18:50:58 [Server] INFO org.bukkit.event.EventException
    13.06 18:50:58 [Server] SEVERE Could not pass event WorldLoadEvent to NoLagg
    NoLagg Config:

    # This is the configuration of NoLagg, in here you can enable or disable features as you please
    # For more information, you can visit the following websites:
    # Manages chunk loading and sending to clients using various new settings
    # Whether Chunks should be loaded on startup
    enabled: true
    # The minimum chunk sending rate (chunks/tick)
    minRate: 0.25
    # The maximum chunk sending rate (chunks/tick)
    maxRate: 2.0
    # The rate at which chunks are 'triggered' (refreshed, make visible) (trigger packets/tick)
    triggerRate: 0.5
    # If you use a plugin that depends on the net server handler for packets, disable this
    # For example, Raw Critics' Ore Obfuscation does not function with this enabled.
    # Orebfuscator is supported and works with this enabled.
    # Whether or not to use the buffered packet loader to reduce new memory allocation
    enabled: true
    # The amount of threads to use to compress the chunk packets (increase if it can't keep up)
    threadCount: 2
    # Can examine server tick rate performance
    # Whether Examine should be loaded on startup
    enabled: true
    # Can monitor and log server and player performance statistics
    # Whether Monitor should be loaded on startup
    enabled: true
    # The interval at which new performance snapshots are generated
    monitorInterval: 40
    # Whether or not to start logging server performance on startup
    startLoggingOnStartup: false
    # The server notifies players (with a permission) when the tick rate drops below the threshold
    # Enable or disable this feature
    enabled: false
    # The interval in miliseconds to send this message (1000 ms = 1 second)
    interval: 10000
    # The tick rate at which it starts broadcasting
    threshold: 15.0
    # The message to send to these players
    message: '&cThe server can''t keep up!'
    # Buffers items in chunks to prevent lag-outs because of lots of items
    # Whether ItemBuffer should be loaded on startup
    enabled: true
    # The maximum amount of items allowed per chunk
    maxItemsPerChunk: 80
    # Stacks nearby items to counter item-drop spammers and reduce item count on the server
    # Whether ItemStacker should be loaded on startup
    enabled: true
    # The block radius to look for other items when stacking
    # You can set it for multiple worlds
    radius: {}
    # Attempts to fix block and sky lighting bugs in worlds
    # Whether Lighting should be loaded on startup
    enabled: true
    # Whether or not lighting is automatically fixed when a new chunk is generated
    auto: true
    # Keeps entity counts below multiple configured thresholds
    # Whether SpawnLimiter should be loaded on startup
    enabled: true
    # The general spawn limits (natural spawning)
    # For more information, see
    # The default spawn limits per world, overridden by world limits
    mob: 800
    cow: 60
    item: 1500
    creepers: 30
    monsters: 400
    # The world-specific spawn limits
    monsters: 300
    chickens: 30
    # The global spawn limits
    mobs: 3000
    # The spawn limits for mob spawners
    # For more information, see
    # The default spawn limits per world, overridden by world limits
    mob: 300
    zombie: 30
    # The world-specific spawn limits
    cavespider: 0
    mob: 0
    # The global spawn limits
    mob: 1000
    # Replaces explosion creation with a faster version and buffers TNT ignites to prevent TNT server crashes
    # Whether TNT should be loaded on startup
    enabled: true
    # The interval (in ticks) at which TNT is detonated by explosions
    detonationInterval: 1
    # How many TNT is detonated by explosions per interval
    detonationRate: 10
    # The explosion crater size factor
    explosionRadiusFactor: 1.0
    # The amount of explosion packets to send to the clients per tick
    explosionRate: 5
    # If TNT explosions can change non-TNT blocks
    changeBlocks: true
    # Alters the way worlds are saved to reduce disk usage and to force proper saves
    # Whether Saving should be loaded on startup
    enabled: true
    # The tick interval at which the server saves automatically (20 ticks = 1 second)
    autoSaveInterval: 400
    # Whether NoLagg will attempt to write all world data to the region files at a set interval
    # This is done on another thread, so don't worry about the main thread lagging while this happens
    writeDataEnabled: true
    # The tick interval at which the server actually writes the chunk data to file (20 ticks = 1 second)
    writeDataInterval: 12000
    # Common features such as the clear and garbage collect commands
    # Whether Common should be loaded on startup
    enabled: true
    # Several shortcuts you can use for the /nolagg clear(all) command
    - monster
    - monster
    - item
    - tnt
    - egg
    - arrow
  20. Offline


    When i use this plugin, my donators cannot use creeper eggs? Can some 1 explain to me how i allow it?
  21. Offline


    I use a DaddyCheese 1GB hosted MC server, running on Craftbukkit 1.2.4.and I download NoLagg associated with this version.

    For some reason, I encounter terrible lag in our main city, and so do the other members. More than viewing lag, it's double block lag...where you try to put one block down, but it puts two down instead. It never used to do this, and I have no idea what I've done wrong.

    In the wilderness, double block lag is not an issue. Slight lag occurs, but not much. <------ Here is the NoLagg readings in the wild.

    However, in town, an area like <----This, the block lag and vision lag occur. Inside one of the homes, where the double block lag is terrible, here are the stats.

    Any ideas?

    Additional Info:
    *It's the worse inside the house I posted the stats with above
    *Everyone experiences it.
    *Here are some of my common console errors....
    "19.06 17:39:58 [Server] WARNING DisplayName is too long by 11 characters to be used on the PlayerList: §9[Empress]§7 LuckilyLuna§f" {Everyone has prefixes]
    19.06 19:10:06 [Server] WARNING Can't keep up! Did the system time change, or is the server overloaded?
    19.06 19:10:03 [Server] WARNING Can't keep up! Did the system time change, or is the server overloaded?"
    * Here is all the plugins I have installed
    *As you can see, I have WorldGuard. I have mobs, leaf decay, lava flow, TNT damage, and weather all turned off.
  22. Offline


    I have to say. good plugin saved my server a bunch a times. :D
  23. Offline


    I currently have this plugin on my bukkit server. It is working quite well, stopping all lag and such. But I have one question, the forming of "auto stacks" is as I have seen very minimal. Working only when the blocks are adjacent(or extremely close to one another) do they form an "auto stack." This is rather distressing for me, as I have been on many other servers much bigger and more popular than mine in which the dropped blocks form an "auto stack" when they are up too one or to meters away. If there is something configurable that I may use to change this then please let me know, if not may you direct me to a different plugin which can "auto stack" the dropped blocks like I described.
  24. Offline


    So is there no bugs or has this stopped being updated?
  25. Offline


    shanko was busy with other plugins for a while. Anyway, just like MyWorlds and TrainCarts, an update. I updated to 1.85. In this version I improved the chunks component some more.

    Some people requested a dynamic view distance, so there it is. You can set a view distance per amount of chunks to tweak how many chunks each player loads. Additional to that, it will now load less chunks! I disabled the internal chunk loading system and replaced it with a chunk load right before sending. This made the tick rate loss when a player enters ungenerated chunks very low, and decreased the chunk load rate significantly.

    Before when a player would fly forwards it would easily load 200 chunks. Now it will never load more chunks than set in the configuration. So, for example, a player receives chunks at 1 chunk/tick, it would load around 20 chunks per second. No matter what speed the player moves or how many chunks it would load.

    I also fixed the Timed wrapper showing up whenever a plugin had an error to prevent confusions and fixed a possible memory leak in the item stacker. (was not entirely sure, but it could be filling the same collection endlessly). Finally, I added a tick delay when sending chunks to prevent a possible 'missing chunk' issue people were having after teleporting.
    Adrenaline likes this.
  26. Offline


    awesome! thanks berger :]
  27. Offline


    I have this and Mo'Creatures runnig on my server, but nothing from Mo'Creatures spawns, any help?
    (Looked in OP, didnt see anything)
  28. Offline


    Invaders if it helps, try disabling the spawn limit component. Maybe a certain thing like mob or animal limit is causing them to be denied.
  29. Offline


    I did that after my post last night, but nothing seemed to be happening, I'll tinker with the setting some more and post back if I get it working.
    EDIT: I think its a problem with either Mo'Creatures or FML Server, not NoLagg.
  30. Offline


    update Changelog plz
  31. Offline


    Averus Changelog can be found on dev Bukkit for now (in the download). Got a bit tired of updating that changelog every day.

Share This Page