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.
When someone teleports from one world to anouther using Multiverse-Core the console is spamed with this and all the worlds have random chunks from everyother world. If i remove NoLagg the problem stops
11:56:47 [INFO] Attempted to place a tile entity (net.minecraft.server.TileEntit yChest@2c3aeaa0) at 85,17,-134 (AIR) where there was no entity tile! 11:56:52 [INFO] Attempted to place a tile entity (net.minecraft.server.TileEntit yFurnace@59e5e807) at 87,17,-134 (AIR) where there was no entity tile! 11:56:52 [INFO] Attempted to place a tile entity (net.minecraft.server.TileEntit yFurnace@4e451ad) at 86,17,-134 (AIR) where there was no entity tile! 11:56:52 [INFO] Attempted to place a tile entity (net.minecraft.server.TileEntit yChest@29ae375d) at 84,17,-134 (AIR) where there was no entity tile!
@Wondrej
@Wondrej Did you try running your server without the plugin for some time and see if you still get the socket.overflow error?
I ask that because i am having the same socket.overflow error and it was before I installed NoLagg so for me I dont think its the plugins fault rather your slow internet or CB itself.
Currently nolagg causes kicking out players with socket.overflow error, I had to remove it completly and I'll be waiting for RB and your version for it..
the new one seems to make bandwidth usage higher
@bergerkiller
Wondering why I'm getting this... 2012-01-18 20:51:12 [WARNING] [NoLagg] Failed to fix all lighting issues in chunk [8/12/world_nether] If my config says this... autoFixLighting: false
Huge error (with default config and 1.58): http://pastebin.com/QSNRvrAp
After this I set the thread thing to 0 and it still didn't work
@bergerkiller Thank you very much for your work on this. What your doing seems very important and has such a great benefit and impact for us server owners.
I am kinda busy at the moment, but expect some fixes real soon. To get rid of the overflow disconnections, you can try setting the sendThreadCount to 0. It then fully runs on the main thread and is as it was before.
So far I've had no chunk teleportation/scrambling/corruption while running my local server, but for some reason others do. If you can explain what steps to perform to reproduce it, it would be greatly appreciated...as I have no idea where to start looking.
(does it happen when the server saves when stopping and then reloads? Does it happen when exploring? When joining/leaving? In all chunks or certain chunks?)
Also, I found that some Spout packet plugins store the packets, and re-send later on. This will cause some odd glitches where chunk data becomes invalidated. (I saw it happening in the latest Ore obfuscator). I'll remove the spout packet listener call and target specific plugins instead to prevent these confusions.
The slow sending in the latest version is because of the (failed) multi-chunk compression threads. It is locking up all the time... (thread A waits for thread B to finish sending the packet and instantly sends, causing the packet buffer to overflow)
I had the same problems as @wow4201 on both 1.57-9 and 1.58 today on all users (even with default settings). When I tested it the deployment yesterday I used another 1..56 or 1.57 (don't know which) on an identical (copied) server with the latest dev build of bukkit and I didn't get the disconnects. I also never had an issue with NoLagg before (awesome work, thanks). I'm thinking about going back to the earlier version from backup, because right now I can't stand the slow chunk loading of vanilla :/
@wow4201
This happens to everyone and reoccurs every 10-15sec there after.
bufferItems: false maxItemsPerChunk: 40 bufferTNT: true tntDetonationInterval: 1 tntDetonationRate: 10 explosionRate: 5 useSpawnLimits: false spawnlimits: default: mob: 1000 useChunkUnloadDelay: true chunkUnloadDelay: 10000 formItemStacks: false stackRadius: 1.0 stackThreshold: 2 ignoredItemTypes: - DIAMOND_PICKAXE autoSaveInterval: 40000000 updateInterval: 200 monitorInterval: 40 autoFixLighting: false useBufferedChunkLoading: true chunkSending: enabled: true minRate: 0.1 maxRate: 0.2 boost: 0 sendThreadCount: 4
When using this plugin with 1.1 and recommended build. Everything loads fine but after 30 or so users connect. Minecraft errors out and says End of stream
2012-01-18 16:13:35 [INFO] Cathullu587 lost connection: disconnect.overflow 2012-01-18 16:13:35 [INFO] Connection reset 2012-01-18 16:13:35 [SEVERE] at java.net.SocketOutputStream.socketWrite(Unknown Source) 2012-01-18 16:13:35 [SEVERE] at java.net.SocketOutputStream.write(Unknown Source) 2012-01-18 16:13:35 [SEVERE] at java.io.BufferedOutputStream.flushBuffer(Unknown Source) 2012-01-18 16:13:35 [SEVERE] at java.io.BufferedOutputStream.flush(Unknown Source) 2012-01-18 16:13:35 [SEVERE] at java.io.DataOutputStream.flush(Unknown Source) 2012-01-18 16:13:35 [SEVERE] at net.minecraft.server.NetworkWriterThread.run(SourceFile:103) 2012-01-18 16:13:35 [INFO] Connection reset
I set 4 Threads to run on nolagg plugin
I really want to run this plugin again, but I can't until I get some concrete confirmation that the chunk corruption problem is fixed. Is what caused it known? Has the cause been fixed? I haven't see the author acknowledge the problem since he started it "appears" to be fixed a few versions ago. I know the problem was not fixed as of that version from personal experience.
@NateN34
I have differential backups of my server data every 10 minutes. I was able to fix it but I had to roll back about 16 hours, in hour increments, until I found data that wasn't corrupted anywhere in the world.
Thank god for backups!
@Pantheis
Yeah, same here. I had Nether chunks in my normal world and snow biomes were mismatched all over the world. Was a big mess to fix and I am not sure if it is fixed yet.
2012-01-19 00:45:41 [SEVERE] [Configuration] An error occured while saving to file 'plugins/NoLagg/config.yml': 2012-01-19 00:45:41 [SEVERE] java.io.FileNotFoundException: plugins/NoLagg/config.yml (Permission denied) 2012-01-19 00:45:41 [SEVERE] at java.io.FileOutputStream.open(Native Method) 2012-01-19 00:45:41 [SEVERE] at java.io.FileOutputStream.<init>(FileOutputStream.java:209) 2012-01-19 00:45:41 [SEVERE] at java.io.FileOutputStream.<init>(FileOutputStream.java:160) 2012-01-19 00:45:41 [SEVERE] at java.io.FileWriter.<init>(FileWriter.java:90) 2012-01-19 00:45:41 [SEVERE] at org.bukkit.configuration.file.FileConfiguration.save(FileConfiguration.java:56) 2012-01-19 00:45:41 [SEVERE] at com.bergerkiller.bukkit.config.FileConfiguration.save(FileConfiguration.java:42) 2012-01-19 00:45:41 [SEVERE] at com.bergerkiller.bukkit.nolagg.NoLagg.loadConfig(NoLagg.java:223) 2012-01-19 00:45:41 [SEVERE] at com.bergerkiller.bukkit.nolagg.NoLagg.onEnable(NoLagg.java:110) 2012-01-19 00:45:41 [SEVERE] at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:232) 2012-01-19 00:45:41 [SEVERE] at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:1034) 2012-01-19 00:45:41 [SEVERE] at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:252) 2012-01-19 00:45:41 [SEVERE] at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:190) 2012-01-19 00:45:41 [SEVERE] at org.bukkit.craftbukkit.CraftServer.enablePlugins(CraftServer.java:173) 2012-01-19 00:45:41 [SEVERE] at org.bukkit.craftbukkit.CraftServer.<init>(CraftServer.java:132) 2012-01-19 00:45:41 [SEVERE] at net.minecraft.server.ServerConfigurationManager.<init>(ServerConfigurationManager.java:52) 2012-01-19 00:45:41 [SEVERE] at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:148) 2012-01-19 00:45:41 [SEVERE] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:407) 2012-01-19 00:45:41 [SEVERE] at net.minecraft.server.ThreadServerApplication.run(SourceFile:465) 2012-01-19 00:45:41 [SEVERE] [NoLagg] Failed to initialize performance logger file stream: 2012-01-19 00:45:41 [SEVERE] java.io.FileNotFoundException: plugins/NoLagg/log.txt (Permission denied) 2012-01-19 00:45:41 [SEVERE] at java.io.FileOutputStream.openAppend(Native Method) 2012-01-19 00:45:41 [SEVERE] at java.io.FileOutputStream.<init>(FileOutputStream.java:207) 2012-01-19 00:45:41 [SEVERE] at java.io.FileWriter.<init>(FileWriter.java:107) 2012-01-19 00:45:41 [SEVERE] at com.bergerkiller.bukkit.nolagg.PerformanceMonitor.init(PerformanceMonitor.java:67) 2012-01-19 00:45:41 [SEVERE] at com.bergerkiller.bukkit.nolagg.NoLagg.onEnable(NoLagg.java:115) 2012-01-19 00:45:41 [SEVERE] at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:232) 2012-01-19 00:45:41 [SEVERE] at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:1034) 2012-01-19 00:45:41 [SEVERE] at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:252) 2012-01-19 00:45:41 [SEVERE] at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:190) 2012-01-19 00:45:41 [SEVERE] at org.bukkit.craftbukkit.CraftServer.enablePlugins(CraftServer.java:173) 2012-01-19 00:45:41 [SEVERE] at org.bukkit.craftbukkit.CraftServer.<init>(CraftServer.java:132) 2012-01-19 00:45:41 [SEVERE] at net.minecraft.server.ServerConfigurationManager.<init>(ServerConfigurationManager.java:52) 2012-01-19 00:45:41 [SEVERE] at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:148) 2012-01-19 00:45:41 [SEVERE] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:407) 2012-01-19 00:45:41 [SEVERE] at net.minecraft.server.ThreadServerApplication.run(SourceFile:465)
Not exactly sure what to do about this, i tried reinstalling but to no avail, any help would be greatly appreciated guys :)
@Kilere Meh Ptweaks is not needed alongside NoLagg, unless you can spot a feature in PTweaks I have not worked out, extended and improved yet :)
Also, updated to 1.58 (I know, lots of updates recently...) Fixes those Spout-dependency errors you were having.
@Kilere
dont use ptweaks
Using this and ptweaks, lag terminated :)
@deleted_7554077 Sorry about that error, I had put the Spout-sensitive code under a try-catch throwable block ,sadly that didn't work out for the class loader. Spout is used to send the packets to after packet creation and before sending. (support for plugins like Ore obfuscator)
"Since the latest update (1.51), the technique of @Thulinma is used (altering and using the chunk queue), which made the need for Spout go away and made everything smoother in general. Great thanks go for him for that idea :)"
Then why am i getting a Spout error message when it should be removed?
CB 1784
2012-01-18 15:20:06 [INFO] [NoLagg] Loading NoLagg v1.57.9
2012-01-18 15:20:06 [SEVERE] Error occurred while enabling NoLagg v1.57.9 (Is it up to date?): org/getspout/spout/packet/standard/MCCraftPacket
java.lang.NoClassDefFoundError org/getspout/spout/packet/standard/MCCraftPacket
at com.bergerkiller.bukkit.nolagg.NoLagg.loadConfig(NoLagg.java:188)
at com.bergerkiller.bukkit.nolagg.NoLagg.onEnable(NoLagg.java:109)
at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:232)
at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:1034)
at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:252)
at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:190)
at org.bukkit.craftbukkit.CraftServer.enablePlugins(CraftServer.java:173)
at org.bukkit.craftbukkit.CraftServer.<init>(CraftServer.java:132)
at net.minecraft.server.ServerConfigurationManager.<init>(ServerConfigurationManager.java:52)
at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:148)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:407)
at net.minecraft.server.ThreadServerApplication.run(SourceFile:465)
Caused by: java.lang.ClassNotFoundException org.getspout.spout.packet.standard.MCCraftPacket
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:41)
at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:29)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 12 more
2012-01-18 15:20:54 [INFO] [NoLagg] Unloading NoLagg v1.57.9
2012-01-18 15:20:54 [SEVERE] Error occurred while disabling NoLagg v1.57.9 (Is it up to date?): null
java.lang.NullPointerException
at com.bergerkiller.bukkit.nolagg.sending.ChunkSendQueue.executeSyncedOps(ChunkSendQueue.java:39)
at com.bergerkiller.bukkit.nolagg.sending.ChunkSendQueue.deinit(ChunkSendQueue.java:77)
at com.bergerkiller.bukkit.nolagg.NoLagg.onDisable(NoLagg.java:150)
at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:234)
at org.bukkit.plugin.java.JavaPluginLoader.disablePlugin(JavaPluginLoader.java:1060)
at org.bukkit.plugin.SimplePluginManager.disablePlugin(SimplePluginManager.java:270)
at org.bukkit.plugin.SimplePluginManager.disablePlugins(SimplePluginManager.java:263)
at org.bukkit.craftbukkit.CraftServer.disablePlugins(CraftServer.java:185)
at net.minecraft.server.MinecraftServer.stop(MinecraftServer.java:384)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:464)
at net.minecraft.server.ThreadServerApplication.run(SourceFile:465)
Also a ticket section would be awesome :D
Thanks