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

    bergerkiller

    @QQCucumber what settings do you use in config.yml?
     
  3. Offline

    shadoxfix

    Me and my brother are having problems with getting duped items.
    For example you stand in a fire with 20 rotten flesh then you die and pick up your items you will get 40 of them.
    The duping goes away if we remove No Lagg. (No Lagg v1.25)
    Could anyone confirm if this is a problem with the plugins or a compatibility issue? And if it is a plugins issue could you fix it?
    Thanks
     
  4. Offline

    bergerkiller

    @shadowfix can't reproduce it here (as so many times), what configuration did you use & what plugins do you use?
     
  5. Offline

    QQCucumber

    Just the default settings, I've been wiping them with every update.
     
  6. Offline

    Fr0zenfr0g

    Ok, i will try to get it to work later today, the developer of ptweaks says that does 2 plugins works werry diffrent and that his plugin is better to lower the ram amount...
     
  7. Offline

    bergerkiller

    @Fr0zenfr0g did he say how? When you cut RAM you have to either unload chunks or remove entities, and entity removal does this plugin do. I haven't seen chunks being unloaded in his plugin, only the opposite: keeping them loaded longer.

    @QQCucumber then I don't know. For some reason everything is against sending chunks manually, although I pretty much send everything required...

    Once again, don't use the add-on unless you end up having unloaded chunks everywhere. Note that you can load them manually by clicking at the chunk direction as a player.
     
  8. Offline

    QQCucumber

    Have you tested your plugin when creative mode flight is involved?
     
  9. Offline

    Fr0zenfr0g

    Nope he didnt say how and i dont want to try wath plugin that is working better, i will use this now...
     
  10. Offline

    bergerkiller

    @QQCucumber I use zombe increased speed, using the boost, while double-tapping W to sprint. It's like 5x as fast as normal flying, so yep, I do test that. But since the add-on also causes indoor rain, I believe I am missing something...no idea what but there is something...
     
  11. Offline

    Mrchasez

    Ptweaks isn't PerformanceTweaks btw.
    Its a different plugin based on it.
    I have new features in it, our plugins work differently.
    Nolagg works better for CPU and Ptweaks works better for RAM.
    They both do a good job at removing all lag, and we both have a TNT system that does well, and work very different.
    Our plugins should work together however i have not tested yet, i will later today.
     
    kahlilnc likes this.
  12. Offline

    Fr0zenfr0g

    i want to know the results!!!
     
  13. Offline

    bergerkiller

    @Fr0zenfr0g @Mrchasez me too! :)

    And yep, thought performancetweaks was ptweaks. What do you use to lower the RAM then? Other than disabling the 'keepSpawnInMemory' of a world (which MyWorlds can do) I can't think of anything...

    EDIT

    Also, what TnT handling system do you use?
     
    kahlilnc likes this.
  14. Offline

    QQCucumber

    It's not the speed I was worrying about affecting results, it's contact with the ground.
     
  15. Offline

    lucasbytegenius

    Signed up just to say that I love your plugin. Man, it's just so freaking awesome.
    I have a small home server running MineOS, it's got a 2.2 GHz single-core Pentium 4 CPU with 1 GB of RAM, and before I installed your plugin it would crash a lot. And I mean a lot. 8 TNT would crash it every time.

    Today I installed your plugin and me and my friend blew up 32k TNT blocks with no lag at all. I couldn't believe it. Later, we went to the Nether and blew up 92k blocks, and that's when the server crashed. But I can't believe it took that much to crash it...

    Great job :)
     
  16. Offline

    Mrchasez

    Well, When you walk on a chunk, Ptweaks will get data from surrounding chunks before your on them or they load up. When you do walk on it, it is basically already loaded. Also speeding up process's of a lot of different things saves lots of ram and that is why people using Ptweaks is seeing such huge changes. For TNT, after the first explosion it saves that data and just repeats it. So it takes up no memory at all after that first explosion. That is why TNT has no effect on servers running Ptweaks and the video i made shows it.
     
  17. Offline

    Fr0zenfr0g

    have you tryed to run does 2 plugins at the same time yet?
     
  18. Offline

    bergerkiller

    @Mrchasez ye I used such a TNT mechanism before, see the first video. Only problem is that you get millions and MILLIONS of mobile TNT entities...and hell that lags! So I eventually decided to cut that too...wasn't a nice way to do it. Also, the main TNT lag cause is actually the packets being sent. The client gets stuffed with packets, causing it to freeze, causing the entire server to lag. It takes a bit longer for the main thread to give up when the recursive block explosions reach a certain limit.

    Also, you know how to fix this issue with invisible chunks? It's been a serious pain and I went through all lengths, even made it use a new algorithm where limited chunks are sent per second to prevent the buffer from overflowing...but now rain falls through the roof? I start to get kinda depressed...
     
  19. Offline

    Fr0zenfr0g

    now when i use the hole nolagg plugin it sems that my chunks are loading slow (realy)
     
  20. Offline

    bergerkiller

    @Fr0zenfr0g that is what the chunk add-on does: limit the amount of chunks being sent to the players to increase the player cap. If it is REALLLY slow, lower the sendInterval for a bit. It's there for a reason. :)

    But for now you can disable the chunks add-on, I don't really trust it any more. I make it send pretty much everything of a chunk, and still black holes and still rain falling through the ceiling...
     
  21. Offline

    Mrchasez

    With TNT Edit (Ptweaks)
    Its the exact same Packet. It don't really send anything more then after the first time.
    Anything below 10k tnt your never see any lag. After a certain point you will get lag, but that is unavoidable.
    Using Ptweaks TNT Edit, a server running it will never see TNT lag.

    I just finished testing Ptweaks and Nolagg.
    When they were both in, they both did there separate jobs, and all together performance was a little better.
    Not a lot though. However, Huge beta holes appeared in some spots. (is that what you refer to invisible chunks?)
    Large holes that go past bedrock into the void. They were long rectangular beta holes. (invisible chunks)
    I am not sure if that is just from Nolagg, or if our plugins have some issues when together.
    I have never had that happen with Ptweaks so i don't really know how to fix it
     
  22. Offline

    Fr0zenfr0g

    ok, if you think i would do that i will do that, ant progress Mrchasez?
    edit: if i dont use the cunkstuff from nolagg is it any other things than the stack thing that ptweaks dont have?

    the holes has something with the chunk stuff... can you try without that?

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

    Mrchasez

    Already posted :3

    If you disable the the part of Nolagg that is causing the beta holes, Our plugins are great partners, because how they help servers isnt close to being the same.

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

    bergerkiller

    @Mrchasez yep that is what I mean with invisible chunks. It occured after I implemented the chunk unload delay, and thus I had to manually send chunks. I started sending them when a player changes chunks, but then double-chunks were sent. Then I ended up using Spout to handle packets, and eventually I ended up where I am now. But STILL some packets don't seem to reach the client, and I don't know why...

    Since you also have an unload delay, does it happen at you? You can disable the add-on of NoLagg and compare the two. (because if the Unload delay feature also causes black holes at yours, we may share the same issue. If not, I may need to change something...)
     
  25. Offline

    Mrchasez

    People using Ptweaks and me, have never had that happen.
    If you disable it, they should be fine.
    However, With the small improvment of performance running both of the plugins, just having that extra plugin might make back that performance, meaning having them both really don't help at all.
    Having just one, seems like it would be the same as having both.
     
  26. Offline

    bergerkiller

    @Mrchasez that's kinda obvious, since both plugins do pretty much the same... :)

    Still don't get how cancelling chunk unload events can cause black holes to appear...
     
  27. Offline

    Fr0zenfr0g

    :D
    how mush is the stacking thing improve the performance? (i have no xp-orbs on my server)
     
  28. Offline

    Mrchasez

    What i am sure of though, If you want to see better CPU performance going with yours is better for now.
    If you want to see better Ram performance going with Ptweaks is better.
    I like my TNT system better too >_>
     
  29. Offline

    bergerkiller

    @Fr0zenfr0g tremendous amount. Imagine someone made a huge contraption using sand and torches, and this collapses. Hundreds of moving torches are then lying on the ground, lagging everyone. By making stacks this is prevented, since 64 individual torches become one torch. Same applies for players spamming lots of items using Q, eventually causing lag.

    EDIT

    @Mrchasez you do know you can tweak the TNT settings using NoLagg? You could set a very low interval, high rate, and around 100 interval for tnt explosion packages. You'll have almost the same effect, yet the server can come by from the explosion. :)
     
  30. Offline

    Mrchasez

    Wow, that is really cool.
    That is a really smart system.
    Maybe you can help me with THIS
     
  31. Offline

    Fr0zenfr0g

    hmm i cant chose :(:'(:mad:[creeper] boooooom
     

Share This Page