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

    ghost15

    I updated yesterday didn't think to look for a new version so soon! I will update and give it a shot, I was running 1.52.5 when I noticed the problem and updated yesterday to 1.53.4. I will update to 1.54.1 and see how it goes for a day or two. Thanks for the quick response!

    @bergerkiller
    About 5 minutes after the server restart, started getting the "Can't Keep up" again, here is the new monitor output
    [​IMG]
    The server is an i7 @ 3.8 GHz, with 12 GB Total Memory

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

    mrciku

    Hmm... Unless the GitHub link is still 1.54, I downloaded 1.54.1 but when I reloaded the plugin it still stood 1.54.
     
  4. Offline

    bergerkiller

    @mrciku Mhh plugin.yml is still on 1.54, but the 1.54.1 link on GitHub is the right version anyway.

    @ghost15 Could you use /nolagg log and then after a while (when you get the mesages) /nolagg log again, and upload the log file? (/nolagg/log.txt)
    A snapshot won't do here I'm afraid, need the full line-per-line information. The update times seem to be all right (even better, it's not even 0.1 ms), so it isn't the chunk sending/loading/generating I suppose. Maybe the log gives more clearance...

    I do notice a pretty high memory increase rate, which either means a lot of chunks are being loaded or that another plugin is messing around with large data. What plugins do you use?

    Also, could you enable the chunk sending mechanics? A chunk buffer size of 0 kb is kinda strange, which leads me to believe you have it disabled. *edit* but a chunk sending rate is present...this is really strange...
    NVM, you probably loaded the plugin while already being on the server, so no chunks were sent yet. Chunk sending, loading and generating are out of the picture now.

    All internal tasks are monitored already (and their duration is not even 0.1 ms), so it can only possibly be another plugin...
     
  5. Offline

    ghost15

    First, you sir rock. I checked my plugin list and the only plugin that screamed "why are you here" and "you probobly mess with alot of data" was "ChunkManager". I Disabled the plugin and restarted the server, so far I'm getting 20 ticks again. If I see the same situation as before I'll do as you requested and get a log going for you to review.
    Thank you for your help!
     
  6. Offline

    bergerkiller

    @ghost15 Aaaaaaah that explains SO much :)
    The internal chunk sending system is disabled when chunk manager is enabled (it's part of 'compatibility')

    Weird is that the Chunk Manager was the initial idea for the internal system used in NoLagg, it surprises me that the my implementation is so much better that it even causes less tick lag...

    @Thulinma Could you look at Chunk Manager and find out what is causing this heavy tick lag drop? The code has become quite different from NoLagg's, so I have no idea what is wrong with it. Maybe you do ;)
     
  7. Offline

    number1_Master

    I think ever since I've installed this plugin, monsters have stopped spawning. Heres the config:
    Code:
    # Sets if and how many items are buffered per chunk
    bufferItems: true
    maxItemsPerChunk: 40
    bufferTNT: true
    tntDetonationInterval: 1
    tntDetonationRate: 10
    explosionRate: 5
    useSpawnLimits: false
    useChunkUnloadDelay: true
    chunkUnloadDelay: 10000
    formItemStacks: true
    stackRadius: 1.0
    stackThreshold: 2
    ignoredItemTypes:
    - DIAMOND_PICKAXE
    autoSaveInterval: 400
    updateInterval: 20
    monitorInterval: 40
    chunkSending:
      enabled: true
      minRate: 0.25
      maxRate: 1.8
      boost: 25
    
    The difficulty is set to 3, I do have Towny and world mobs are on, and I also have multiworld, and yes, spawnmonsters is on.

    how do i lower it?
    do i change chunk unload delay to 5000?

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Nov 10, 2018
  8. Offline

    bergerkiller

    @nunber1_Master How many mobs are on your server? (use /nolagg monitor and then the mob count)

    also, unrelated: a new GIF image displaying the chunk sending alg. of NoLagg :)
    [​IMG]
     
    Inscrutable and Don Redhorse like this.
  9. Offline

    number1_Master

    wats the mob count? i did type /nolagg monitor, and it spams me with information
     
  10. Offline

    bergerkiller

    @nunber1_Master
     
  11. Offline

    number1_Master

    Entities: 490 [437] [0 items] [0 TNT]
    ya but no mobs are found above ground (monsters)
    ill keep exploring.....
     
  12. Offline

    bergerkiller

    @nunber1_Master The more chunks you load, the least mobs you will see. It is possible that the chunk unload delay is set too high, resulting in less mobs/chunk on average.
     
  13. Offline

    bergerkiller

    @nunber1_Master that's 5 seconds, 5000 or 10000 seem fine to me. If that's already the case, then I don't know really...entities are not removed when spawn limits are not enabled.
     
  14. Offline

    phanaticd

    1.54.1 breaks my server i had to remove it, i get spammed with
    at com.bergerkiller.bukkit.nolagg.NLBlockListener.fixColumn(NLBlockListener.java:90)
     
  15. Offline

    bergerkiller

    @phanaticd anything else than that line? The error itself? I need the entire stacktrace, else I can't help you out...

    EDIT

    Your stacktrace limit is probably set to a too low value, but I'll replace the recursive function with a while loop to satisfy those people...

    Got it, bug confirmed. Happens when you place a block near bedrock level and a gap is present, causes an infinite recursive loop. Will fix it ASAP

    EDIT

    @phanaticd Updated to 1.54.2, fixing that infinite recursion of the (lighting)fixcolumn function. (Also changed the buffered chunk packet to correctly get garbage collected without leaving endless chunk buffers behind, if obtained by another plugin)
     
  16. Offline

    number1_Master

    omg i am so sry for bothering you, turns out it was an issue with multiworld in the config. I didn't know that there was a difficulty setting in the multiworld config. I am truly sorry.
    Still, you have an awesome plugin, and people on my server aren't complaining about lag. Diamonds for you: [diamondblock][diamondblock][cake][diamond]
     
  17. Offline

    bergerkiller

    @nunber1_Master great to hear that :) (though I am used to walking through an issue, finally concluding that it's another plugin and then that proves to be true)
     
    nunber1_Master likes this.
  18. Offline

    phanaticd

    @bergerkiller thanks for the quick response, i will try the update later, i run a skyblock survival server so yea there is no bottom layer its just void :p
     
  19. Offline

    Wolfy9247

    How does this compare to a plugin such as Ptweaks? It seems like both these plugins have very similar features, but I'm not sure which would be best to use, and although "best" is an opinion, I'd just like if there was some feedback or comparisons on which this might offer over something else as a consideration. Thanks!
     
  20. Offline

    bergerkiller

    @Wolfy9247 Ok here goes :)

    PTweaks, also known as 'Performance Tweaks', is a continuation of that plugin. Sadly, Performance Tweaks was for build 1337, after which it broke. Mrchasez added some fixes (and memory/tick rate readout) and published it under PTweaks. So far the background story.

    Sadly, I have had quite an online discussion with him, this because PTweaks lacks ALOT of claimed features. The following things are not present:
    After comparing the source of Performance Tweaks with PTweaks, nothing really got changed. (only removed)
    Therefore I asked him several simple questions like what he changed to call it 'his plugin', sadly he avoided that question for several days with a long 'flame-war-troll-like-discussion' as a result.

    *snip* So to comparing the two. Honestly, all features PTweaks has are already implemented (and greatly improved, like the spawn limits, tick-rate-saving chunk unloading and 'ram reduction' even). But, some may say that NoLagg contains too many features and thus jump to PTweaks because it offers less. But those people don't know that you can disable and enable all sorts of features easily in the configuration, bringing it down to PTweaks level if needed.

    tldr; NoLagg contains everything PTweaks has to offer, and more. PTweaks 'contains' features that are not actually there. PTweaks is hardly updated, as since several months all that got added was a memory and tick rate read-out.

    Note: didn't look at the version right now, if he DID add anything please correct me.
     
  21. Offline

    Paswaru

  22. Offline

    Jrog

    It seems that the latest version of NoLagg's chunk sending conflicts with the latest version of Orebfuscator (1.2.4). If I turn off NoLagg's chunk sending Orebfuscator works properly. When it is on, Orebfuscator does nothing and all ores are visible. I'm not sure if this is a problem with Orebfuscator, or Nolagg, but they worked fine together when I was using the previous version of NoLagg. Thanks in advance for any feedback.
     
  23. Offline

    bergerkiller

    @Paswaru
    Yup, spot on. Why did he mention Performance Tweaks? Now you know :)

    @Jrog Ooooooow I see....sorry
    I recently changed the sendPacket to directly use the compression queue, not taking in account that Spout uses the sendpacket function only. I'll fix it real soon, hang on...
     
  24. Offline

    Javaprogrammer

    The plugin looks really good just one question, What was that plugin when u wrote //TNT 40 down and //TNT 50 up?
     
  25. Offline

    bergerkiller

    @Javaprogrammer It's called Worldedit, I got a REALLY old version, yet it still works :)
    Also, before you install, I'm uploading 1.54.3, since someone noticed another item duping issue with the stack former. Fixed that, so now updating. (also adding back support for ore obfuscator)
     
  26. Offline

    Sh4d0w

    Code:
    2011-12-28 11:33:20 [SEVERE] java.util.ConcurrentModificationException
    2011-12-28 11:33:20 [SEVERE]     at java.util.ArrayList$Itr.checkForComodification(ArrayList.java:819)
    2011-12-28 11:33:20 [SEVERE]     at java.util.ArrayList$Itr.next(ArrayList.java:791)
    2011-12-28 11:33:20 [SEVERE]     at com.bergerkiller.bukkit.nolagg.ChunkHandler.cloneChunk(ChunkHandler.java:43)
    2011-12-28 11:33:20 [SEVERE]     at com.bergerkiller.bukkit.nolagg.ChunkOperation.execute(ChunkOperation.java:105)
    2011-12-28 11:33:20 [SEVERE]     at com.bergerkiller.bukkit.nolagg.ChunkScheduler.run(ChunkScheduler.java:143)
    Using 1.54.2, after this error some chunks are new re-gererated + bukkit 1597

    before i had LogOes, but i've read an error in the changelog. After disabling and installing latest nolagg version, the problem still occur
     
  27. Offline

    bergerkiller

    Also, updated it to 1.54.3, fixing item duping occuring with the stack former (which had a recent updete to run on a separate thread) and brought back support for ore obfuscator.

    @sh4dow

    Uploaded 1.54.4 to fix that issue as well.
     
  28. Offline

    sagethor

    @bergerkiller
    Incompatibility for 1.54.1 with mcMMO

    Picture below with error, something to do with item drops from a skeleton and possibly with a sword and the bleed effect.

    EDIT - Probably should have posted on the mcMMO topic, but it's been fine up to now, so I thought I would check it with you. Updating now though. :)
     

    Attached Files:

  29. Offline

    shanko

    So i can't use this with worldedit? I only use world edit to select regions and import maps
     
  30. Offline

    Sepulzera

  31. Offline

    shanko

    but It will cause more lag than its worth?
     

Share This Page