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.
@GravelSocks
Set the auto save interval in the configuration to a value higher than 400 ticks (20 seconds) to use async auto saving.
Seems pretty straightforward to me. :) But yeah, it shouldn't be severe and shouldn't output a stacktrace, I'll fix that in the next version.
Re-uploaded it on GitHub, so you can redownload it from there if you want to get rid of that message.
I see this error:
[code]11:09:01 [WARNING] [NoLagg] Failed to initialize async auto saver! 11:09:01 [SEVERE] java.lang.Exception: Interval is too low for async auto saving to work. Set the auto save interval in the configuration to a value h igher than 400 ticks (20 seconds) to use async auto saving. 11:09:01 [SEVERE] at com.bergerkiller.bukkit.nolagg.AsyncAutoSave.init(AsyncAutoSave.java:22) 11:09:01 [SEVERE] at com.bergerkiller.bukkit.nolagg.NoLagg.onEnable(NoLagg.java:135) 11:09:01 [SEVERE] at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:174) 11:09:01 [SEVERE] at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:957) 11:09:01 [SEVERE] at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:280) 11:09:01 [SEVERE] at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:171) 11:09:01 [SEVERE] at org.bukkit.craftbukkit.CraftServer.enablePlugins(CraftServer.java:154) 11:09:01 [SEVERE] at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:297) 11:09:01 [SEVERE] at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:284) 11:09:01 [SEVERE] at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:152) 11:09:01 [SEVERE] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:348) 11:09:01 [SEVERE] at net.minecraft.server.ThreadServerApplication.run(SourceFile:417) 11:09:01 [INFO] [NoLagg] Native sync auto-save feature is used instead. 11:09:01 [INFO] [NoLagg] Auto-save field bound to 'u'! 11:09:01 [INFO] NoLagg version 1.46 is enabled![/code]
It looks like it loaded, but probably shouldn't generate SEVERE errors just because it can't do async saves. Also, it would be helpful if the error message were more specific about what file/variable to adjust.
@th3controller
At that moment you think: oow I uploaded it 20 minutes ago, I'll just re-upload. But obviously some people download it right at that moment...xd
(for some reason I spot the bugs the moment I uploaded them)
Lmao you should do 1.45.X since I'm getting so confused. Just add another decimal so people won't get confused when you try to fix or update that version. Btw thanks again for the hard work!
just a heads-up: didn't upload 1.45 here for a reason. :) (guess ewized did, no problem though)
I had to re-upload 1.45 around 7 times today, but the latest version appears to be cured from all the CPU issues and chunk saving errors. Use the github link for 1.45 (I'll re-upload it here), it now appears to be safe to use. If you encounter high CPU, use /nolagg monitor to see what is the cause of this. Can be a high chunk load rate or an overloaded chunk saving queue, or way too many mobs. You can see all of this using that command. Invoke it again to stop monitoring.
If you use an auto-save interval lower than 400, it will not use async auto-saving. This, because the auto-save saves all chunks. Having values lower than that will revert back to the built-in auto-save, which saves 24 chunks at a time.
@kahlilnc
No however it is in the process of being fixed. The latest NoLagg 1.45 build on the bukkit thread causes high CPU usage. Stick with 1.44 for now.
Does the "autoSaveInterval" only do a "save-all" or something else, too? Can I also disable it with setting the value to "-1"? It's just a little unclear. Also the changelog says it would be at 40 ticks and not 200 as it is by default at the moment. And if it's a save-all every 200 ticks (10 sec) that would be a little too short, don't you think so? I've got half an hour for my save-all, but as I don't know if it is a save-all, I'll not say anything and use the feature still (with a higher amount).
ya the new chunk restored stuff is lagging the server and obliterating the console messages too. Every ten seconds it fills up with a hundred messages. I've turned those features off via the config. Kinda getting tired of these updates being untested.
Mmm does nolaggchunk cause any cpu/ram probs ? O_O
High CPU usage for latest build (1.45) my server started using about 85%-100%. Please fix! For now reverting back to 1.44
Amazing plugin! Tested out the TNT delay and tried to detonate about 10,000 blocks of TNT and I saw no changes in the CPU usage or memory usage. However a feature suggestion or an add-on might be a chunk loader? A in depth information is when this is activate on a designated world it will load ungenerated chunks so for future adventurers they will not cause lag. Also a feature might be added to this feature is you can also set a maximum amount of chunks loaded so for example I type "/nolagg chunkload survival 20" it will only try to make the server generate 20 chunks in the world. I hope my suggestion does get implemented since this plugin has a name "No Lagg".
@botskonet
Re-uploaded the plugin to fix that issue, forgot to clear the entities in the chunks before saving them. After reviewing the native coding of Minecraft I found out this is required.
So with the latest version, we had an insane amount of mobs spawning - it quickly went from 1,000 to 9,000 mobs. I reverted to the older plugin but now mobs are dropping items in stacks of 64.
@bruceweed
Try the newer 1.44 version, I believe lag was caused by massive chunk unloads, which is fixed there by saving chunks asynchronously. If this fails, you can always disable chunk unload delays, as it seems to be the main cause.
I don't know about anyone else, but with 1.43 I'm still getting some pretty nasty lagg.
@bergerkiller
Thanks for the quick update but that's a problem i've been experiencing from a couple versions. Seems wierd that you didn't notice that before! :D
@bergerkiller
Can you add it so that '/nolagg clear all' doesnt kill trained wolves?
@w000rm
Sorry about that, I re-uploaded it around 20 minutes after init. uploading it. You probably have to re-download it. (it had to do with the explosion counter not getting reset)
EDIT
Another update, fixing some issues with the chunk unload delay feature and missing support for Showcase, which was wiped during the previous performance enhancements.
@bergerkiller
Is it normal that explosions do not do sound/particles but just destroy the blocks? How do I change that?
@mcheaven probably going to drop that idea. TPS is very unstable and is more influenced by block changes than physics. Would be unfair to the poor physics to punish them for their nasty blocky neighbours.
Also, uploaded 1.42 fixing a lot of issues people had with 1.41. Note that the TNT feature won't spawn block drops in 1.9 prerelease.