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

    mrciku

    Hmm I redowngraded to 1.34 already since everyone on the server was screaming at me.

    Alright, looking forward to the fix
     
  3. Offline

    bergerkiller

    Also going to remove that 'restored from saving queue' message. It is kinda obsolete, as it is actually a positive message. (it tells you that it successfully prevented a chunk from loading and unloaded frequently and restored the chunk using the previously stored data.)

    EDIT

    Ok several changes for 1.46:
    EDIT

    Uploaded. Please use this newer version, just to be sure you have a working one.
     
  4. Offline

    ProjectInfinity

    Yes, this should support Java 1.7. We shouldn't have to "support" NoLagg. 1.7 is out of beta and performs much better than 1.6.
     
  5. Offline

    bergerkiller

  6. Offline

    grabben_167

    how to install
     
  7. Offline

    bergerkiller

    @grabben_167 open the zip file you downloaded from GitHub and place the two .jar files in the plugins folder of your server. If you don't use Spout, only take NoLagg. (NoLaggChunks requires Spout to work)
     
    emericask8ur likes this.
  8. Offline

    grabben_167

    ok
     
  9. Offline

    ledhead900

    That was quick thanks.
     
  10. Offline

    grabben_167

  11. Offline

    emericask8ur

    He knows already... :]
     
  12. Offline

    Fr0zenfr0g

    emericask8ur likes this.
  13. Offline

    Lexington

    I've got issues with players appearing inside walls or underground after relogging / teleporting
     
  14. Offline

    emericask8ur

    Its prob not this plugin
     
  15. Offline

    bergerkiller

    @Lexington Could be native coding acting up, in other words; clients not rendering the chunk properly making them see-through. Once they get near this effect disappears. Can't help much on that part, as it is client-sided.

    Or do you mean something else?
     
  16. Offline

    Lexington

    I mean they appear inside existing blocks and suffocate. Like their position is calculated or saved wrongly.

    I think it is - appeared after using nolagg chunks

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

    emericask8ur

    I know what you mean know. Idk then berger has the answer some where
     
  18. Offline

    bergerkiller

    @Lexington That is a bit weird, since I don't change entity locations whatsoever. I did see it happen once, a friend teleported to be but instead teleported inside a wall, was really weird. Doubt it has anything to do with NoLaggChunks, could be Spout is causing this. (since it has teleport optimizations)
     
  19. Offline

    Lexington

    If this is Spout it's really bad. But .. I'm running Spout for some time and I'm forcing players to use Spoutcraft.
    The problem appeared after installing nolagg chunks + nolagg 1.45+ , never dealt with it earlier.
    I try disabling both for testing.

    Btw. don't get me wrong , I'm not complaining or anything. Your plugin is awesome.

    I gave my players access to worldedit /unstuck as a temporary fix
     
  20. Offline

    bergerkiller

    @Lexington I know, it's awesome (trololol)
    The problem is...
    - 40% of the bug reports are caused by other plugins, where after I end up contacting those developers so they can fix it.
    - 30% of the bug reports are caused by using ridiculous configuration settings or not reading the main page
    - 10% of the bug reports consist of such a lack of information (I get an NPE, I am sure you can fix it)
    - 20% of the bug reports end up related to my plugin

    I am basically looking at causes that have nothing to do with my plugins 80% of the time. It's a serious pain xd
     
  21. Offline

    Sepulzera

    Just to let you know: Sometimes I spawned/respawned inside of walls, before I was using this plugin.
    Thought it was a bug of the spawn-location and saved player-locations (->relogging), beds and teleports were fine.

    Had fixed the issue with relocating the spawn-position, one above the ground.
     
    bergerkiller likes this.
  22. Offline

    bergerkiller

    @Sepulzera ok thanks for clearing it up. :)
     
  23. Offline

    Lexington

    Tried it , but eventually found another resolution - deleting player.dat of affected players solved this for me.
     
  24. Offline

    Tamtam18

    This happens when i start my server:

    01:41 PM [WARNING] [NoLagg] Failed to initialize async auto saver!
    01:41 PM [SEVERE] java.lang.Exception: Interval is too low for async auto saving to work. Set the auto save interval in the configuration to a value higher than 400 ticks (20 seconds) to use async auto saving.
    01:41 PM [SEVERE] at com.bergerkiller.bukkit.nolagg.AsyncAutoSave.init(AsyncAutoSave.java:22)
    01:41 PM [SEVERE] at com.bergerkiller.bukkit.nolagg.NoLagg.onEnable(NoLagg.java:135)
    01:41 PM [SEVERE] at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:174)
    01:41 PM [SEVERE] at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:957)
    01:41 PM [SEVERE] at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:280)
    01:41 PM [SEVERE] at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:171)
    01:41 PM [SEVERE] at org.bukkit.craftbukkit.CraftServer.enablePlugins(CraftServer.java:154)
    01:41 PM [SEVERE] at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:297)
    01:41 PM [SEVERE] at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:284)
    01:41 PM [SEVERE] at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:152)
    01:41 PM [SEVERE] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:348)
    01:41 PM [SEVERE] at net.minecraft.server.ThreadServerApplication.run(SourceFile:417)
    01:41 PM [INFO] [NoLagg] Native sync auto-save feature is used instead.
    01:41 PM [INFO] [NoLagg] Auto-save field bound to 'u'!
    01:41 PM [INFO] NoLagg version 1.46 is enabled!

    :( how can i fix this?
     
  25. Offline

    bergerkiller

    Increase the interval. (note that I re-uploaded it to change that error into a simple warning with instructions to ease your lives)

    Also: I am going to implement fixes for the lighting in a next version. I will schedule lighting updates like I did for saves, and will re-send the chunks to the players so they don't experience lag. In addition, I will instruct NoLaggChunks to cancel a certain chunk packet so it will not send the chunks twice. Gotto love coding... :)

    This will only happen to just-generated chunks, will add a similar command to do it for existing terrain.
     
  26. Offline

    Lexington

    It is not error , the plugin just informed you that you have too low auto save interval to enable async auto save.
    You should be grateful for that because if it would be enabled with such settings , you'll end up with majot lag.
    Set it over 400 (i'm using 1000)
     
  27. Offline

    Tamtam18

    thanks, that cleared it up
     
  28. Offline

    thehutch

    @bergerkiller
    Suggestion:
    For spout users can you add a GUI for the monitor because that is awesome but the spamming is annoying and can quickly delete all old messages :( Would be really awesome if you could :D

    I just tried this and it works amazingly just kept on flying and no lagg even when i'm on my own awesome :D
    although one problem and I have no idea if this is your plugin but you handle entities so I might aswell ask. Look at this @bergerkiller
    http://dl.dropbox.com/u/38714192/LotsOfMobs.png

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

    ledhead900

    U did setup Nolagg with a limited Global mob count correct ? I believe if you leave nolagg config alone that will happen.
    I am probably mistaken by your post tho.
     
  30. Offline

    mrciku

    NoLagg v1.36 BufferTNT lags my server ALOT, and fine after I disabled it in configurations.

    Maybe it's because of my SafeExplosions plugin I made... Can anyone confirm?
     
  31. Offline

    Fr0zenfr0g

    Cant you try to delete the plugin you made and try if there are any diffrent resolut then?
     

Share This Page