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 Jun 29, 2013@Paxination Just do /nolagg gc This will call Garbage Collector so the chuncks that are not being used will be unloaded and other stuff that isnt being used
-
View User Profile
-
Send Message
Posted Jun 28, 2013new error? 2013-06-28 21:41:26 [WARNING] [NoLagg] Task #71 for NoLagg v1.90.0 generated an exception java.util.ConcurrentModificationException at java.util.WeakHashMap$HashIterator.nextEntry(WeakHashMap.java:882) at java.util.WeakHashMap$ValueIterator.next(WeakHashMap.java:909) at com.bergerkiller.bukkit.nolagg.itembuffer.ItemMap$1.run(ItemMap.java:86) at org.bukkit.craftbukkit.v1_5_R3.scheduler.CraftTask.run(CraftTask.java:58) at org.bukkit.craftbukkit.v1_5_R3.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:344) at net.minecraft.server.v1_5_R3.MinecraftServer.r(MinecraftServer.java:509) at net.minecraft.server.v1_5_R3.DedicatedServer.r(DedicatedServer.java:227) at net.minecraft.server.v1_5_R3.MinecraftServer.q(MinecraftServer.java:472) at net.minecraft.server.v1_5_R3.MinecraftServer.run(MinecraftServer.java:404) at net.minecraft.server.v1_5_R3.ThreadServerApplication.run(SourceFile:573)
-
View User Profile
-
Send Message
Posted Jun 28, 2013@naikobass
What plugins are you running?
We had the same issue and it turned out to be Dynmap.
What your getting is nolagg letting you know that something is causing the main thread to lag a bit. In our case it was the plugin Dynmap. Maybe if you posted a list of your plugins on your server we could help you pick out the culprit, or at least give you a list of which ones that might be doing it.
This isnt a NoLagg issue, its actually a NoLagg feature. If you dont want to see the warning again, you can turn it off in the config.
-
View User Profile
-
Send Message
Posted Jun 28, 2013We have 8 cores.
Also, is there a command to force unload these chunks? We are up to 6k now!
If there isnt, maybe that could be added in a future release?
-
View User Profile
-
Send Message
Posted Jun 28, 2013Hi, How i can fix this error ?
2013-06-28 19:23:46 [WARNING] [Server] The main thread failed to respond after 10 seconds 2013-06-28 19:23:46 [WARNING] [Server] What follows is the stack trace of the main thread 2013-06-28 19:23:46 [WARNING] [Server] at java.util.ArrayList.indexOf(Unknown Source) 2013-06-28 19:23:46 [WARNING] [Server] at java.util.ArrayList.contains(Unknown Source) 2013-06-28 19:23:46 [WARNING] [Server] at java.util.ArrayList.batchRemove(Unknown Source) 2013-06-28 19:23:46 [WARNING] [Server] at java.util.ArrayList.removeAll(Unknown Source) 2013-06-28 19:23:46 [WARNING] [Server] at net.minecraft.server.v1_5_R3.World.tickEntities(World.java:1181) 2013-06-28 19:23:46 [WARNING] [Server] at net.minecraft.server.v1_5_R3.WorldServer.tickEntities(WorldServer.java:480) 2013-06-28 19:23:46 [WARNING] [Server] at net.minecraft.server.v1_5_R3.MinecraftServer.r(MinecraftServer.java:563) 2013-06-28 19:23:46 [WARNING] [Server] at net.minecraft.server.v1_5_R3.DedicatedServer.r(DedicatedServer.java:226) 2013-06-28 19:23:46 [WARNING] [Server] at net.minecraft.server.v1_5_R3.MinecraftServer.q(MinecraftServer.java:477) 2013-06-28 19:23:46 [WARNING] [Server] at net.minecraft.server.v1_5_R3.MinecraftServer.run(MinecraftServer.java:410) 2013-06-28 19:23:46 [WARNING] [Server] at net.minecraft.server.v1_5_R3.ThreadServerApplication.run(SourceFile:573)
2013-06-28 19:24:38 [WARNING] [Server] The main thread failed to respond after 10 seconds 2013-06-28 19:24:38 [WARNING] [Server] What follows is the stack trace of the main thread 2013-06-28 19:24:38 [WARNING] [Server] at java.util.ArrayList.indexOf(Unknown Source) 2013-06-28 19:24:38 [WARNING] [Server] at java.util.ArrayList.contains(Unknown Source) 2013-06-28 19:24:38 [WARNING] [Server] at java.util.ArrayList.batchRemove(Unknown Source) 2013-06-28 19:24:38 [WARNING] [Server] at java.util.ArrayList.removeAll(Unknown Source) 2013-06-28 19:24:38 [WARNING] [Server] at net.minecraft.server.v1_5_R3.World.tickEntities(World.java:1181) 2013-06-28 19:24:38 [WARNING] [Server] at net.minecraft.server.v1_5_R3.WorldServer.tickEntities(WorldServer.java:480) 2013-06-28 19:24:38 [WARNING] [Server] at net.minecraft.server.v1_5_R3.MinecraftServer.r(MinecraftServer.java:563) 2013-06-28 19:24:38 [WARNING] [Server] at net.minecraft.server.v1_5_R3.DedicatedServer.r(DedicatedServer.java:226) 2013-06-28 19:24:38 [WARNING] [Server] at net.minecraft.server.v1_5_R3.MinecraftServer.q(MinecraftServer.java:477) 2013-06-28 19:24:38 [WARNING] [Server] at net.minecraft.server.v1_5_R3.MinecraftServer.run(MinecraftServer.java:410) 2013-06-28 19:24:38 [WARNING] [Server] at net.minecraft.server.v1_5_R3.ThreadServerApplication.run(SourceFile:573)
Loop and loop this error.... Help me please..._
NoLagg-1.90.0.jar -> 05/14 BKCommonLib-1.52-SNAPSHOT.jar -> 06/28
Thanks...
-
View User Profile
-
Send Message
Posted Jun 28, 2013@Paxination Depends on how many cores your CPU has. I recommend no more than 3-4 threads, more than that is kinda pointless.
-
View User Profile
-
Send Message
Posted Jun 27, 2013So how many threads would you suggest then?
-
View User Profile
-
Send Message
Posted Jun 26, 2013@Paxination No, not really. For 30 players the processing time isn't all that bad though. Also note that this processing time can not be avoided: when not using NoLagg the processing time is moved to the server's default logic.
-
View User Profile
-
Send Message
Posted Jun 26, 201330+ players. So increasing threads for this wont help it?
-
View User Profile
-
Send Message
Posted Jun 26, 2013@Paxination How many players are on the server? Chunk buffering won't really reduce processing time of that task, since all time is spent sending chunks (which includes creating the packets to spawn all entities/signs in the chunk)
-
View User Profile
-
Send Message
Posted Jun 25, 2013Total duration: 3912.622 ms / 500 ticks Average duration: 7.825 ms/tick Selected task: Task #9 Plugin: NoLagg Location: com.bergerkiller.bukkit.nolagg.chunks.ChunkSendQueue$ChunkSendingTask Execution count: 499
I have threads set to 10. Should I increase it? 30+ players normally, as high as 50 at times. What is the general rule for threads for chunk sending?
-
View User Profile
-
Send Message
Posted Jun 25, 2013@bergerkiller
I'll look deeper on Limit and see what is causing that. To remove them, i need run: /lag clearall (entity type?)
-
View User Profile
-
Send Message
Posted Jun 25, 2013@CosmicVoyager There was some bug of this a while ago. Delete the permissiondefaults.yml and reboot, that should fix it. Or remove the redundant nodes.
@rfsantos1996 The 'jobs' plugin is taking up a significant amount of processing time. The remainder is 'entity tick', which is as high as it is because you have 10000 entities on the server. You may be forced to reduce the amount of entities on the server by limiting them. Since 1.5 K are mobs, then the remainder could be items. See if /lag clearall items helps. So yeah, like Paxination said: look into item stacking/buffering to see if that helps. Having 2000+ item frames seems kinda absurd, so I don't know about that. Another possibility is vehicles such as minecarts or boats.
-
View User Profile
-
Send Message
Posted Jun 25, 2013@Paxination
I use Libigot, and I didnt know that this could be helpful even with item and exp merge on bukkit.yml...
Well, i will enable this and test. I have 40-55 on the weekend. Item frames and other things are disabled. And not too much, I didnt enable too much redstone (only simple engines)
-
View User Profile
-
Send Message
Posted Jun 25, 2013@rfsantos1996
Well first off, in your config you have...
This would help. What this does is take similar items near each other and make stacks of them so there is less entities in your world. Minecraft allready does this, but NoLagg improves on it.
Also, entities can be animals, villagers, utility mobs, ambient mobs (aka bats), squids, drops, falling blocks...
And not sure if the plugin your using is counting these, but technically signs and item frames are considered entities as well, and the items you put in item frames.
Are there a lot of automatic farms on your server? Those can cause this as the drops from those farms are now harvested with hoppers and that requires moving those drops with water over the hoppers. melon, pumpkin, egg and sugar cane farms all do this.
How many players are on your server during its peak time?
-
View User Profile
-
Send Message
Posted Jun 25, 2013Can you help me? http://i.imgur.com/fkwr1gc.png This is my config.yml: http://pastebin.com/R1PieKa6 You can see the mobs here: http://aikar.co/timings.php?url=5799072 (this timings was without NoLagg)
I have 9.5k entities, but I have 1.5k mobs (/killall command), how can I clear this? ;-;
-
View User Profile
-
Send Message
Posted Jun 25, 2013Why is everything listed twice in PermissionDefaults.yml?
Example:
reload: default: op description: Allows a player to reload NoLagg
-
View User Profile
-
Send Message
Posted Jun 24, 2013Also, this....
I have threads set to 10 for chunksending. And this is with pregenerated worlds and about 30+ users at the time of that.
-
View User Profile
-
Send Message
Posted Jun 24, 2013Yeah I love the examiner. Nvm, I figured out how to see which plugins are canceling it and it says 0 (0%)
So other than redstone circuitry what else could do it?
Is there a command to force unload those chunks?
-
View User Profile
-
Send Message
Posted Jun 24, 2013@Paxination Yeah sorry about the documentation, it's quite a lot of things to keep track of. I will have to add some information about this, it's a common question. The first value (5675) is the total amount of loaded chunks right now. The next value (5387 U) is the total amount of chunks that 'could' be unloaded, since there are no players around that need it. The other values are changes in chunk count (green is loading, yellow is generating, red is unloading) and the chunks the lighting component (if enabled) is currently processing on.
Now why are chunks not unloading? Could be a plugin you have running is keeping some of these chunks loaded (for example: some sort of redstone circuitry that is looping) or it could be other reasons. You can use the examiner to see what plugins are cancelling the ChunkUnloadEvent to find out what plugin is causing these issues.
The error is unrelated to BKCommonLib as all function calls point to server methods (the hooks shown in the stack trace redirect). My guess is that the server had to perform one long process and ended that right at the 9.5 second mark...so then it continues processing normally and at 10 seconds it shows that message.