Inactive [FIX/ADMN] NoLagg v1.88.1 - Prevent common lag causes on your server [2338]

Discussion in 'Inactive/Unsupported Plugins' started by bergerkiller, Sep 17, 2011.

  1. Offline

    bergerkiller

    I had already made this plugin before after having a major lag issue. (lots of torches being filled, turned into items, lag for 20 minutes) It also works for 1060.

    Some feature ideas are taken over from PerformanceTweaks by @LexManos so some credit goes to him. Code, however, written from scratch by me. :)

    Important:

    If you get a warning message [NoLagg TLN] followed up with a stack trace in the log, this has to do with the main thread not having responded within 10 seconds. When a plugin takes more than this time to enable, it will show that. 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.

    NoLagg's features in a nutshell

    Description

    Prevent lag caused by many items

    Every time an item gets spawned, it is buffered per chunk. For example, you spawn 30 items using Q and the maximum allowed items per chunk is 20, then the 10 remaining items are not spawned. They are spawned as soon the item count in this chunk is < 20 again.

    Read more...

    Form item stacks - fully automatically

    Whenever two or more (configurable) items or experience orbs get near each other, they form a single stack of that item type. If someone drops 64 dirt blocks on the ground using Q, it will show a single item of 64 dirt instead.

    Read more...

    Prevent lag caused by TNT

    This plugin takes over tnt ignition caused by explosions. When exploding stacks of tnt, it does not rush all tnts into a single tick, but detonate them nicely in sync. This results in pretty awesome fireworks. :)

    Read more...

    Prevent lag caused by lighting glitches

    Whenever a new chunk is generated, it's lighting information is generated and all nearby players receive the updated chunk data. If the auto-method fails, you can use /nolagg fix to do it manually. This fixing fixes, for example, dark spots in and around caves lagging the client.

    Read more...

    Set entity spawn limits

    You can set a spawn limit on virtually every entity in the game. From mobs to items to TNT. Only thing being excluded is Players, since I can't simply kick someone 'like that'. :)
    Note: It removes already spawned entities too. So, if you want to keep your animals alive, don't set mob or animal limits, or it will possibly clear your farm animals. (or you can disable the spawn limiter all together)

    I recommend finding an alternative plugin for this instead. Removing entities after they are spawned causes more lag than it prevents!

    Global auto-saver

    Since asynchronous chunk saving is now implemented internally, it is no longer a problem to save entire worlds frequently. You can set auto-save intervals in the configuration. If used with an interval higher than 400 ticks (20 seconds) it will use a scheduled task instead of the internal saver to prevent chunks never getting saved. Another benefit is that player information is also auto-saved, preventing your players losing their inventory state.

    New chunk sending mechanics

    Instead of loading chunks all around the player, the player direction is used to load the visible chunks first. This means that players can expect chunks in front of them to load quickly, while chunks on the sides take a bit longer to appear. When the player looks into another direction, the direction changes and thus the new visible chunks get loaded first. Only if all chunks ahead of the player are loaded, chunks around the player are sent. This all can be configured using a simple minimum and maximum sending rate.

    Read more...

    Examining the server tick rate

    If you encounter very low tick rates and you want to find out what plugin is causing it, you can use the examine component to find it out. It comes with a graphic viewer, which makes bug tracking the easiest thing ever.

    Read more...

    Prevent cross-thread access for events

    As it seems, some plugins don't follow the rules and use Bukkit methods in another thread. This plugin will notify you and cancel if possible whenever this happens so other plugins understand their mistake. If you encounter a lot of spam in the console, first check the stack trace for the plugin that caused the error. Report this error to the author or remove the plugin, if you have questions you are free to ask.



    Configuration (on BukkitDev)

    Commands and Permissions (on BukkitDev)

    Synchronized code accessed by another thread? (BukkitDev)



    Media



    Video by brandcool86


    FAQ

    - Help I experience missing chunks
    If you are using Spout, don't use Reloads. This is also the reason why Spout added a warning when a player tries to reload the server. Not using Spout, then it's a bug which you can report.

    - Can this plugin be used with PTweaks
    (this message was really old...) Yes, they are compatible, but if certain features overlap, make sure you disable these features in either plugin.

    - I get a warning about the async auto save and interval. Wat do?
    Change the autoSaveInterval value in the configuration to a value higher than 400, like 600. The warning is to prevent endless autosaves to occur, clogging up CPU.

    - I have experienced CPU usage
    CPU usage is not the same as lag. NoLagg uses multiple (2-3) extra threads to prevent tick and network lag. If a lot has to be done, it does this quicker, but this takes more CPU obviously.

    - I have lag when using NoLagg
    See also the FAQ above. Explain what type of lag you have: tick lag, client lag, network lag and/or 'block placement' lag. You can use /nolagg monitor to check the tick rate. If this is normal (>15), then you have network lag. Client lag is when the FPS drops. Block placement lag is lag when the tick rate is normal and other network messages, like chat, are instant.

    - WorldEdit causes lag...
    YES because it is unsafe to take over the main thread while another plugin is having hold over it. I can try fixing this, but it could ultimately lead to some serious concurrency exceptions. Don't expect this to be implemented very soon...

    - Do spawn limits interfere with mob-spawning plugins like MobArena?
    No, it does not. It only limits mobs spawned by 'nature': all custom creature spawns are ignored throughout the run of the plugin. Only after you reload will it lose track of these entities and will it remove custom-spawned mobs. If you use MobArena, be sure nothing is going on when you reload the server.

    - Does item stacking interfere with Showcase or BleedingMobs?
    It supports Showcase and ShowcaseStandalone entirely. (showcased items are completely ignored at all times) The same applies to the 'particles' created by the BleedingMobs plugin. Know of a plugin where it stacks items which should not be stacked? Post the plugin name so I can add support. You are an owner and want to add support? Only having a function in your plugin to check if an item is 'ignored' is enough.

    - Can this plugin be used with Chunk Manager
    If you want to use the Chunk Manager with Nolagg, disable the chunk sending of Nolagg first. If you don't do that, this plugin will do that by itself and send a warning in the log. Of course, compare the results first. :)

    - What are the best settings if I have a lot of RAM memory?
    This plugin does not deal with reduced RAM memory. If I could, I would, but you simply can't reduce the amount of memory Java uses. This data is locked and secured, so I can't simply throw away bits of data or write and read data from/to disk. Any plugin claiming to reduce RAM usage on a server, is probably 'garbage collecting'. This fakes having less RAM usage by removing unused data, but Java does this by itself as well once it hits a certain limit. All these plugins will do is make the Garbage Collector run in overdrive, which will only kill your tick rate and/or CPU speeds. A bad thing.

    - I get a lot of 'Synchronized code accessed from another thread' errors
    Find out what plugin is acting up by inspecting the stack trace. If the plugin that causes this is inactive, all you can do is wait for a refurnished version or someone to fix it for you, or use an alternative plugin. If it's still under development, notify the author of this, it IS an error caused by that plugin. If you can't find out the cause, PM me or post in this thread.


    Before you begin writing a lag issue

    This is very important, just posting a 'it causuz lagz und shitz' won't do, won't help and I won't be able to help you any further either. Question is if I even want to help you, if you post such a message without anything worth looking at. Things to include in your message:
    - Errors in the log if possible
    - What CB version you use and what NoLagg version you use
    - When this lag occurs. Tick rate drop in general?
    - The configuration you used when running this plugin
    - What type of lag if applicable. Options are: tick lag, client lag, network lag (see above)

    Important links

    NoLagg Download page and others at Dev Bukkit
    View the source code of NoLagg at GitHub

    Use an archive extracting program (WinRar, WinZip) to open the archive.

    TODO-list:
    - Add option to disable physics when the tick delay becomes too high

    Changelog

    Show your appreciation for my plugins by donating
    [​IMG]
     
  2. Offline

    kaasinees

    I simply do not agree. Entities do not need to be cached in a server-client model.
     
  3. Offline

    bergerkiller

    kaasinees entities? No! I am talking of blocks. Chunks. The world.

    Timestamps: yes, for when last written to file.
    And it won't reduce chunk lag. Why?
    1. The world is dynamic, it is not a static multiplayer map clients can download
    2. The world is infinitely large. Update every single chunk on this entire world the client has visited?
    3. Why use a timestamp if odds are the chunk will change 99% of the time? Only adds timestamp packet data retrieval and sending.
    4. Out-of-sync issues.
    5. Memory. Not every client has enough space on the HDD to store entire worlds for every server they join.

    Real-world-example why it simply doesn't work:
    You want to know what color the grass is on every grass field on this planet
     
  4. Offline

    Jaein

    I must say I am in love with the "Form item stacks - fully automatically"
    so many people have been griefing the server by dropping endless stacks of dirt. I just tried Q dropping 12 stacks and it's still flawless.
     
  5. Offline

    sagethor

    kaasinees
    Implementing it would take a much more complex solution, methinks. Minecraft is quite complex, and a simple timestamp will definitely not do the trick. The gains would be minimal compared to the effort required.

    If you're willing to make the little tweaks and adjustments to streamline your server and find out what you really want, then you might get as good results as I do, running a server under 10 MB of RAM.

    And let's be honest here, partially loaded chunks aren't exactly a game killer; lowering view distance makes it less of an issue. If you want better performance and specs, get a better server.
     
  6. Offline

    Averus

    all this, my server better run with all off, i use nolagg only for "clearall"
    (chunkSending off too, i cant conf it right, allways holes in the world)
    and i told you again, if chose Dynmap or Nolagg i chose 1st, coz all my 80 000 ppl/month like Dynmap,
    Dynmap + Nolagg = lagg gg gg gg ggs.
    and you stupid spawn limiter! you kill mob, server spawn it, you kill it again. server spawn it again, so stupid, it drops 1-3 ticks with 50+ ppl and 4500 mobs (spawn limit DOTN use updateInterval! if you set updateInterval=3000 and mob limit =3 you cant see more than 10-15 mobs try it)
    you need spawn mobs, not kill it, listen, in server config file mobs=off and spawn mobs with plugin, its 1000 times better and no ticks rates down.

    if you want do good plugin you need super good log file with stats and speeds, now Nolagg dont have it. (its so simle, just log you "monitor" option or doo somth better)

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jul 14, 2016
  7. Offline

    Averus

    so why i have tick rate drop then use mob limiter? you cant explain that but you dont belive me, server still spawn mobs and this is cause rate drop.

    where? and why you dont sugest use it too see nolagg lags
     
  8. Offline

    Epics

    It seems that with DynMap and NoLagg, the chunks load slower even if you have no flags set to render on DynMap.
    While with just NoLagg they load relatively faster.
     
  9. Offline

    TheChinski

    Hello,

    A few days ago my server begun lagging for no reason. I have tried many a plugin but to no prevail... I have taken a snapshot of the /Nolagg Stats in the vain hope someone out there might be able to spot the problem:

    [​IMG]

    The world loads stupidly slow and commands take ages to get through. Any help would be very much appreciated!
    Oh, and I keep getting this message in the console when someones online every couple of seconds:-

    [WARNING] Can't keep up! Did the system time change, or is the server overloaded?

    Thanks in advance :D
     
  10. Offline

    Gamesters

    i put the .jar files in my plugin folder but when i run m server it gives me and error msg. i asked someone about it and they said its something messed up with the .jar file. can u help me? it also does this with izone.

    it is working now, the only thing is that i do /nolagg stats and it says you will recieve snapshot shortly... but then i never get it

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jul 14, 2016
  11. Offline

    o0AzzA0o

    The plugin developer knows that limiting mobs costs more resources then it saves ;p Averus there are no plugins atm that limit mobs in a manner that saves resources from my experience. I Noticed some time ago in bukkit changelog that they have added something related to mobs and tickrate. Im not sure if its in api to use for plugin developers or its something that can be adjusted in config. All i can say is that i think very soon you will see a method of limiting mobs that doesnt cost the resources.
     
    bergerkiller and Averus like this.
  12. Offline

    bergerkiller

    o0AzzA0o yup, I am aware of that. The point is, as long as I have to do this limiting AFTER they are spawned, it will cause tick lag. What is actually needed in Bukkit is a 'canSpawn' property for EACH mob type on the server to prevent spawning in the first place. Only having 'animalSpawning' and 'monsterSpawning' is simply not precise enough to really work...
     
  13. Offline

    o0AzzA0o

    could you do anything with this ? http://ci.bukkit.org/job/dev-Bukkit/1305/

    ps can see your working towards a new version i am rly looking forward to the plugin performance monitor if it can do what i assume it will :)
     
  14. Offline

    bergerkiller

    GUI.png

    Results are generated; now adding the actual file loader.
     
  15. Offline

    strontkever


    Bbbbump!
     
  16. Offline

    shanko

    Code:
    18.02 10:03:40 [Server] INFO NoLagg version 1.64 enabled!
    18.02 10:03:40 [Server] WARNING Update NoLagg to a newer version or look for an older build of CraftBukkit
    18.02 10:03:40 [Server] WARNING Plugin 'NoLagg' v1.64 is too old to run on CraftBukkit build 1938
    18.02 10:03:40 [Server] INFO [NoLagg] Loading NoLagg v1.64.
    18.02 10:03:40 [Server] INFO BKCommonLib version 1.06 enabled!
    18.02 10:03:40 [Server] INFO [BKCommonLib] Loading BKCommonLib v1.06.

    What should I do?
     
  17. Offline

    bergerkiller

    shanko will release an improved version fairly soon. Need to finish off the GUI.

    shanko mmh is there any physical TNT in the re-set map? Because, since NoLagg buffers this TNT, it could detonate a block that was still pending detonation. (you need to use /lag clearall tnt to stop detonating TNT)

    EDIT

    Uploaded 1.65 on GitHub. Now uploading it to BukkitDev.
    You can now use /lag examine ([optional tick duration]) to examine the server. If you have tick rate issues, you can use that command to generate a report. You can use 'ExamReader' under nolagg/logs to open and browse the file.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Feb 15, 2019
  18. Offline

    shanko

    Okay awesome... Also there is a very strange bug going on in my server.. Not sure if its fixed in the new version but random explosions are going off EVERYWHERE. My server uses Tommytonys war plugin so the maps get reset, soon as it gets reset explosions start popping up everywhere destroying it... its kind of cool but uh yeah cant be good for lag?

    I just realized its not that but the fact that the cool down for the spell Explode is somehow gone because of this plugin... using Magicspells


    edit:Other than this bug it actually works great and much better than when I tried it in the past

    doubleedit: http://dev.bukkit.org/server-mods/magicspells/

    that is the magicspells plugin, your plugin removes the cooldowns and reagents for explode spells

    Any idea if I can disable anything in the config temporarily to fix this?

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jul 14, 2016
  19. Offline

    bergerkiller

    shanko afraid not, but I know where the issue lies...or I guess.

    Also, thanks to my new logging tool, I spotted a performance issue in NoLagg:
    [​IMG]

    It is taking him far too long to unload the chunks; the duration should be around 0.1 per tick or so.
     
  20. Offline

    shanko

    Who is Him? If you mean tommytony the issue wasn't with the map resetting but with the explode spell from MagicSpells
     
  21. Offline

    bergerkiller

    shanko with him I mean the plugin itself. (or is it a she? hehe)

    Anyway, the logger GUI is pretty much finished now, it will be packaged in the next version. (in the NoLagg/logs folder)
     
    Don Redhorse likes this.
  22. Offline

    shanko

    aah I see! Well yeah go tell him about it! Id love if it were less laggy :p, Anyway were you able to fix the magicspells issue on your side or do I have to ask nisovin about it?

    its not in the map at all berger, its not a problem with TNT or the map, its the explode spells players can use from MagicSpells, the plugin somehow makes it so no reagents(mana) is used and so there is no cooldown, it must intercept the spell when it creates an explosion and negate the effects of it somehow? The random explosions were from players using it over and over again and abusing the glitch, I thought it was jsut random explosions but it was players abusing the fact htat it no longer had a cooldown lol

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 2, 2019
  23. Offline

    Domochevsky

    Hey,
    so just coming from the craftbukkit++ thread, i'm wondering: Is it possible for you to alter the growth checking ranges around players? I hear that it is quite large and causes plenty of resource usage as is. (But i am merely going off of the opinions of those more versed in this.)
     
  24. Offline

    bergerkiller

    Domochevsky No, that is something that HAS to be done in the server itself. (or I'll have to use a lot of reflection to swap worlds around, which can cause lots of glitches and even data corruption)

    Leave that to the CB++ team :)
     
  25. Offline

    shanko

    seems like NoLagg is conflicting with MobArena

    also I get this error on /lag examine

    Code:
    server overloaded?
    20.02 17:01:22 [Server] INFO [VanishNoPacket] MrAsain reappeared.
    20.02 17:01:22 [Server] INFO    ... 14 more
    20.02 17:01:22 [Server] INFO    at org.bukkit.command.PluginCommand.execute(PluginCommand.java:40)
    20.02 17:01:22 [Server] INFO    at com.bergerkiller.bukkit.common.PluginBase.onCommand(PluginBase.java:253)
    20.02 17:01:22 [Server] INFO    at com.bergerkiller.bukkit.nolagg.NoLagg.command(NoLagg.java:524)
    20.02 17:01:22 [Server] INFO    at com.bergerkiller.bukkit.nolagg.logging.PluginLogger.start(PluginLogger.java:96)
    20.02 17:01:22 [Server] INFO Caused by: java.lang.NoSuchMethodError: org.bukkit.plugin.TimedRegisteredListener.<init>(Lorg/bukkit/event/Listener;Lorg/bukkit/plugin/EventExecutor;Lorg/bukkit/event/EventPriority;Lorg/bukkit/plugin/Plugin;)V
    20.02 17:01:22 [Server] INFO    at net.minecraft.server.ThreadServerApplication.run(SourceFile:465)
    20.02 17:01:22 [Server] INFO    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:435)
    20.02 17:01:22 [Server] INFO    at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:537)
    20.02 17:01:22 [Server] INFO    at net.minecraft.server.NetworkListenThread.a(NetworkListenThread.java:78)
    20.02 17:01:22 [Server] INFO    at org.getspout.spout.SpoutNetServerHandler.a(SpoutNetServerHandler.java:552)
    20.02 17:01:22 [Server] INFO    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:100)
    20.02 17:01:22 [Server] INFO    at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
    20.02 17:01:22 [Server] INFO    at net.minecraft.server.Packet3Chat.handle(Packet3Chat.java:33)
    20.02 17:01:22 [Server] INFO    at org.getspout.spout.SpoutNetServerHandler.a(SpoutNetServerHandler.java:176)
    20.02 17:01:22 [Server] INFO    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:732)
    20.02 17:01:22 [Server] INFO    at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:744)
    20.02 17:01:22 [Server] INFO    at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandler.java:784)
    20.02 17:01:22 [Server] INFO    at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:402)
    20.02 17:01:22 [Server] INFO    at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:168)
    20.02 17:01:22 [Server] INFO    at org.bukkit.command.PluginCommand.execute(PluginCommand.java:42)
    20.02 17:01:22 [Server] INFO org.bukkit.command.CommandException: Unhandled exception executing command 'lag' in plugin NoLagg v1.65
    20.02 17:01:22 [Server] SEVERE null
     
  26. Offline

    bergerkiller

    shanko use the newer build found on GitHub. And how exactly does it conflict? It doesn't ignore mobs spawned by MobArena? Or something else?
     
  27. Offline

    shanko

    Yeah, no mobs are spawning
     
  28. Offline

    migsthegod

    Also, your examination tool is cool. Good way to see which plugins need to be fixed.
    However, it is not working with the latest builds (r5+)
     
  29. Offline

    bergerkiller

    shanko undoubtedly, but until the new R5 is official I will try to fix support for other plugins first. I have no idea what else will change in R5...
     
  30. Offline

    monir

    When i installed this plugin people lost items when they trown them away and blocks dont drops items. I installed this plugin and i let it be default settings i didnt change anything how do i know how i can set this right?
     
  31. Offline

    bergerkiller

    monir first of all, use /lag clearall items command to clear all dropped items from the worlds. If that doesn't work out, increase the max amount of items per chunk, or disable buffering alltogether (not recommended)
     

Share This Page