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

    @Shooty the buffered chunk loader got added a few days ago, so if you used it before this year I am pretty sure it can't be NoLagg's fault. Of course, I can never know for sure...so if you can disable the buffered chunk loader, please do.

    EDIT

    Not at all. Those errors are related to something NoLagg never modified. To fix it, you can use ChunkSter to remove all entities from the world. Then try to restore the 'session.lock' from a previous backup. (it is always the same). The file can be found in the level folder.
     
  3. Offline

    Shooty

    Oh, i'd already used Chunkster and an other program (see the post below) but that not help me :(
    I'll see for the server.lock, what this file do ?
     
  4. Offline

    SilencShadoW

    should i try this? :D
     
  5. Offline

    Shooty

    Oh crap :(....i'll test....but i'v really no hope......i'v this probleme since 2weeks
     
  6. Offline

    Mojo_Blaster

    so should everybody who's got problems with corrupted chunks use "chunkster" ?

    just updated cb 1718-1744, downloaded 15.7.4 and used deafault config...seems to work.so is the problem solved or do i have to use chunkster,too ?
     
  7. Offline

    SilencShadoW

    is it breaked forever? or what you mean?
     
  8. Offline

    Shooty

    What problem are you talking about ?
     
  9. Offline

    bergerkiller

    Note: I THINK that I got it solved in 1.57.4. This is what was happening:
    Code:
    1. Buffered chunk unloads
    2. Is added to unloaded queue
    3. Is added to saving queue
    4. The same chunk loads again
    5. Loads from saving queue
    6. Now there are two chunks pointing to the same data
    7. The buffered chunk is written to file
    8. It finds out the buffered chunk is not referenced in the chunk map, it sets it free
    9. The buffered chunk data is re-used by another chunk
    10. Now two different-coordinate chunks point to the same data
    11. Epic corruption
    In 1.57.4 I fixed this by removing the buffered chunk from the unloaded queue when loading from the saving queue...

    Nevertheless, I am uploading 1.57.5, which has a slight performance enhancement when loading. It also correctly deals with 'not in GZIP format' exceptions now.
     
  10. Offline

    SilencShadoW


    Is it fixed in 1.57.5, i mean ... is it maybe fixed ... so i can try it on the same way and we will see :D
     
  11. Offline

    Mojo_Blaster

    talking about performance...mh..is it nornmal that since minecraft 1.1 nolagg does affect the performance, but not as much as it dit on 1.0(.1) ?
     
  12. Offline

    bergerkiller

    @Mojo_Blaster I am not sure, but 1.01 did have a lot of performance issues. It is possible that they improved some things in 1.1 which weakens some of NoLagg's results. For example, if they fixed the entity spawn bug, that would truly aid NoLagg's entity limiter.
     
  13. Offline

    Mojo_Blaster

    ah,ok

    I just noticed that chunks are loading slower than in 1.1, but don't know why.
     
  14. Offline

    bergerkiller

    @Mojo_Blaster I think that is a client fix. Minecraft client had some serious issues with not displaying the chunks after the client receives them. Was especially when in short view distance.

    EDIT

    Uploaded v1.57.5. It appears stable, but do make a world backup just in case it was not fixed at all. Maybe it was more than one thing causing it...but hopefully this resolved the 'flying chunk era'.
     
  15. Offline

    Shooty

    @bergerkiller So, you don't have an idea for my problem :( ?
     
  16. Offline

    bergerkiller

    @Shooty removing the session.lock file didn't work?
     
  17. Offline

    Mojo_Blaster

    is there a way to provocate the corrupting chunks? if you really want us to test 1.5.7.5 you have to wait about hours
    (i got my ferst corrupted chunk after 12 hours)

    isnt there a way to accelerate the tests?
     
  18. Offline

    Shooty

    Idk, we need to wait for a crash :/
     
  19. Offline

    Adrenaline

    Bukkit: 1764
    NoLagg: 1.57.1

    PHP:
    2012-01-15 15:23:25 [SEVEREjava.net.SocketExceptionBroken pipe
    2012
    -01-15 15:23:25 [INFOConnection reset
    2012
    -01-15 15:23:25 [SEVERE]     at java.net.SocketOutputStream.socketWrite0(Native Method)
    2012-01-15 15:23:25 [SEVERE]     at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:109)
    2012-01-15 15:23:25 [SEVERE]     at java.net.SocketOutputStream.write(SocketOutputStream.java:153)
    2012-01-15 15:23:25 [SEVERE]     at java.io.BufferedOutputStream.write(BufferedOutputStream.java:122)
    2012-01-15 15:23:25 [SEVERE]     at java.io.DataOutputStream.write(DataOutputStream.java:107)
    2012-01-15 15:23:25 [SEVERE]     at net.minecraft.server.Packet51MapChunk.a(Packet51MapChunk.java:89)
    2012-01-15 15:23:25 [SEVERE]     at com.bergerkiller.bukkit.nolagg.sending.BufferedPacket51MapChunk.a(BufferedPacket51MapChunk.java:65)
    2012-01-15 15:23:25 [SEVERE]     at net.minecraft.server.Packet.a(Packet.java:102)
    2012-01-15 15:23:25 [SEVERE]     at net.minecraft.server.NetworkManager.g(NetworkManager.java:122)
    2012-01-15 15:23:25 [SEVERE]     at net.minecraft.server.NetworkManager.d(NetworkManager.java:269)
    2012-01-15 15:23:25 [SEVERE]     at net.minecraft.server.NetworkWriterThread.run(SourceFile:99)
    ----

    PHP:
    2012-01-15 14:32:00 [WARNINGTask of 'NoLagg' generated an exception
    java
    .lang.NullPointerException
        at com
    .bergerkiller.bukkit.nolagg.NLBlockListener.fixColumn(NLBlockListener.java:93)
        
    at com.bergerkiller.bukkit.nolagg.NLBlockListener.fixColumn(NLBlockListener.java:65)
        
    at com.bergerkiller.bukkit.nolagg.NLBlockListener$1.run(NLBlockListener.java:58)
        
    at org.bukkit.craftbukkit.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:137)
        
    at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:502)
        
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:434)
        
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:465)
    2012-01-15 14:32:00 [WARNINGTask of 'NoLagg' generated an exception
    java
    .lang.NullPointerException
        at com
    .bergerkiller.bukkit.nolagg.NLBlockListener.fixColumn(NLBlockListener.java:93)
        
    at com.bergerkiller.bukkit.nolagg.NLBlockListener.fixColumn(NLBlockListener.java:65)
        
    at com.bergerkiller.bukkit.nolagg.NLBlockListener$1.run(NLBlockListener.java:58)
        
    at org.bukkit.craftbukkit.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:137)
        
    at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:502)
        
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:434)
        
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:465)
    2012-01-15 14:32:01 [WARNINGTask of 'NoLagg' generated an exception
    java
    .lang.NullPointerException
        at com
    .bergerkiller.bukkit.nolagg.NLBlockListener.fixColumn(NLBlockListener.java:93)
        
    at com.bergerkiller.bukkit.nolagg.NLBlockListener.fixColumn(NLBlockListener.java:65)
        
    at com.bergerkiller.bukkit.nolagg.NLBlockListener$1.run(NLBlockListener.java:58)
        
    at org.bukkit.craftbukkit.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:137)
        
    at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:502)
        
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:434)
        
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:465)
    2012-01-15 14:32:01 [INFORead timed out
    ----

    PHP:
    2012-01-15 14:26:26 [SEVEREException in thread "Thread-28"
    2012-01-15 14:26:26 [SEVEREjava.lang.NoSuchFieldErrorq
    2012
    -01-15 14:26:26 [SEVERE]     at com.bergerkiller.bukkit.nolagg.scheduler.ChunkOperation.fixBlockLighting(ChunkOperation.java:66)
    2012-01-15 14:26:26 [SEVERE]     at com.bergerkiller.bukkit.nolagg.scheduler.ChunkOperation.execute(ChunkOperation.java:110)
    2012-01-15 14:26:26 [SEVERE]     at com.bergerkiller.bukkit.nolagg.scheduler.ChunkScheduler.run(ChunkScheduler.java:150)
     
  20. Offline

    bergerkiller

    @Adrenaline that looks like a fatal crash because of an unsupported CB version...I guess they changed even more field names...

    EDIT

    Uploaded v1.57.6 for CB#1769, which should fix the issues you are having.
     
  21. Offline

    SilencShadoW


    Berger ... did u fixed some issues? MAYBE that fix the falsebook bug? then i can test it ... and we will see ... or did u rebuild my "bug" and can test it ??
     
  22. Offline

    bergerkiller

    @SilencShadoW I fixed it, but do test it yourself first.
    What falsebook did was instantly load a chunk again after it was unloaded, and this is exactly the cause why chunks got teleported and cloned. Since that is now fixed, I think the falsebook bug is also fixed.
     
  23. Offline

    SilencShadoW

    You fixed, or he fixed or bukkit? :eek: ... is it better to update to the newest bukkit first? im on 1744 yet


    EDIT: Is it more time to build in the oreb compatibility? (spout and so on) ? :eek: maybe u can implement it if it not take to long ... ? ill try it out in a sec but first the bukkit ver plz?

    can i get your mc server adress? to chat here is a bit stupid... sry

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

    bergerkiller

    @SilencShadoW Yes I recommend updating the server, but a lot of plugins will now break. (they changed a lot of field and method names to understandable versions, and this will continue to happen)
    You can also use 1.57.5, which is for lower versions. It does not differ from 1.57.6 other than the field/method names.
     
  25. Offline

    SilencShadoW


    Its generate now random Chunks ... in the areas, not in the FB areas :\ ... like a puzzle

    Maybe after i put in Spout ... i dont know that :S ... plz check out if it is spout chunks .....

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

    bergerkiller

    @SilencShadoW Weeel I got this...it's only one world but ... wut? Really REALLY weird, as it is not even chunk teleporting...it's like the dirt got removed?! I just can't believe this...
    [​IMG]

    This is REALLY scary...and it isn't even caused by NoLagg, and that is what truly scares me. Is this in 1769?!

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

    SilencShadoW

    I only got Chunk replaces ... nah, no replace, new generation, but not with this generator, maybe moves of other parts of the world because //regen works ... anyway! i put in spout, maybe that is it?????? plz check this out ... i cant test it yet, we got 16:00 in germany, only can test at 00:00 ... without user, but the "new regen" is random on any place ... not so easy to see like the falsebook problem, i will check this without spout and with falsebook later ... at 00:00 bc i took a rollback of 11 hours today ... bc of the random generated chunks, my member are angry ... anyway ... check out spout, i think this is it ... bc i put it today in and now i got told of random "mountains" .... got no backup before spout, dont know if it was spout or not ... plz plz look at there code :S

    The Remove of dirt, i not got ... i ever get random chunks, or copied chunks, sometimes DELETED chunks, up to the bedrock, a hole :D
     
  28. Offline

    bergerkiller

    @SilencShadoW Wait thaat is what I see too...but then in hyperdrive. Chunk are regenerated infinitely causing quite a mess...guess my custom loader is returning null all the time :?

    @SilencShadoW I run using hamachi (port forwarding is failing for me :( )
    Name after one of my friends so he can remember it more easily ;)

    EDIT

    Mmmh when I add a delay of 20 ticks before freeing the chunk this is fixed..but why? The chunk is surely dereferenced when this happens...

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

    kingdavidd

    I love your plugin but it just ruined most of my map and sadly I didnt backup, if you want to come check it out the ip is: hybridcraft.net
     
  30. Offline

    SilencShadoW

    We know that it goes crazy, its yet not recommended until its stable and we/he approve. No im not one of the developer. i just helped him to find out some bugs/errors/whatever
     
  31. Offline

    mrgreaper

    bumping this as it seems to have been missed and is a fairly major bug.

    think we will wait a few builds before attempting this one again, its killed my test server a few times now lol (yay for test servers)

    does anyone know one that just does the item stuff ? none of the chunk caching etc ? thats the only area we need tbh
     
    o0AzzA0o likes this.

Share This Page