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


    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. :)


    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


    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.


    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.


    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. :)


    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.


    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.


    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.


    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)


    Video by brandcool86


    - 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.

    - Add option to disable physics when the tick delay becomes too high


    Show your appreciation for my plugins by donating
  2. hmm normally GitHub is only freaking out if you try to upload a file with a name already existing within the download dir. You could just delete it and upload the new jar :)
  3. Offline


    Do I need the nolaggchunks?
  4. Offline


    @kahlilnc Nope, that's an add-on you can use to reduce network usage. It's sort of a beta file, since I am waiting for Spout to improve the Packet Listener.

    @Lathanael That's what I think it is. However, I click 'Manage Downloads' and then the red 'Delete'. I wait a few seconds, and do an 'add download' and upload the new plugin. For some reason the old version stays up...been a pain since months ago.
    kahlilnc likes this.
  5. Offline


    Got lot of chunk errors since i downloade nolag and nolagchunks....!
  6. Offline


    @biokemisten disable/remove the NoLaggChunks add-on and see if that resolves the issue. Note: it appears to happen only when /reloading. (buffered chunks are not persistent so they are never sent again, known bug)
  7. Offline


    Can anyone zip a tar.gz version or a .zip ?
  8. Offline


    @Joh I'll upload it as a zipped version too.
  9. Offline


    Version in changelog update is wrong - also - versioning your filenames would help.
  10. Offline


    Not a lot wrong with it as it is now I use it just don't use the addon yet.
  11. Offline


    Can you remove the .rar extension?
    Even a .zip would be better...
    Its hard to open a rar file on ubuntu in command line :l
  12. Offline


    @Obliviator uploaded it in a zipped archive. (yesterday)
  13. Offline


    I tried reloading my server after configuring another plugin, and I got spammed with this error. I got spammed with it before, but I upgraded spout from 449 to 459 to try and fix it.

    -Using CraftBukkit 1318, Spout 459, and NoLaggChunks (DL'd Oct. 13th)
    The above line was spammed... I can't remember how many times. But it was enough to hang up the reload to where everyone was kicked.

    Also: If someone disconnects by being kicked or timed out, when they log back in they don't receive any chunk data, aside from the one they are in. They must log out by going back to the menu, and log back in to load up all the chunks around them again.
  14. Offline


    @Onlyme that's an issue I can't resolve, bukkit simply doesn't like it if I have an async thread running...
    Another reason not to use the chunks add-on if you frequently reload and/or explore new areas of a world.
  15. Offline


    Why can't I change configuration? Even if I disable the plugin, change the configuration, and then re-enable the plugin, the configuration keeps getting reset.

    I'm trying to change
            mob: 300
    to 600.
  16. Offline


    @jonathanyc Weird, it shouldn't write default spawn limits...did you enable spawn limits in this config as well? (the node) Can I see the entire config.yml?

    It shouldn't write to the config...does the same happen if you stop the server, change and then start? Do you use a certain plugin to enable/disable a plugin?
  17. Offline


    but will it blend? <3
  18. Offline


    I really do like this plugin no lag features. But the spawnlimiter... is well limited. So i've used a plugin called customdifficulty. Customerdifficulty work 100% when Nolagg is not installed. NoLagg plugin when combined with CustomDifficulty plugin mob spawning goes crazy not doesnt follow any rules set by either plugin. Even when I set Nolagg to "useSpawnLimits: false" it still seems to break mob spawning. Does "useSpawnLimits: false" actually disable the interaction or set limit to infinite???
  19. Offline


    Thanks for the reply!

    Here's the config.yml:

    formItemStacks: true
    maxItemsPerChunk: 40
    maxTnTIgnites: 40
    tntDetonationInterval: 1
    tntDetonationRate: 1
    chunkUnloadDelay: 10000
    autoSaveInterval: 18000
    orbScannerInterval: 200
    updateInterval: 20
            mob: 300
    explosionRate: 40
    chunkSendInterval: 2.0
    bufferItems: true
    bufferTNT: true
    useSpawnLimits: true
    useChunkUnloadDelay: true
    The same thing happens if I completely restart the server like you described. I've also tried using PlugMan to load plugins, but that has the same result.

    Perhaps I'm formatting something wrong? I'll go doublecheck on my end, but it seems unusual.
  20. Offline


    @ray0911 If it's disable it ignores entity spawn and spawn limit updates entirely, so it should yes. I'll double-check that though.

    @jonathanyc I see no errors here, same as the above, I'll take another look.
  21. Offline


    Are mobs still going to be removed on chunk unload?
  22. Offline


    I'm a player on a server with a showcase plugin.
    My friend and I use a glitch that allows us to have items floating around by putting another step on top of a basic showcase and breaking it. We usually use it instead of putting a sign above our chests.

    I was putting 2 sand ones next to each other, when I noticed that I had started picking up more sand after I had used the glitch. It's a dupe bug that seems to work for any block. Could you please get this fixed? I can get someone else to make a video if you'd like.

    I just tried this with rotten flesh and melons, and it works.
    I tried with a pickaxe, and it doesn't.
    I think it may be all stackables.

    More editing:
    This seems to be caused by both Showcases and the NoLagg plug in we have.
    It puts together the two showcase items and makes the server think that they're normal items, not showcase.

    I also discovered there is no need to break the showcase or put another step on and it works with finite showcases.

    (I just mostly copied this post from the one I put in the showcase thread)
  23. Offline


    I run Spout on my server, but I'd like to run NoLagg. Do the current Spout incompatibilities mean that I should wait awhile? Or do they only affect the add-on?
  24. Offline


    @Greylocke only affects the add-on, you can use NoLagg without Spout. (the add-on is not really working either, I recommend to avoid using it unless you want to 'test it')
  25. Offline


    1.3.2 doesn't seem to work as well as the previous version. I was doing some testing with large-scale drain/fill commands on the ocean and there was enough lag to kick me off the server. Subjectively, the last version didn't do that. Is there any way to buffer drain/fill a little better? Also - not sure if caused by NoLagg or some other plugin -- or bukkit/mc1.8.1, but there are glitches where an entire strip of land in the immediate player vicinity (seen by all players) will remain undrawn all the way down to bedrock (just shows up as a shadowy see-through glitch area). I've noticed it intermittently since installing the new version of NoLagg. I know that's not incredibly helpful, but maybe you have some direct insight based on being familiar with the code and how you are buffering updates (if the problem is occurring because of NoLagg). Thx!
  26. Offline


    @GravelSocks I only get these issues when I use the NoLaggChunks add-on and press /reload. Has to do with chunks in the buffer not getting sent to the player and never sent again. If you don't use the add-on, it could be that disabling chunk unload delays will fix the issue.
  27. Offline


    @bergerkiller - I am not using spout and do not have NoLaggChunks installed. I thought NoLaggChunks had its own configuration. Are you saying that the useChunkUnloadDelay does not apply to the base plugin? If so, then that setting probably belongs in the other config. Does the base plugin provide any persistent chunk functionality at all?

    And actually - just a minor correction to my previous post - not using fill - using /fixwater (but still worldedit) - but you are probably intercepting the operation at the minecraft level (?). Is there some issue in intercepting commands from WorldEdit (maybe?).
  28. Offline


    Shouldn't it be v1.32? Same as the title?
  29. Offline


    Putting a radius for the automatic stacking of items could realllyyy help. Making it so you can set a radius in which items are stacked. Say if you cut down about 5 trees, it's able to gather the logs all from them into a single stack or so on.

    Anyways whats the best setup for nolagg (not the addon)

    This is my config:
    autoSaveInterval: 40000
    explosionRate: 5
    useSpawnLimits: true
    tntDetonationRate: 10
    bufferTNT: true
    bufferItems: true
    useChunkUnloadDelay: true
    updateInterval: 10
    tntDetonationInterval: 1
    chunkUnloadDelay: 2000
    formItemStacks: true
    chunkSendInterval: 5.0
    maxItemsPerChunk: 40
            mob: 1500
            animal: 500
            monster: 1000
  30. Offline


    gettin problems with this at minesworn. ppl immediately started complaining about chunks just not loading. and i noticed this as well while flying an teleporting. and some chunks just would never load with out client restarts
  31. Offline


    PS..! got it working!

Share This Page