NoLagg

Version: 1.90.4 | CB 1.7.2
Quote from lenis0012:NoLagg has not been updated since 1.7.10, for more info, check BKCommonLib
Description
NoLagg is made out of multiple completely separate components which you can enable and disable freely. Together they offer:
- Send chunks more gracefully with lowered network stress and reduced processing spikes Read more...
- Remove entities, resend chunks in case of chunk holes and clean up server memory Read more...
- Examine server tick rate performance with deep view into per-tick processes of the server Read more...
- Stop a large amount of items from spawning and spawn at a later time to avoid frozen clients Read more...
- Stack items with a configurable per-world radius Read more...
- Fix lighting errors that cause clients to recalculate lighting (and thus lag) Read more...
- Keep track of server performance such as entities, tick rate, memory and more Read more...
- Fix various bugs the server has (Patches component)
- Schedule autosaves and force data to be written to disk to prevent data loss on server crash (Saving component)
- Limit the amount of entities allowed to spawn per world or globally Read more...
- Watch events closely to warn when plugins execute main-thread methods from another thread Read more...
- Show a detailed message explaining the cause for a server freeze (lock) [read more]
- New TNT execution algortithm that is not only more efficient, but also avoids server freezes Read more...
Important
When first installing NoLagg, open up config.yml and disable components you do not need. This is very important, as some components may conflict with other plugins you use, or may not function on the type of demand you have. If you get a warning message [Severe] followed up with a stack trace in the log, this has to do with the main thread not having responded within 10 seconds. 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. If NoLagg DOES show up in there, it is a bug you should report.
FAQ
Separating into jar files
NoLagg consists of multiple components you can individually enable and disable. Reasons for not publishing it as a separate jar file for every component can be read here. Please don't ask to separate the components, I will just link you to here.
Spigot server
Not all components are needed when you use the Spigot server. The ItemStacker, ItemBuffer, Spawn Limiter, Thread Checker and Thread Lock Notifier components are not needed, since Spigot has it's own implementations to deal with that. If you still wish to use one of these components, you can, but it's best to disable the Spigot alternative then.
The other components (such as TNT, Chunks, Lighting, Common, etc.) are not implemented in Spigot (yet?) and offer additional functionality.
PTweaks
Since people keep asking about this, I went ahead and compared the two plugins. I am not going to discuss which is better in functionality, I'm just going to state which features overlap and which do not. Both plugins offer a TNT-lag solving solution, feel free to choose which solution you like better. (the solutions are different) Both plugins also offer a way to change when and how chunks are saved, NoLagg adds to this that you can configure when the server writes data to disk. PTweaks offers a way of showing used memory, NoLagg Monitor too with a bit more information. Again, preference. Chunk Persistence is something PTweaks offers and NoLagg does not. Reason I excluded it from NoLagg is that the implementation used up more processing power than that it solved (I did have this for a while). If you want to give it a try, PTweaks is your answer. Monster Limiter is incorporated in NoLagg as well but then for all entities, and more options. ChunkEdits is a tricky one: NoLagg chunks does something similar, with the difference being that it also changes at what rate chunks are sent, which is the main feature NoLagg chunks offers. In addition, the ability to increase the amount of threads running to process chunk packets and the re-using of packet raw data offers some benefits PTweaks does not offer.
Then there are a lot of other features NoLagg has and PTweaks does not, such as examining server tick rate, item stacker, item buffer, fixing lighting, cleaning up server memory, resending chunks, removing entities on command and others (see description).
In short: Both plugins offer some overlapping features, and you need to pay close attention to the configuration of PTweaks and NoLagg and disable things that conflict. Having two TNT explosion altering plugins is going to have strange results, for example. Compare the functionality, decide, and enable in NoLagg what you do not want in PTweaks, and vice versa.
NoLagg showing up in error stack traces
The examine component inserts various hooks into the server to gather measurements. Specifically, you will find that the following lines show up now and then. These hook classes do absolutely nothing when not examining and can not be the cause for any issues, unless the stack trace ends there (first line after the exception shows this stack trace)
- org.timedbukkit.craftbukkit.*
- com.bergerkiller.bukkit.common.internal.ChunkProviderServerHook
Video
Here is a video by BlueDevonMovies (lenis0012):
Metrics
This plugin sends server count statistics to MCStats.org. You can (globally) opt out in the PluginMetrics/config.yml file.







-
View User Profile
-
Send Message
Posted Feb 20, 2012@HighlifeTTU Buffered chunk loader has been removed, so that setting can be removed as well.
Mob spawner limits all work. (see the configuration page, I simply didn't have the time to write a page dedicated to spawn limits yet)
Mob spawner spawn limits work the same, except that it is for the mob spawner blocks.
-
View User Profile
-
Send Message
Posted Feb 20, 2012@weja93
12000? I have like 45000 chunks loaded all the time :O
-
View User Profile
-
Send Message
Posted Feb 20, 2012Any comment on the mob spawner limits? :)
And to confirm, that would mean:
useChunkUnloadDelay should be set to false?
Also - CPU usage is my biggest concern at the moment. I can buy more memory from my host, but I can't get a better CPU.
useBufferedChunkLoading: true
Does the buffered Chunk loading increase CPU usage to reduce memory usage? Would disabling this reduce CPU usage but increase memory?
Any other setting tweaks that offer improved CPU performance in lieu of reduced memory would be helpful. Thanks in advance.
-
View User Profile
-
Send Message
Posted Feb 20, 2012@HighlifeTTU @weja93 I investigated the chunk unload issue. I managed to bring it down to CraftBukkit itself...
The chunk unload event is spammed endlessly. Plugins that cancel this event will have to do this every single tick from now on. (maybe to force unload or something?) I suspect a bug in the chunk provider, which now keeps the chunk queued for unloading when the event is cancelled.
This causes a tremendous amount of tick lag on the server, and since it fires so often, the chunk unload delay started to fail. It is impossible for me to fix this right now...
Even though it is spammed, it still manages to deal with it pretty well. 0.34 ms can be considered low for 1000 chunk unload events being fired every tick...
So, since I can't fix this on my side, just disable the unload delays for now. It should bring down the large cpu usage and tick drop caused by this event spam.
-
View User Profile
-
Send Message
Posted Feb 20, 2012Damn chunk persist turned on automatically after update. I had 3 days crazy lag and crashes because I had 12000 chunks loaded in memory... Then I realized this caused it. Those settings should be diabled by default :)
Great plugin though. I love it.
-
View User Profile
-
Send Message
Posted Feb 20, 2012Berger. This plugin is so amazing. I can't praise you enough. Couple questions:
For the tick examiner, I'm getting a lot of garbled text when I view it. Is this supposed to happen? I can work through it no issue, but want to make sure its not something with my server.
Mob spawn limiters: I noticed the page is a "todo" item. Is this fully implemented? How exactly does it work? I'm trying my best to rid the server of any mob farms... it just creates unnecessary lag and is a pretty lame grind... I tripled XP as a result, but if this actually does a per chunk calculation versus looking at mobspawner entities, it could be exactly what I need. Even if I remove all mob spawners, players still build huge dark rooms with water to funnel mobs in. In my ideal world, I'd want these limited as to prevent huge amounts of entities in any chunk.
Thanks again. The examine thing came at a perfect time when my server is reaching its CPU limits and I'm trying to nail down what plugins are using the most CPU.
-
View User Profile
-
Send Message
Posted Feb 19, 2012-
View User Profile
-
Send Message
Posted Feb 19, 2012@FatFreeSMP Then it is confirmed; the unload delay is flawed and results in chunks never unloaded. Disable chunk unload delays until this is fixed. I'll do some debugging on it tomorrow... (it does explain the high amount of chunk unload event calls I got when no one was online...)
-
View User Profile
-
Send Message
Posted Feb 19, 2012-
View User Profile
-
Send Message
Posted Feb 19, 2012the last 2 builds are ruining my server. ram usage has increased from about 1.1gb to over 2gb, crashing my server constantly. Its only a problem I've had with the last 2 builds.
-
View User Profile
-
Send Message
Posted Feb 19, 2012@FatFreeSMP NoLagg does store chunks in the chunk meta bit. Let me check if it is properly disposed of...
EDIT
Chunk disposing seems to be working...but I did replace the map<long, ChunkMeta> by the LongHashtable. I'll check all calls to this new collection type. Other than that, just disable NoLagg/orebfuscator and check if it works out. Chunk meta is the only thing that is always active when running NoLagg, so everything leads to that. I verified that I didn't store the actual chunk, but I do store a list of entities.
EDIT2
Not the case, but I did spot that I re-set the chunk last accessed time when it gets unloaded. This can cause issues with plugins that force-unload chunks at a set interval. Did any of you use such a plugin, and/or did you use chunk unload delays? I'll be upload a temp version on GitHub which addresses this problem.
-
View User Profile
-
Send Message
Posted Feb 19, 2012I too have noticed greatly increased RAM usage with 1.65.. Which seems to suggest a memory leak. I'll try 1.66, to see if it also has this issue..
Just confirming the problem..
-
View User Profile
-
Send Message
Posted Feb 19, 2012-
View User Profile
-
Send Message
Posted Feb 19, 2012@morizuki Yes, but the /lag examine version will fail for 1846. Everything else is fine. (it will shout out a warning though, you can ignore that)
@mcheaven Do report it to mcMMO, because it is very easy to spam log in/out on a server. With mcMMO this can cause a lot of server lag. (I see you have a plugin against it too)
LWC...yeah. You can report that the redstone event took significant time to process, but best is to test it out in real practice first. Attach a redstone circuit to the door you don't have permission for and toggle the powered state really fast. Check if this causes tick lag on the server. If not, no need to report.
Since you had 17 players I don't think residence is a problem. (0.34 ms for 17 players, would be 3,4 ms for 170 players, I mean, what are we talking about?)
-
View User Profile
-
Send Message
Posted Feb 19, 2012@bergerkiller
there where 17 players online and 8 npc's should I report what you said to the plugin dev's?
-
View User Profile
-
Send Message
Posted Feb 19, 2012Can I still use the Updated on even I'm CB1846?
-
View User Profile
-
Send Message
Posted Feb 19, 2012@mcheaven man I love this tool, finally possible to see the performance impact of plugins!
You have some serious lag spikes, but most are caused by other plugins...
Did you know McMMO spends 5 ms whenever someone logs in or out of your server? (note: 1 tick can process 50 ms of data, so mcMmo uses up 10% of that tick) The event doesn't fire much, but it can be significant if someone is logging in and out really fast. (bot)
LWC spent a staggering 8 ms on a redstone event (I suppose when toggling a door?) If this is the case, someone could easily cause a lot of lag by spam-right-clicking a door really fast for a long time...
Residence adds a lot of background noise; the player move event takes 0.35 ms to handle in some cases. When using quite a lot of players (not sure how many were online now), it could cause issues.
NoLagg performed pretty well, the only noticeable issue is the update task, but fortunately the interval at which this lag spike happens can be adjusted. Still, I would really wish to see it a bit lower...even if this 1.5 ms spike fires every 30 ticks.
-
View User Profile
-
Send Message
Posted Feb 19, 2012okay here it is http://mcheaven.com/2012_02_00-20_34_00.exam but I am using craftbukkit plus plus too..
-
View User Profile
-
Send Message
Posted Feb 19, 2012@bergerkiller
I*ll do it :)
-
View User Profile
-
Send Message
Posted Feb 19, 2012@Gnintendo Nah, the feature that causes it can't be disabled really. What it does is tell the plugin when to get rid of the chunk meta data, something that HAS to be done at some point.
I still need someone to examine the server, so I can check how bad the performance is affected by this...so please...use /lag examine and send me the .exam file it generates.