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

    Averus

    cant find http://minus.com/mqLVX0eWK
     
  3. Offline

    bergerkiller

  4. Offline

    Averus

    would great too see permissions for non dynamic view distance(max distance) for VIP(or donators) and others with dynamic view.
    tnx anyway
     
  5. Offline

    bergerkiller

    Averus Is possible...somewhat. But not sure if that is efficient enough.
     
  6. Offline

    HHDcDHDHCCD

    it causuz lagz und shitz
     
  7. Offline

    NosajDraw

    I got a weird issue.

    My server was completely unusable, lagged to the point of a complete halt.

    Installed NoLagg, server springs back into life.

    But

    a) the default world no longer has any drops, all else works well it seems, but any items dropped either by mining or player just dropping them just vanish, however there is no lag at all.

    b) in the nether drops happen as usual, but there is significant lag.

    My config is the default one shipped with NoLagg and having reviewed it I can see no reason why the two worlds would be different.

    Help!
     
  8. Offline

    bergerkiller

    NosajDraw

    a.) Try if disabling the spawn limiter works. (config.yml, disable that component), and increase the 'max items per chunk' in the item buffer, or disable the item buffer.

    b.) More people seem to have this problem, but my guess is that this has nothing to do with plugins, and that this is an internal server issue. It can be the world generator for the nether is too slow, or that lighting takes too long to be calculated.
     
  9. Offline

    Admiral AnimE

    So.. how is this a lighting fix:
    [​IMG]
    [​IMG]

    :'(
     
  10. Offline

    bergerkiller

    Admiral AnimE Same question I ask...it does look slightly familiar...but not sure where I've seen it before. One thing is certain: For some reason it interprets the borders of the chunk as 15-level sky light, which can be the only explanation for the strange lines. The smoothed lighting must be caused by the client, trying to 'fix it up'. Using /lag fix in that area does not clean this mess up?

    If you can, could you upload a schematic of the area that is so heavily bugged? (I hope that it stores light information). Then I can see for myself what is going wrong so badly...

    {just in case} you do use the latest version of NoLagg? Because this bug seems familiar and I fixed something like it a long while back, I find it strange that it now re-appears.

    Don't worry, I will not let you sit with that mess. :oops:

    EDIT

    I could only find one problem, and that is that it didn't zero-out the original block lighting when initializing the light. But, that would mean that your glitched light was already there, else it is impossible to happen.
     
  11. Offline

    Admiral AnimE

    Well the thing is, i've had NoLagg for a long time, and i think it was written that it should fix automatically glitched lighting on new terrain. But it didnt. So i used /nolagg fix to fix it, and it worked everywhere except in this region. Every time i use it there it gets worse :(
    I am using the latest version, how do i upload a schematic?

    EDIT:
    the 2nd image is when i use /nolagg fix, it makes the terrain very bright and the blocks near torches dark. the 1st one is after i walk near every chunk to "fix" it. But its still bad.

    These massive lighting glitches usually happen on very large buildings like this one.
     
  12. Offline

    bergerkiller

  13. Offline

    Admiral AnimE

    It's still the same, but this time /nolagg fix doesnt do anything.
     
  14. Offline

    EvilJackCarver

    I'm trying to update all of NoLagg's features, unfortunately the download does not include all the modules I need to update. Is there a place where I can get the needed JAR files?
     
  15. Offline

    bergerkiller

  16. Offline

    shanko

    My NoLagg Examine is saying "Load chunks from file" is the laggiest thing. How can I reduce server lag if this is the case? Its at 378 ms
     
  17. Offline

    bergerkiller

    shanko it can only be reduced in the following ways:
    • Get World Border to keep players within a certain area
    • Keep commonly loaded chunks loaded (find an always-load plugin to do this, keep spawn loaded)
    • Get better hardware (or more RAM and run on a RAM disk system)
    There is not much you can do, because Minecraft loads all chunks on the main thread. It is meant to be slow, so to say.
     
  18. Offline

    shanko

    Okay, thanks for the info. Is it being so high the result of poor hardware or is it normal to be that high?
     
  19. Offline

    bergerkiller

    shanko it is fairly normal to be that high. Decompressing chunks and IO read operations are slow...
     
  20. Offline

    EvilJackCarver

  21. Offline

    bergerkiller

    EvilJackCarver also add BKCommonLib.jar in the plugins folder. (not the lib folder!)
     
  22. Offline

    EvilJackCarver

    Already got both of 'em. I presume I need to delete the old one.
     
  23. Offline

    bergerkiller

  24. Offline

    EvilJackCarver

    It's now working, I am now a happy face.

    Edit2 - Whoops, wrong thread.
     
  25. I need to post it here, too, because i have a serious problem with NoLagg!

    Whenever i use the Chunk-Feature of Nolagg my Tress are cutoff at the edges of chunks, this looks horrible!
    Anyone else having this problem?
    I don't use any other plugin manipulating packet handlers or caching chunks and i don't use Spout either.
    Any idea? I really need this great feature!

    Oh yeah it even happens with Nolagg being the only Plugin, so it IS a fault of NoLagg
     
  26. Offline

    bergerkiller

    Terra-Network.org Try if setting 'useDynamicView' to false in the configuration helps. It could be related to how chunks are not instantly loaded like in the stock server.
     
  27. No, not better :(
    It's strange, it seems it only happens to some people, because there already is a ticket with this problem.
    It only happens when Chunks are newly generated and i think it's a problem with Terrain generation and population :/
     
  28. Offline

    bergerkiller

    Terra-Network.org strangely I don't alter the way chunks load other than with the dynamic view distance. With that disabled, it will basically listen for chunks to send and won't handle chunk loads in any way, or cause chunk loads otherwise. Just in case, do you use Orebfuscator?
     
  29. bergerkiller

    Nope, never used it.
    I even tried NoLagg as the only Plugin (with BKCommon..) and there were still problems, so it's not an incompatibility with another plugin.
    I think i will try a little joke tomorrow and will test it with another seed (even if i can't see anything that could cause problems ^^)
     
  30. Offline

    Greylocke

    I feel like a total noob asking this, but I'm gonna toss it out anyway. I want to eliminate the need to run as Op on the server, but most NoLagg functions can only be run as Op. As an example, I have nolagg.fix set for my user (if I do a node test in-game it verifies that nolagg.fix is set) but when I try to execute a /nolagg fix, it says that I do not have permission. Just the basic /nolagg works to get TPS.

    I've read the NoLagg config.yml file, and it is set for Op, but the config also says that the settings will be overridden if a permissions node is used.

    So... what am I doing wrong?
    NoLagg 1.86
    bPermissions 2.9.8
    Bukkit 2254 (1.2.5-R4.1)
     
  31. Offline

    bergerkiller

    Greylocke you do have to use the right permission nodes. It is probably 'nolagg.lighting.fix' and not 'nolagg.fix'. Note that all the permission nodes start with 'nolagg.' followed up by the component and then a permission in this component. Just like it is 'nolagg.monitor.use' instead of 'nolagg.monitor'.
     

Share This Page