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

    bergerkiller

    rtcabooservb test: disable auto lighting fixing in the configuration. just in case something is going wrong in that area and it is endlessly queuing chunks.

    killerciao that is a known XAuth issue, not related to NoLagg. Read the 'accessed from another thread' page on NoLagg Bukkit Dev if you want to know more about this.

    XAuth needs to be updated badly so that (severe) error is fixed.
     
  3. Offline

    rtcabooservb

    I'm using the default config. It is already disabled by default and the terrain was pre-loaded so no need to fix lighting/generate chunks.

    EDIT: Removed nolagg to speed up chunks again. Players complaining. =/ Let me know when you have another build you want tested.
     
  4. Offline

    bergerkiller

    rtcabooservb did the packet load ever decrease when the packet sending percentage was at 100%? Or did it stay at 80-90%?
    Also, just wondering again...does this also happen with Spout disabled? (or was it disabled at the time)

    A packet load of 90% with Spout enabled is crazy, then it would be queueing about 9 mb of data....
     
  5. Offline

    Jrog

    I was using the latest version of Orebfuscator. It's version "1.3.1-test 4".
     
  6. Offline

    rtcabooservb

    I always have spout enabled, need it on. =/ No, the packet load never decreased. Previous builds though, at 100%, it was between 0-10%.

    If I disable spout, which I don't want to because I need it for certain logging and vanishing, will you be able to find a fix if it is spout?

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

    bergerkiller

    rtcabooservb for one time, could you disable Spout? I have a strong suspicion this has to do with Spout keeping a chunk cache for Spoutcraft players.

    Also, removed the Spout packet listener stuff, added Orebfuscator obfuscate support instead.

    Aw god this is absolutely terrifying.
    While I am heavily reducing RAM usage, Orebfuscator is countering my effects tripple... :'(

    Even if caches are used, it allocates 80 kb of memory for every packet. Not only that, it also uses crazy methods to load from caches and save to caches, rendering caches pretty much useless. When writing to the cache he allocates 30 kb of data and writes that. That is completely not needed. When reading from the cache, it allocates a new byte array, reads the data into that, and transfers THAT data into the 80 kb buffer of previously, setting the data in the packet. This is seriously making mad right now :(

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

    slayerscout

    Hi all,

    I think this is a great mod and have used this from day one of my server being up, but i'm now getting some errors of which I'm not sure on and wanted to know if they can be fixed:

    Code:
    02:42 AM [SEVERE] [NoLagg] An error occured while performing a routine update:
    02:42 AM [SEVERE] java.lang.NullPointerException
    02:42 AM [SEVERE] at com.bergerkiller.bukkit.nolagg.spawnlimit.WorldLimiter.getEntityLimits(WorldLimiter.java:27)
    02:42 AM [SEVERE] at com.bergerkiller.bukkit.nolagg.spawnlimit.WorldLimiter.update(WorldLimiter.java:49)
    02:42 AM [SEVERE] at com.bergerkiller.bukkit.nolagg.spawnlimit.SpawnHandler.update(SpawnHandler.java:110)
    02:42 AM [SEVERE] at com.bergerkiller.bukkit.nolagg.meta.WorldMetaData.updateSpawnLimits(WorldMetaData.java:95)
    02:42 AM [SEVERE] at com.bergerkiller.bukkit.nolagg.meta.WorldMetaData.updateAll(WorldMetaData.java:78)
    02:42 AM [SEVERE] at com.bergerkiller.bukkit.nolagg.NoLagg$2.run(NoLagg.java:120)
    02:42 AM [SEVERE] at org.bukkit.craftbukkit.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:137)
    02:42 AM [SEVERE] at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:499)
    02:42 AM [SEVERE] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:431)
    02:42 AM [SEVERE] at net.minecraft.server.ThreadServerApplication.run(SourceFile:457) 
    I do use chunk manager and industrial craft 2 running on the server.
    Any help would be welcomed
     
  9. Offline

    bergerkiller

    slayerscout Ah industrial craft must have added an unknown block id to the mix, causing that error in the end :/
    I'll make a hotfix...

    EDIT
    See GitHub .3 test version 2.
     
  10. Offline

    phanaticd

    yea that null pointer was apparently craftbukkits fualt, but still gonna wait till very stable build comes out b4 reinstalling this
     
  11. Offline

    bergerkiller

    phanaticd yup you can wait until that slow sending issue is resolved. Somewhere something is sending huge amounts of data to the player, and worst is, I have no idea where to look at. I checked all exit points, but all are working as they should...

    rtcabooservb yes, but I do want to save myself a lot of code browsing if this is not needed...

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

    Teh Kitteh

    1.58.3 TEST2 Giving following error:
    Code:
    22.01 08:30:47 [Server] SEVERE [NoLagg] Failed to compress map chunk [89, -43] for player benthabrean
    22.01 08:30:46 [Server] SEVEREat com.bergerkiller.bukkit.nolagg.sending.ChunkCompressionThread.run(ChunkCompressionThread.java:151)
    22.01 08:30:46 [Server] SEVEREat com.bergerkiller.bukkit.nolagg.sending.ChunkCompressionThread.getCompressedPacket(ChunkCompressionThread.java:128)
    22.01 08:30:46 [Server] SEVEREat com.bergerkiller.bukkit.nolagg.sending.BufferedPacket51MapChunk.<init>(BufferedPacket51MapChunk.java:42)
    22.01 08:30:46 [Server] SEVERE java.lang.NoSuchFieldError: lowPriority
    22.01 08:30:46 [Server] SEVERE [NoLagg] Failed to compress map chunk [76, -30] for player benthabrean
    22.01 08:30:46 [Server] SEVEREat com.bergerkiller.bukkit.nolagg.sending.ChunkCompressionThread.run(ChunkCompressionThread.java:151)
    22.01 08:30:46 [Server] SEVEREat com.bergerkiller.bukkit.nolagg.sending.ChunkCompressionThread.getCompressedPacket(ChunkCompressionThread.java:128)
    22.01 08:30:46 [Server] SEVEREat com.bergerkiller.bukkit.nolagg.sending.BufferedPacket51MapChunk.<init>
    Not sure what parts of the errors connect together, so just copied a mass wall (Actually, I was getting this error every second)
    And no chunks are loading for players.
     
  13. Offline

    Wulfspider

    You know, there is an option to only disable the chunk caching as well in the config.yml file for SpoutPlugin. ;)
     
  14. Offline

    rtcabooservb

    Okay, I'll disable the spout chunk caching and test. Will it slow down the server though? :eek:

    bergerkiller Either you fixed the issue with .3 v2 or disabling spout's chunk cache fixed it. I'm getting chunk sending 100% at 2.0 chunks/tick and packet load 0.0%. 20TPS. Also, chunk packet sending thread is always less than 5% busy. Mostly below 1%, but occasionally goes higher. Using the default config.

    I'll test out raising the thread count and chunks/tick and see if I can get it to load super duper fast.

    Wulfspider
    Thanks. :D

    bergerkiller I don't know if this is a problem or not, but occasionally the chunk sending rate starts at 0% and SLOWLY moves up around 5% every 5 seconds until it is 100% Then I think it drops down to 0% again and restarts the loading to 100% when someone /spawn or /home and wants to generate new chunks. Again, I'll test out thread compression at a higher/lower number and chunk sending/tick at a higher value tomorrow. Goodnight. :p

    bergerkiller =/ The high packet load is back. Time to remove nolagg again unfortunately and turn back spout caching.

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

    bergerkiller

    rtcabooservb Looks like it is handling chunks of other players, which can explain the slow loading as it handles (and discards) far-away chunks as well. Question remains: why does it queue chunks of other players?

    Just to be sure:
    If this is the case, it explains the slow loading and high network usage, but doesn't explain why this is...
     
  16. Offline

    AndrewsPanda

    Since installing NoLagg 1.58.1. I have logged on my server to find two straight line rows of chunks through the main city have been regenerated. I this was was not due to worldedit and the two chunks running next to each other in the straight line regenerated into different biomes. One is grassy and the other is sand.
     
  17. Offline

    bergerkiller

    AndrewsPanda did you get any errors or warnings in the log?
     
  18. Offline

    rtcabooservb

    bergerkiller Yep, removing nolagg until a stable version is available.

    [​IMG]
     
  19. Offline

    bergerkiller

    rtcabooservb Uploaded 1.58.3. The slow sending is 100% solved and improved it even more. Chunk loading is finally as it was supposed to be, thanks to a friend that could join and help me fix all this :)

    (it turned out it eventually logged a negative sending percentage which was a breakthrough)

    It also no longer sends packets through Spout. This can help a lot I guess. Nevertheless, disable the chunk cache of Spout, I don't know how it can interfere.
     
  20. Offline

    sagethor

    bergerkiller
    This may not be a result of your plugin... but somehow black wool placed turns into green wool in a certain area. I may have to test around some more, because when destroying some green wool, it dropped gunpowder.

    Could be that incompatibilities with mcMMO are ever increasing; I had a post a while back talking about a "failed ITEM_SPAWN" event triggered by mcMMO's extra drops interfering with a NoLagg thread illegally. Will post in the new mcMMO topic as well.
     
  21. Offline

    bergerkiller

    sagethor that doesn't make sense the slightest, I guess it's more related to mcMMO than NoLagg :)
     
  22. Offline

    rtcabooservb

    So as long as I disable the chunk cache in spout, nolagg will work 100% again? :D? Also, what about the corrupted chunk in the nether? I fixed it though.
     
  23. Offline

    sagethor

    Yeah... because now it doesn't work. Thank goodness for something not being NoLagg's fault this time! :p
     
  24. Offline

    bergerkiller

    rtcabooservb yup, as long as you disable that, all should be well. Also, be careful with plugins that alter chunk packets, as it can cause odd behaviour. I decided to add support manually instead of using Spout.

    Results were astonishing so far, but of course, servers differ.

    sagethor IKR... NoLagg has been a pain for the past few weeks. Don't think the server admins had all the trouble...because I had to go after every possible way it could fail..and even then I don't fully trust it :/
     
  25. Offline

    rtcabooservb

    Multiverse handles the spawn event, would that have any corruption?
     
  26. Offline

    bergerkiller

    rtcabooservb probably not, unless it does this in another thread...but even then I nah...NoLagg would log that instantly.

    sylergcs Did you use the test version or the latest 1.58.3 version? Because the test versions (and 1.58.2) did have an issue with the chunk sending queue growing endlessly larger.

    migsthegod I can't tell without knowing the plugins you use. I recommend you make a world backup, run NoLagg with it enabled and fly around a bit. If you see a chunk getting scrambled, disable it and restore the backup.

    mahari3 That's odd, because I added Showcase support in NoLagg. Did you enable the plugin using a plugin manager? Because then NoLagg doesn't detect it.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Feb 15, 2019
  27. Offline

    rtcabooservb

    I'm running the test now, I'm still ranging between 70-90% packet buffer size. Chunk sending started at 15% and is slowly growing to 100%. Randomly going between 0.25 and 2 chunks/tick.

    Edit: Now on 100% at 0.25chunks/tick. =/ Still 50-80% packet buffer.

    Edit2: Chunk sending keeps starting and gradually growing to 100% to be restarted again. 88% packet buffer.

    Edit3: I'll disable all plugins except for nolagg and test. If I still have this issue, then nolagg has to go. =/

    Edit4: Nolagg had to go. =/ Chunks load 100% faster and less laggy without nolagg.
     
  28. Offline

    SilencShadoW

    Hey Guy,
    i tested with Berger a lot around. And NoLagg is still on my Server, not even with speedhack i can go up to the point where Chunks not get loaded. Maybe your system is not the best or a other plugin conflict with nolagg ... If u want to see the results on my system ( 45 plugins ... 1,8 gb map .... )

    server.littlebigadventure.de
     
  29. Offline

    migsthegod

    Is it safe now safe to enable "useBufferedChunkLoading" without risk of getting your world scrambled?
     
  30. Offline

    mahari3

    This plugin conflicts with 'Showcase'.
    It removes the shop items, but not the shop, the shop automatically replaces the items, and then nolagg deletes them again, and on the process repeats, its not a big deal, but its a small annoyance when looking at the console...

    EDIT1: This plugin is.... well, words fall short... everything is just... amazing. there is 99.9% less lagg, online and off. With this plugin everything runs so much smoother. It takes a genius to make this. I can't thank you enough for this...
     
  31. Offline

    sylergcs

    once CB is updated to 1.1 properly (a fully stable version) will this be updated as well?
    i have this for 1.0 and i have to say i now build everything on my server, with this plugin i have NO lag what so ever even when changing 700,000 blocks with world edit, i do that on single and my minecraft has a dicky fit.

    i just tryed running the 1.1 build thats "risky" and the only plugin that wasnt working was this, and OMG the lag!!!
    i badly need the chunk management that this plugin provides
     

Share This Page