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

    silentdojo

    My latest updates on testing. My problem with not being able to do anything (break/place blocks, use chests etc) after a restart was fixed by removing nolaggchunks, restarting, and then it worked, so I readded it, and it worked still. So that problem was fixed.

    Now a user in the server who happened to be using spoutcraft was dying when entering diff. worlds and was teleported to one random spot everytime.

    There was an error the last time it happened and then timed the server out. We then rolled back to 1.46 and the problem was gone.

    Pastebin copy of the error: http://pastebin.com/akWJDem8
     
  3. Offline

    Flatliner

    So, this is a bit vague as I've not experienced the problem myself so I'm not sure if anything happened at the time to cause it. My players told me this morning they were having problems last night where they suddenly couldn't break any blocks at all, attack mobs, access chests etc. They also had some problems with disappearing sign text.

    This is with the 1.48.6 build with mostly default settings bar the following changes:

    useSpawnLimits: false
    useChunkUnloadDelay: false

    and for nolagg chunks

    chunkSendInterval: 2

    It didn't happen until the server had been running a few hours, but after removing the chunks plugin everything has been fine ever since.

    EDIT Actually it just happened again... guess I need to investigate some more.
     
  4. Offline

    bergerkiller

    And from saving issues straight into player interaction issues... :p
    NoLagg(Chunks) doesn't handle onPlayerInteract, so no issues there. Only NolaggChunks buffers out packets, but it doesn't handle inventory open packets etc, so no problem there either. If it happens without NoLaggChunks ( @Flatliner ? ) let me know. It could also be a general Spout issue (once again), so check if the same happens if you disable Spout.

    @kalez you can disable that message in the configuration (added a node for it) Might just drop the idea, since it appears to fire all the time. (some servers allocate new memory, some don't, I don't know the actual max memory)
     
  5. Offline

    Flatliner

    Sadly my servers empty currently so I've got no one else to help me test but I'm fairly sure the block breaking issue was nocheat related (I've rolled back to the version I was using before which I know worked fine so we'll see). I'll post again if any issues crop up.
     
  6. Offline

    Zathras

    Still having some signs going blank using 1.48.6 and I'm trying to figure out what is going on. When I remove NLC jar, signs are fine again. Here is part of the startup with NLC removed.

    Code:
    07:04:30 [INFO] This server is running Craftbukkit version git-Bukkit-0.0.0-1131-g86b7fa8-b1337jnks (MC: 1.8.1)
    ...
    07:04:32 [INFO] Spout 510 has been initialized
    ...
    
    07:04:36 [INFO] [SignLift] Version 1.0 - Copyright 2011 - Shannon Wynter (http://fremnet.net) is enabled
    ...
    
    07:04:36 [INFO] [SignShop] v1.2 enabled
    ...
    
    07:04:36 [INFO] SimpleSignEdit v1.7.1 enabled.
    ...
    
    07:04:40 [INFO] NoLagg version 1.48 is enabled!
    
     
  7. Offline

    NotYetRated

    Was logging the "nolagg monitor" command removed from the individual log? I am only seeing it log to the server log..


    ...nevermind
     
  8. Offline

    Sepulzera

    Itemstacks aren't working in the last version.
     
  9. Offline

    bergerkiller

    @Sepulzera did you enable 'formItemStacks' and have a correct threshold? (2 is minimum)
     
  10. Offline

    Sepulzera

    Yea just took the config of the previous versions, where it was working fine

    Edit:
    Config (open)
    Code:
    bufferItems: true
    bufferTNT: true
    useSpawnLimits: false
    useChunkUnloadDelay: false
    tntDetonationInterval: 1
    tntDetonationRate: 50
    explosionRate: 50
    maxItemsPerChunk: 40
    formItemStacks: true
    chunkUnloadDelay: 10000
    autoSaveInterval: 380
    updateInterval: 20
    stackRadius: 2.5
    stackThreshold: 5
    monitorInterval: 40
    broadcastMemoryHigh: true
    useAsyncChunkSaving: true
    
     
  11. Offline

    bergerkiller

    It needs at least 5 separate items near to make those 5 items stack. For example, 5 pieces of 1 dirt would, at the 5th item, change into one stack of 5 dirt.
     
  12. Offline

    Sepulzera

    I know how it should work.
    The point is, it doesnt.

    Edit:
    [​IMG]
     
  13. Offline

    bergerkiller

    @Sepulzera mmh I see wood...same happens to stuff like sand? (because wood has a sub-type id)

    EDIT

    Nvm it broke...no idea why but I'll update it ASAP again...
     
  14. Offline

    Sepulzera

  15. Offline

    bergerkiller

    @Sepulzera ok that was easily fixed. Anything else you noticed?

    EDIT

    Fixed in .7
     
  16. Offline

    Sepulzera

    Nope, but I don't use neither your chunk and save - mods nor your spawnlimit, so I can't say anything 'bout it.

    Edit:
    Approved. :)
     
  17. Offline

    silentdojo

    @berkiller
    Just out of curiosity which version of Spout do you use?
     
  18. Offline

    bergerkiller

    @silentdojo as for right now, I got 510.

    EDIT

    Ok this new lighting fix is pretty (damn) solid. Managed to fix all possible situations where an air block was dark and it is pretty fast too. :)
     
  19. Offline

    silentdojo

  20. Offline

    bergerkiller

    @silentdojo I honestly can't tell, they did quite a lot of performance improvements as I can see.

    Finally updated it to v1.49, most significant changes are
    - Lighting fixing routine now fixes 100% of the cases - the command is hardly needed any more
    - Removed the 'memory is low message', was not a good way to do it
    - All fixes of the previous 1.48 and non-rbs of the past

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

    SrJoben

    I downloaded this for the item buffering. It's very powerful.

    I used a plugin called GiantTree to make a 7 block wide 48 block tall tree, and then used a plugin called ChopTree which makes trees pop like cactus if you take out the bottom. Basically this resulted in several thousand logs being dropped instantly, and then hundreds of saplings spawning over the next few minutes as the leaves decayed. Without NoLagg this resulted in several minutes of gameplay moving at about 2 frames a second. With this plugin there was barely a hickup.
     
  22. Offline

    silentdojo

    I see. So you'd recommend using 1.49 with Spout 410 then?
     
  23. Offline

    bergerkiller

    @silentdojo You can at least try it with 410, I'll update Spout to the latest and see where the issues are. (what are the issues with the latest Spout?)
     
  24. Offline

    Flatliner

    I'm unsure if it was supposed to be fixed in 1.49 or not, but just wanted to let you know that text still seems to be disappearing on signs. I was wandering around a moment ago and found several empty signs, after removing the chunks plugin and restarting all of the text reappeared.

    I should add that even though the text on the sign was missing it still behaved as if the text was there (eg [private] signs still worked and what-not). So it seems like the text isn't being sent to the client rather than it actually being cleared.
     
  25. Offline

    ledhead900

    Missing chunks lol, why are you testing released version of nolagg with a outdated spout ?, latest spout reco is 510
     
  26. I had similar issues when trying it. 50% of signs and chests worldwide just wiped. And its a very very large world. But could very well have been with 1.47 i tried, didnt really focus so on about which version it was.
     
  27. Offline

    bergerkiller

    Ok then it's no longer a saving issue, but the sign text packet isn't being received - which is weird on it's own, since I gave non-block change packets full priority...

    If anyone can confirm if it is related to Spout, feel free to reply.
     
  28. @bergerkiller
    The item merging into stacks feature is great and works fine even for stacks if you drop 32+32 dirt making it form a nice 64 block dirt stack. My problem is that in waterslides items tend to pool together into smaller stacks. Theese will not merge together when ending up at the same place. Its as if any stack your plugin is working on refuses to merge with another stack your plugin is working with or has worked on.

    Also, what about when setting off tnt it looks at what drops are generated for the blast, ie 10 cobble, 5 dirt and 3 sand and then just drop 3 stacks of this (plus scattering theese stacks) instead of dropping 1 block stacks that then have to merge.
     
  29. Offline

    bergerkiller

    @Sorken then the maximum is reached. If, for example, 5 items are together:
    It will notice it can't stack any further, since any other combination results in a value higher than 64. As I can see, combined it would be 235: 3 stacks of 64 items and one stack of 43 items. I could make it stack to accomplish this and get rid of that one item, but it would result in endless stacking...
     
  30. No, if you have 2 stacks with 2 arrows in each, they will not stack if your plugin formed those stacks.. surely 2+2=4 and is less then 64 :)

    When testing without my waterslides it does seem to work. Are they somehow messing with things?

    Could actually be a result of interaction with lwc magnet also
     
  31. Can you fix that problem:
    When i put a sing and write there when i reload the server all i write ARE BLANC
     

Share This Page