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

    rtcabooservb

    I know it is. Everything works EXCEPT /lag.
     
  3. Offline

    Noxturno

    Noxturno not yet, I was waiting for that plugin to publish a new 1.2.3 build. I guess it's out, so expect a fix soon.

    Great! thanks. only thing that doesnt work its the chunk thing :)
     
  4. Offline

    lolidk40

    Please Help i get this Error on my WorldLoading For No-Lagg
    [WARNING] Failed to load ban list: java.io.FileNotFoundException: banne
    .txt (The system cannot find the file specified)
    [WARNING] Failed to load ip ban list: java.io.FileNotFoundException: ba
    txt (The system cannot find the file specified)
    [WARNING] Failed to load operators list: java.io.FileNotFoundException:
    (The system cannot find the file specified)
    [WARNING] Failed to load white-list: java.io.FileNotFoundException: whi
    xt (The system cannot find the file specified)
    [INFO] Preparing level "Camp Half-Blood"
    [INFO] Default game type: 0
    [INFO] Preparing start region for level 0 (Seed: -5969634429078625906)
    [SEVERE] java.net.ConnectException: Connection refused: connect
    [SEVERE] at java.net.DualStackPlainSocketImpl.connect0(Native Met

    [SEVERE] at java.net.DualStackPlainSocketImpl.socketConnect(Unkno
    )
    [SEVERE] at java.net.AbstractPlainSocketImpl.doConnect(Unknown So

    [SEVERE] at java.net.AbstractPlainSocketImpl.connectToAddress(Unk
    ce)
    [SEVERE] at java.net.AbstractPlainSocketImpl.connect(Unknown Sour

    [SEVERE] at java.net.PlainSocketImpl.connect(Unknown Source)
    [SEVERE] at java.net.SocksSocketImpl.connect(Unknown Source)
    [SEVERE] at java.net.Socket.connect(Unknown Source)
    [SEVERE] at java.net.Socket.connect(Unknown Source)
    [SEVERE] at sun.net.NetworkClient.doConnect(Unknown Source)
    [SEVERE] at sun.net.www.http.HttpClient.openServer(Unknown Source

    [SEVERE] at sun.net.www.http.HttpClient.openServer(Unknown Source

    [SEVERE] at sun.net.www.http.HttpClient.<init>(Unknown Source)
    [SEVERE] at sun.net.www.http.HttpClient.New(Unknown Source)
    [SEVERE] at sun.net.www.http.HttpClient.New(Unknown Source)
    [SEVERE] at sun.net.www.protocol.http.HttpURLConnection.getNewHtt
    nknown Source)
    [SEVERE] at sun.net.www.protocol.http.HttpURLConnection.plainConn
    wn Source)
    [SEVERE] at sun.net.www.protocol.http.HttpURLConnection.connect(U
    urce)
    [SEVERE] at sun.net.www.protocol.http.HttpURLConnection.getInputS
    nown Source)
    [SEVERE] at java.net.URL.openStream(Unknown Source)
    [SEVERE] at com.griefcraft.util.Updater$1Background_Check_Thread.
    er.java:491)
    [SEVERE] at java.lang.Thread.run(Unknown Source)
    [SEVERE] Exception in thread "Thread-14"
    [SEVERE] java.lang.NullPointerException
    [SEVERE] at com.griefcraft.util.Updater.shouldAutoUpdate(Updater.

    [SEVERE] at com.griefcraft.util.Updater.tryAutoUpdate(Updater.jav

    [SEVERE] at com.griefcraft.util.Updater$1.run(Updater.java:190)
    [SEVERE] at com.griefcraft.util.Updater$1Background_Check_Thread.
    er.java:509)
    [​IMG]

    It is taking him far too long to unload the chunks; the duration should be around 0.1 per tick or so.[/quote]
     
  5. Offline

    bergerkiller

    lolidk40 I'll look at some ways to improve performance when checking for nearby players, because that is currently the problem.

    Updated NoLagg to 1.77. Fixes:
    • Faster chunk 'is player nearby' checking - less time spent updating chunks
    • Examine log name fixed and colors changed to properly show one-color graphs
    • Chunks 'useBufferedLoader' setting added to add compatibility for all netserverhandler related plugins
    • BKCommonLib had some fixes regarding the class loader
    So, if you want to use the raw critics' ore obfuscator, disable the buffered chunk loader bit. This will make the plugin use the sendPacket function, which flows through Spout and other plugins. The thread count no longer applies then!

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

    rtcabooservb

    I would like you to know that with nolagg.jar, the command /lag doesn't work. Without nolagg.jar, /lag works. I miss the /lag command. I used it all the time.
     
  7. Offline

    number1_Master

    After updating to 1.77, every time a mob gets hurt, it instantly teleports off to some weird place (at least it seems like that; They could just be all instant kills). I have lots of belief it is because of NoLagg. When I get the time, I will test it out.
    Heres a list of my plugins (those in build I think might be affected Mob spawning also):
    Orebfuscator, MultiWorld, bPermissions, NoIce, PlgLogCmd, WorldEdit, Towny, CommandBook, Buycraft, Vault, LogBlockQuestioner, LogBlock, Questioner, AutoMessage, MineBackup, iSafe, iConomy, Register, BKCommonLib, mcbans, Lockette, SimpleSpleef, NoCheat, mcMMO, MobArena, NoLaggChunks, NoLaggLighting, NoLaggTNT, NoLaggItemBuffer, TownyChat, NoLaggItemStacker, ecoCreature, NoLaggMonitor, NoLaggExamine, NoLagg, ChestShop
    Thank you!
     
  8. Offline

    bergerkiller

    nunber1_Master yup I found an issue in the spawn limiter. There is a very slim chance that the entity is physically removed as soon as you kill it. This only happens to previously ignored entities and only happens if almost the same second the spawn handler routine update is performed. Disabling spawn limits fixes this.

    rtcabooservb fixed here, will upload once I found/fixed all other bugs.
     
  9. Offline

    number1_Master

    Spawn limits have always been disabled for me.
    I didn't have a chance to edit my post above, but this doesn't seem to happen with spiders.
    Edit: It seems to happen to all Mobs (animals and monsters).
    Edit (again): THIS IMPORTANT When anything looses health on the server (Mobs are players), it teleports them to spawn.
    EDIT: It was an issue with iSafe. It is fixed!!! Also, the Mob spawning issue for me was fixed. It was some weird feature with multiworld when you had options set for the main world in the config. I figured it out.
    But thanks for your patience!
     
  10. Offline

    rtcabooservb

    Any ETA on the fix and any ETA on the spawn limiter fix? I use that limiter. :(
     
  11. Offline

    nodigit

    bergerkiller For some reason NoLaggChunks keeps giving me the "Can't keep up!" message with an average 15tps even with only 30 players online. I'm running from a dedicated dual quad-core with 32GBs of RAM w/ ramdisk on a 100 megabit connection. It almost seems the server runs better without it but I'd like to use Nolaggchunks to take advantage of the multiple cores my server has. Any idea what I'm doing wrong?


    Here's my config file:

    minRate: 0.25
    maxRate: 2.0
    triggerRate: 0.5
    bufferedLoader:
    enabled: true
    threadCount: 100

    I tried experimenting with the "threadCount" on multiple settings 2,8,60,100 etc and still no luck? The server appears to be using 4 out of the 8 cores when NolaggChunks is running, and only uses 1 core without it so it has to be doing something?
     
  12. Offline

    bergerkiller

    nodigit
    You are shitting me, right?

    You DO know you are basically launching 100 separate 'programs' right now? 1-2-3 threads is more than enough to go around. I wonder how your computer didn't just explode instantly...

    Are you possibly using Orebfuscator or a similar plugin? You can try disabling the buffered chunk loading bit, maybe it works out for you. Right then it runs all on the internal compression threads, which may be a bit less fluent but rids of any incompatibility issues.

    rtcabooservb nunber1_Master The problem is a bit rooted right in the plugin...will be hard to fix it. Problem is that it has to 'keep the entity alive' for longer after it got killed, with NoLagg's spawn limiting abilities it instantly marks this entity a possible disposable and does so....
     
  13. Offline

    number1_Master

    Re read my post plz!
     
  14. Offline

    bergerkiller

    nunber1_Master aallright then, though I did notice a possible bug. Maybe it had enough time to get around it :)
     
  15. Offline

    number1_Master

    Ya. I figured it all out. :) But then again, their could be bugs I'm missing about NoLagg.
     
  16. Offline

    nodigit


    Like I said, I tried it on multiple threadcount settings and I still get the same result. The config file comment says "increase if it can't keep up" and that's what I did. The server really doesn't have that many plugins, just all the basics Nolagg plugins, essentials, logblocks, worldedit, worldguard, multiverse, etc. What else could it be?
     
  17. Offline

    bergerkiller

    nodigit use /lag examine 1000, wait for it to finish and generate the log file and open the file in NoLaggExamine.jar. (double-click the jar, window pops up, drop file in file box)
    It will tell you exactly what plugin is lagging the server.

    I recommend using World Border (plugin) to prevent new chunks from getting generated. It lags the server quite badly.
     
  18. Offline

    nodigit


    Alright, well I did a full exam and I still cant figure out whats causing the problem. I uploaded a copy of the log file below.

    http://nodigit.com/log.exam

    If you could please examine it, that'd be great.

    Thanks
     
  19. Offline

    SeeD419

    I'm getting block lag when I play on my server. I'm guessing since I'm the only one experiencing this that it's due to my terrible wireless driver (linux). We get 60 mbps down but with this awful driver I'm constantly getting dropped connections and such, and I think the block lag is a latency issue.

    Do you think this plugin could help this kind of issue in any way?
     
  20. Offline

    Greylocke

    I'm getting the following error when the BKCommonLib tries to load:
    Error in Server Log (open)
    Code:
    2012-03-12 23:12:21 [INFO] Starting minecraft server version 1.2.3
    2012-03-12 23:12:21 [INFO] Loading properties
    2012-03-12 23:12:21 [INFO] Starting Minecraft server on *:25565
    2012-03-12 23:12:21 [INFO] This server is running CraftBukkit version git-Bukkit-1.2.3-R0.2-b2060jnks (MC: 1.2.3) (Implementing API version 1.2.3-R0.2)
    2012-03-12 23:12:22 [SEVERE] Could not load 'plugins/BKCommonLib v1.08.jar' in folder 'plugins'
    org.bukkit.plugin.InvalidPluginException: java.lang.VerifyError: class com.bergerkiller.bukkit.common.PluginBase overrides final method getName.()Ljava/lang/String;
        at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:150)
        at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:287)
        at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:211)
        at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:207)
        at org.bukkit.craftbukkit.CraftServer.<init>(CraftServer.java:183)
        at net.minecraft.server.ServerConfigurationManager.<init>(ServerConfigurationManager.java:56)
        at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:156)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:425)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:490)
    Caused by: java.lang.VerifyError: class com.bergerkiller.bukkit.common.PluginBase overrides final method getName.()Ljava/lang/String;

    I've tried CB2063 & CB2060 with the same results. I started with the CommonLib that was in the 1.77 zip file. Then I tried a copy that I pulled from a working MC1.1 server. Oddly enough the libs were the same exact size. Is it possible that an old BKCommonLib got into the 1.77 zip?

    Or is this another PEBKAC?
    [edited after getting some sleep] bergerkiller your .zip is good, my tired brain... not so much. Even though I downloaded the newest version, I was pulling from an old version in my files. derp.
     
  21. Offline

    bergerkiller

    Greylocke mmh that is indeed a very old version :/

    Lemme check if it has the correct version in there...

    Afraid not; if packets are getting randomly destroyed it takes ages before a packet gets successfully sent (it re-sends until it is successful)
    I really recommend fixing the driver to decrease the 'packet loss' you are having. Even with less connection usage (NoLaggChunks) block placement packets still take long to arrive at your client.

    I looked at it, but all seemed fine. I don't think it is a plugin causing it...
    Maybe it has trouble reading and writing from/to disk?

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

    rtcabooservb

    bergerkiller Hey berger, I was wondering if you had a fix for the /lag command yet and the entity limiter. No rush of course.
     
  23. Offline

    Might_craft

    nice I tried it but it lagged more than before! D=
     
  24. Offline

    bergerkiller

    Might_craft ...don't quote the main post...it's kinda long and spams the page :/

    But I obviously can't help you further this way...
    • What CraftBukkit build do you use
    • What NoLagg components did you install
    • Did you try only a select component
    • Did you try w/o the main NoLagg.jar (it slows down quite a lot)
    • What type of lag do you have? Tick rate? Network?
    rtcabooservb I am working on it. I finished off the main product, but BKCommonLib is having some trouble with the cross-plugin-access of certain classes :/
     
  25. Offline

    rtcabooservb

    Any ETA? I don't necessarily care about the /lag command, just more interested in the entity limiter fix because I do use it.
     
  26. Offline

    bergerkiller

    Attached Files:

  27. Offline

    Greylocke

    Now that NoLagg has been split into its component parts (a great idea, IMO), is there any reason to run NoLagg? Maybe just for the 'lag' command? What's left in NoLagg?
     
  28. Offline

    bergerkiller

    Greylocke the only thing left in NoLagg is the /clear command, the spawn limits, the chunk unload delay (may you find it useful). The lag command is not in the main nolagg; all components override and use the /lag command to add their own sub-commands.
     
  29. Offline

    GrillGuth

    bergerkiller I am using your awesome plugin but today I have only a tick-rate around 6 :( ...
    I am not fit in analysing your exam file but I uploaded it here: http://www.minecraft-spielewiese.de/log_1000ticks.exam . Can you please check it? Looks like Nolagg has the most time spent.

    Thanks,
    GrillGuth

    edit:
    Oh, I think I solved it :) .... My world is really huge and I had chunkUnloadDelay enabled.... with around 70000 chunks loaded it is clear that the server cant manage it... :D
    I disabled it and everything is working fine again ^^ :)
     
  30. Offline

    shanko

  31. Offline

    bergerkiller

    shanko all seems to be working well, but please use the later NoLaggExamine version (found in 1.78 on GitHub). It also logs stuff like chunks loading and generating times. All plugins seem to be behaving perfectly fine (0,053 ms/tick is very good), but maybe it takes fairly long to load the chunks from file.
     

Share This Page