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.
@scmuon
Now fixed, see the .3 download on GitHub.
@bergerkiller
Eagerly awaiting a release now : ) Would be nice to be able to kill the lag on the server.
@TechJawa
Bug confirmed, the trimming function was failing. Improved it just now to make it 'understand' parent nodes when it's children are read. In short: the 'global' etc nodes were removed because it was never directly read.
Still got to update the sending queue a bit more, right now it uses changes in this value, while working to the lowest value is what you want.
@bergerkiller
Cool, reducing network usage is our biggest priority on our server, Our CPU and RAM are extremely powerful but we're on a throttled data connection and only have a small slice of bandwidth to work with at the current time, so NoLagg should help us.
Is the default configuration optimal though, or is there some things we need to change? I looked into it for a moment or two but it was quite daunting at first.
@bergerkiller
Well, now it's not only not limiting critters, but actively deleting my SpawnLimits section whenever it runs, EVEN IF I make no changes, merely copying the configuration page verbatim. I suspect the configuration page might need an update?
@scmuon
Kinda strange, since NoLagg also uses a scheduled task to regularly clear entities from the world based on the limits. What if you set a world default limit instead? (could be all mobs are concentrated on one world now and other worlds are empty)
Also, updated to v1.52.2, introducing player-specific sending rates. It will optimize the chunk send rate for players based on their connection quality.
@bergerkiller
I am unable to successfully limit mobs with 1.50.0 and 1.51, and 1.52.1.
I also tried a dedicate mob-limiting plugin, which also failed, so I presumed the problem to be a bukkit api change. Yaaay bukkit.
Perhaps I've configured it wrong? Here's my config:
bufferItems: true bufferTNT: true useSpawnLimits: true useChunkUnloadDelay: false tntDetonationInterval: 1 tntDetonationRate: 10 explosionRate: 5 maxItemsPerChunk: 40 formItemStacks: true chunkUnloadDelay: 2000 autoSaveInterval: 3000 updateInterval: 40 stackRadius: 2.0 stackThreshold: 2 monitorInterval: 100 autoFixLighting: false chunkSending: enabled: true interval: 2 rate: 1 boost: 25 spawnlimits: global: mob: 2600 animal: 800 monster: 1800
@mcheaven
That's only 100 seconds, not even 2 minutes, so that is perfectly fine. In 2 minutes you have a lot of room for players walking around, which is good. Do make sure you have a decent autosaver (or interval), because loaded chunks don't save by itself :)
@wooperjm Use /nolagg monitor to see what is going on. It is possible that a large amount of chunks is currently undergoing lighting fixes, causing the queue to be full. Just wait it out is what I recommend. If you see a ridiculously high value (4000+) then stop your players from exploring new area's if possible and make it finish off it's task.
I'm seeing this message:
[WARNING] [NoLagg] Skipping auto-save for worlds: Saving queue overloaded.
What does it mean and any recommendations?
Thanks!
@bergerkiller
okay, yes I dont like Ptweaks.. so how smart would it be to set the chunkunloaddelay to 100000?
And Im just using Rb of craftbukkit.. :/ so I cant use your updates
@mcheaven
Just so you all know, NoLagg had quite a huge update yesterday, which made NoLaggChunks obsolete. The add-on was giving more problems than actual help, the new system directly alters the chunk sending mechanism: it doesn't even have to intercept the chunks any more.
Believe me, if you have 12GB of RAM, you have more than enough. Most of NoLagg's features aid CPU, network and Disk usage, RAM is a story aside. You can't simply reduce RAM usage, where does the data go then? To disk? Horrible idea.
RAM usage is not controlled by NoLagg, as this is impossible. (PTweaks says he does, is a nasty lie and I am not going to play using his rules of stating features that don't exist. It's impossible, simple as that)
@scmuon What version are you using right now?
I'm unable to get the entity limiter to actually limit mobs in the latest craftbukkit. Known issue?
@mcheaven
Also wondering this, we're running on a dedicated server which is getting a 12GB RAM upgrade soon. I have plenty of RAM, but buffering TNT ignites and stuff would be great still.
@bergerkiller can you please tell me, what is the best configuration if I have more then enough ram?
@Sk8Sanctified
Updated it to v1.51, fixing a lot of issues in NoLaggChunks. NoLaggChunks is now gone, instead all of it's features are now in NoLagg. Everything except customizable view distance is in there, you can even set the amount of chunks to 'boost'-send to the client when he just joined a world.
If you had issues with NoLaggChunks (and I can imagine), please update it NOW.
hmm, seemed to have fixed itself after running a bit. I am going to change the interval also though to 15 min, sounds appropriate. Thanks you
very optional update request: for /nolagg it should show possible commands like /nolagg monitor
@Sk8Sanctified
It's normal, but do check the configuration a bit. Could be you need to re-adjust the saving interval and/or update interval. Else it could auto-save far too often, causing that CPU spike. You can use /nolagg monitor to check what is going on, if you see a large 'to save' number, then it's saving a lot of chunks.
Getting 1.50.4 now.
Hey, I was just wondering what the minimal cpu spikes every so many seconds? I noticed this start during a 1337 version. Seems to be a lot better now as in usage %. I had to remove nolagg during 1337 because it would spike to 50-60 every 5-7 seconds or something and my cpu fan or something sounded like someone was adjusting the speed high to low. Kinda scary. Idk what it was... Anyways just curious, it now spikes around 8-35% eehh :/ is this normal? Sometimes it's low which is cool. When it's not spiking it seems a lot lower then before.
CB:1550 Spout:582 NoLagg: 1.50.3