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

    Jadedwolf

    I'm using multiverse. So, no portal events are used when teleporting. Also it's literally only the spawn chunk. Not even teleporting huge distances will cause this missing client side chunk, only the spawn chunk for worlds do not load and only when teleporting cross world.
    I can use /spawn or even use teleport cords to get to thus chunk and it always loads.
    This happens again (I'm reiterating) only when teleporting to a different world and it's only the spawn chunk.
     
  3. Offline

    fffizzz

    @bergerkiller Im using Multiverse along with Multiverse Portals to make the connection between worlds, however I dont think its doing anything other than a normal onWorldChange like the others (could be wrong and probably am :D) Its definately an issue in the NoLaggChunks, because without it, its fine. Teleporting arounf the same world doesnt seem to warrant that but havent tested that aspect much.

    some random stats for semi busy server if you're interested. 48 players online when this occured.. 8 loaded worlds..
    Code:
    0:52:07 [INFO] Memory: 1466/2668 MB (+0 modified)(+-62 MB/s)
    20:52:07 [INFO] Chunks: 10791 [5013 Buffered] [+285] [-2] [0 left to save]
    20:52:07 [INFO] Entities: 2211 [1927 mobs] [212 items] [0 mobile TNT]
    20:52:07 [INFO] Buffers: [0 TNT] [0 items]
    20:52:07 [INFO] Ticks per second: 15.2 [76.0%]
    20:52:09 [INFO] -
    20:52:09 [INFO] Memory: 1466/2668 MB (+6 modified)(+3 MB/s)
    20:52:09 [INFO] Chunks: 10784 [5006 Buffered] [+16] [-23] [0 left to save]
    20:52:09 [INFO] Entities: 2256 [1944 mobs] [241 items] [0 mobile TNT]
    20:52:09 [INFO] Buffers: [0 TNT] [0 items]
    20:52:09 [INFO] Ticks per second: 20.3 [102.0%]
    20:52:11 [INFO] -
    20:52:11 [INFO] Memory: 1445/2668 MB (+0 modified)(+-14 MB/s)
    20:52:11 [INFO] Chunks: 10784 [5006 Buffered] [+0] [-0] [0 left to save]
    20:52:11 [INFO] Entities: 2236 [1948 mobs] [217 items] [0 mobile TNT]
    20:52:11 [INFO] Buffers: [0 TNT] [0 items]
    20:52:11 [INFO] Ticks per second: 21.9 [110.0%]
    20:52:13 [INFO] -
    20:52:13 [INFO] Memory: 1445/2668 MB (+72 modified)(+30 MB/s)
    20:52:13 [INFO] Chunks: 10788 [5010 Buffered] [+4] [-0] [4383 left to save]
    20:52:13 [INFO] Entities: 2227 [1946 mobs] [209 items] [0 mobile TNT]
    20:52:13 [INFO] Buffers: [0 TNT] [0 items]
    20:52:13 [INFO] Ticks per second: 16.9 [84.0%]
    20:52:15 [INFO] -
    20:52:15 [INFO] Memory: 1445/2668 MB (+81 modified)(+4 MB/s)
    20:52:15 [INFO] Chunks: 10819 [5041 Buffered] [+41] [-10] [4005 left to save]
    20:52:15 [INFO] Entities: 2233 [1947 mobs] [214 items] [0 mobile TNT]
    20:52:15 [INFO] Buffers: [0 TNT] [0 items]
    20:52:15 [INFO] Ticks per second: 19.9 [100.0%]
    >nolagg monitor
    
    edited out all other chatspam

    07:35:22 [INFO] This server is running Craftbukkit version git-Bukkit-1.8.1-R4-73-g94be8c9-b1549jnks (MC: 1.0.1) (Implementing API version 1.0.0-R1-SNAPSHOT)
    >nolagg monitor
    07:35:31 [INFO] Memory: 1971/2471 MB (+0 modified)(+-48 MB/s)
    07:35:31 [INFO] Chunks: 7596 [1968 Buffered] [+21] [-0] [1227 left to save]
    07:35:31 [INFO] Entities: 1354 [1216 mobs] [109 items] [0 mobile TNT]
    07:35:31 [INFO] Buffers: [0 TNT] [0 items]
    07:35:31 [INFO] Ticks per second: 20.0 [100.0%]
    >nolagg monitor


    running perfect on 1549.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Sep 9, 2018
  4. Offline

    silentdojo

    @jadedwolf, @fffizzz We actually had the same problem with the same plugins. I also noticed when I died and was auto TPed to my bed (using MyHome) I was stuck in a lagged chunk that I couldn't move in. When removing NoLaggChunks it was better.
     
  5. Offline

    hawianguy1189

    Just to give everyone a heads up. NoLagg does not work with bukkit v1547. As soon as I downgrade to 1546 it works but not 1547. Here what i get:

    2011-12-01 19:02:35 [SEVERE] Error occurred while enabling NoLagg v1.5 (Is it up to date?): null
    java.lang.AbstractMethodError
    at net.minecraft.server.WorldMapCollection.b(SourceFile:107)
    at net.minecraft.server.WorldMapCollection.<init>(SourceFile:29)
    at net.minecraft.server.World.<init>(World.java:154)
    at net.minecraft.server.WorldServer.<init>(WorldServer.java:27)
    at com.bergerkiller.bukkit.nolagg.DummyWorld.<init>(DummyWorld.java:57)
    at com.bergerkiller.bukkit.nolagg.DummyWorld.<init>(DummyWorld.java:54)
    at com.bergerkiller.bukkit.nolagg.ChunkSaving.init(ChunkSaving.java:31)
    at com.bergerkiller.bukkit.nolagg.NoLagg.onEnable(NoLagg.java:195)
    at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:188)
    at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:957)
    at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:280)
    at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:182)
    at org.bukkit.craftbukkit.CraftServer.enablePlugins(CraftServer.java:165)
    at net.minecraft.server.MinecraftServer.t(MinecraftServer.java:337)
    at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:324)
    at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:161)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:388)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:457)
     
  6. Offline

    rtcabooservb

    @bergerkiller Still experiencing invisible signs with the latest update 1.50.3.
     
  7. Offline

    ledhead900

    Actually entity checks does not really increase visible cpu usage due to the fact that depending on what your limits are set at your overall entity overhead could be LESS then default for instance the default per world is 2500 , I think, If I decrease this to a mere 15 on one world, 1200 on another then I have reduced the over head of possible loaded mobs.

    And thus saving CPU cycles.

    Are you using spout and the spoutclient?, If you are set your sign view distance to 16 or higher in the video options.
     
  8. Offline

    bergerkiller

    Ok thanks for the feedback, I pretty much tried everything possible with the signs, so doubt I can come up with some other type of fix...and I'll look at the changed interface error later.

    Also, I'll look at the source of MultiVerse to check what I can do. I need to get a teleport event right before the new chunks are sent, if this is not the case it will result in missing chunks like that.
     
  9. Offline

    bergerkiller

    Ok multiverse has an API which fires when a player is teleported. Now checking if this can be used.
     
  10. Offline

    hawianguy1189


    Well I havent tried that one. They pushed out more updates and wasnting looking for em. Thanks ill give it a shot.
     
  11. Offline

    bergerkiller

    @Jadedwolf @fffizzz Re-uploaded v1.50.3 on GitHub, added a simple warning message to the log when it disposes a chunk which is out of reach. Could you try it out with MultiVerse and redirect possible log messages? If none are logged and the issue did occur, then post this as well.

    I suspect it does the chunk position update too late, noticing a world change too late, causing it to throw away the packet until the position got finally updated. Now considering adding my own type of chunk location system, handling world changes.

     
  12. Offline

    Jadedwolf

    Updated to 1.50.3 nolaggchunks.jar and still the same issue occurred and without any in game or console errors warnings or even messages. So just deleted nolagchunks again till you fix.
     
  13. Offline

    bergerkiller

    @Jadedwolf ok then it's not the update part that is failing. mmh...it's pretty hard to test it if you have no issues yourself :/
     
  14. Offline

    Jadedwolf

    I do have an issue lol. There is no spawn chunk when teleporting multi world with multiverse. :p
    Edit: Would you like to see it for your self on my server?
     
  15. Offline

    bergerkiller

    @Jadedwolf if possible, but does have to be in offline mode unfortunately...

    Ok updated to 1.50.4, fixing the chunk issues mentioned by @fffizzz and @Jadedwolf (thanks for the debug help Jadedwolf :) ), it is possible this also fixes the blank signs issue, since it is semi-related to the buffer coords issue that was occuring.

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

    QQCucumber

    If you have any issues with signs still, and you use Spoutcraft, please see if you still have them with the regular Minecraft client.
     
  17. Offline

    Flatliner

    Everything seems to be fine with the latest version but I do still have invisible sign text issues if I lower the interval below the default. So long as I leave it at stock settings though everything is perfect.
     
  18. Offline

    QQCucumber

    Are you using the normal Minecraft client or Spoutcraft?
     
  19. Offline

    rtcabooservb

    @bergerkiller Would it be possible to integrate the multiverse api for teleporting? Multiverse seems to have it down correctly where chunks instantly load and you don't notice any delay.
     
  20. Offline

    nova1104

    Where is the download for the .jar
     
  21. Offline

    Flatliner

    Normal minecraft client.
     
  22. Offline

    rtcabooservb

    @bergerkiller I would very much LOVE to use nolagg chunks, but signs STILL occasionally turn invisible. Using the normal minecraft client, latest spout 583, latest CB 1550. =/ I tried keeping the config default, I tried raising values, and even tried lowering values.
     
  23. Offline

    bergerkiller

    @rtcabooservb don't forget that NoLaggChunks focuses on limited network usage, sending a batch of 50 chunks at one go is entirely the opposite of that. If it ain't needed, don't do it, chunks load more than quick enough. Not sure about the signs though, haven't seen a blank signs during hours of flying/walking around...so yeah
    What plugins do you use? Maybe it's some other plugin acting up.

    @nova1104 You can find it on GitHub, see the main page below (links).
     
  24. Offline

    Inscrutable

    I'm not sure how serious this warning is. Version details at the end. MC Server 1.0.1
    Code:
    11:54 AM [INFO] [Spout] Successfully authenticated worm424's Spoutcraft client. Running client version: 842
    11:57 AM [INFO] [Lockette] worm424 has released a container.
    11:58 AM [WARNING] [NoLagg] [Chunks] Packet out of reach of 'worm424': [MapChunk 51: uncompressed Part: [-158/68/258] : [5x6x3]]
    11:58 AM [WARNING] [NoLagg] [Chunks] Packet out of reach of 'worm424': [Packet130UpdateSign]
    12:05 PM [INFO] Connection reset
    12:05 PM [INFO] worm424 lost connection: disconnect.quitting
    12:11 PM [INFO] Spout version 583
    12:11 PM [INFO] NoLagg version 1.50.4
    12:11 PM [INFO] This server is running Craftbukkit version git-Bukkit-1.8.1-R4-77-ge86a355-b1550jnks (MC: 1.0.1) (Implementing API version 1.0.0-R1-SNAPSHOT)
    12:15 PM [INFO] NoLaggChunks version 1.50.4 
     
  25. Offline

    bergerkiller

    @Inscrutable in this case not really bad, it was simply a forgotten block update that wanted to be displayed to a player too far away. Added the warnings for debug purposes in case you notice missing chunks.
     
  26. Offline

    spunkiie

    @bergerkiller
    If I set spawn limits for a mob (i.e: Sheep/100) I can't deliberated spawn a Sheep with CommandBook /spawnmob.
    IIRC NoLagg was designed to let it happen normally, right ?
     
  27. Offline

    rtcabooservb

    I'm pretty sure it isn't a plugin problem with one I'm using. I don't raise the chunks being sent out past 20/4 seconds. I even tried it with default settings let me remind you. The only plugins I have that tampers with teleporting/chunks would be multiverse and essentials and I tried disabling both of them.
     
  28. Offline

    ledhead900

    I have to agree bergerkiller Its only nolagg that is causing the sign issue. as with out noalagg signs are fine.

    I have been a test server for a while on 1.0 updating CB each time a new one is out and no sign bug I move it all to the main server to trial a RL run and sign bug since nolagg was updated.
     
  29. Offline

    bergerkiller

    @ledhead900 @rtcabooservb Then since what version did this issue occur? I already tried a lot of methods to fix it:
    Any other way packets can be cleared is if the player moves and a chunk buffer with packets becomes out of reach. (no warning there, it happens too often)

    - Do you get any 'out of reach' warnings in the log?
    - What is the view distance of the server?
    - What is the download size/chunk view distance of NoLaggChunks?
    - Are signs blank near you when you joined a world?
    - Do you have to walk a certain distance before you spot blank signs?
     
  30. Offline

    rtcabooservb

    #1. Yes and no. When raising the chunk download rate I do, but keeping it default, no.
    #2. 10
    #3. I tried download size of the buffer at 0, 1, 5, 20, and view distance 10.
    #4. No, but when I teleport around the spawn quiz, (have the plugin buttonwarp) I end up seeing blank signs near the end. Note, I also tried without the plugin buttonwarp.
    #5. All depends.

    Been having this issue since NoLaggChunks version 1.45? Tried every update, even 1.50.5.
     
  31. Offline

    bergerkiller

    @rtcabooservb 1.45 didn't even exist...in other words: every since it was made :/
    Code:
                        //Remove chunks that will be re-sent by the game later on anyway
                        BufferedChunk[] gen = this.chunks.values().toArray(new BufferedChunk[0]);
                        this.chunks.clear();
                        for (BufferedChunk bc : gen) {
                            if (this.isNear(bc.x, bc.z, maxview)) {
                                this.chunks.put(new Chunk(bc.x, bc.z), bc);
                            } else {
                                bc.clear();
                            }
                        }
    Simple question/todo:
    1. Spawn in your world
    2. Fly upwards, DO NOT move forwards/backwards
    3. Look around you and wait until all chunks are received
    4. Go to the farthest chunk you can see (at the border)
    5. Blank signs here? Blank signs one chunk further?

    If possible, could I join myself to check it out? (Offline mode tho)

    @ledhead900 *edit*

    Ok SignLink needs an update for 1.00, packet function name changed from l to k and the NBTcompound had a name change. Updating it on the SignLink page.

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

Share This Page