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

    Greylocke

    @bergerkiller have you ever considered making view distance per player and more dynamic? Something like:
    default: 7
    underground/indoors: 4
    while not moving: 14

    I know that Cogito did some work on this with a plugin called DynamicViewDistance, but it was dropped around CB1060 or so. I think this would be a cool way to make sure that the server doesn't send any more chunks than it really needs to.
     
  3. Offline

    bergerkiller

    @Greylocke I could make it part of the priority of the player. I basically need to do simple math:
    But, it's on hold until Spout implements and releases compressed chunk packet listeners.
     
  4. Offline

    Eminam


    any ideas?
     
  5. Offline

    bergerkiller

    @Eminam I can easily add a stack radius...but it's a bit too small to make into an update. (to make people re-download it for)
    You have a pretty good set-up, also, chunkSendInterval is no longer active in NoLagg. (it's now in the nolaggchunks demo add-on thingo)
     
  6. Offline

    Eminam

    So whatever is set as that doesn't matter?
     
  7. Offline

    bergerkiller

    @Eminam doesn't matter to what you set the chunk send delay, since it's not even used. You can also just remove it.
     
  8. Offline

    Sayshal

    This is only downloading NoLAggChunks (There is no NoLagg folder..)
     
  9. Offline

    Jdbye

    @bergerkiller
    I've limited arrow spawn limits to 500, but it always removes arrows in midair instead of removing the ones on the ground. Could you make it so it prioritizes removing arrows on the ground instead? I have a huge wall of redstone controlled arrow dispensers and the arrows on the ground cause mass lag within seconds :p
     
  10. Offline

    Giuseppe

    i have a error
    Code:
    05:23:11 [SCHWERWIEGEND] Could not load 'plugins/NoLaggChunks.jar' in folder 'plugins': Spout
    org.bukkit.plugin.UnknownDependencyException: Spout
            at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:133)
            at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:213)
            at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:136)
            at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:138)
            at org.bukkit.craftbukkit.CraftServer.<init>(CraftServer.java:103)
            at net.minecraft.server.ServerConfigurationManager.<init>(ServerConfigurationManager.java:52)
            at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:136)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:348)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:417)
    
     
  11. Offline

    bergerkiller

    @Sayshal You may need the other download (I should just remove the add-on..but ow well)

    @Jdbye good idea, I'll count for the non-static arrows first, and end with the static arrows, so they get removed.

    @Giuseppe Either remove NoLaggChunks.jar (the add-on) or install Spout.

    EDIT

    Updated it. Will now remove the oldest entities first, and a little attempt to fix chunks not getting loaded. (added 3 chunks to the set player view distance as buffer) Also added a stacking radius as requested earlier.
     
  12. Offline

    Sayshal

    Can you make it so when you set mob/item spawn limits. If the entity is a mob, force the world to spawn the max amount?
     
  13. Offline

    bergerkiller

    @Sayshal that already happens automatically. :)
    (it's the internal 'spawn mobs' function in the main thread)
     
  14. Offline

    Sayshal

    Well, I switched to pTweaks sorry, this plugin caused beta holes. pTweaks does the same thing, but something's different enough to fix my beta hole problem.
     
  15. Offline

    bergerkiller

    @Sayshal Ok I understand.

    Um update on the chunks issue...it is not related to NoLagg. I ran the server without Nolagg neither the NoLaggChunks add-on and flew around in the server.

    When performing /reload while receiving chunks, this receiving is stopped and never continued. Result: missing chunks. The unload delay doesn't influence anything, reloading however, does influence a lot.

    I will implement a fix for this in the NoLaggChunks add-on once I can use compressed chunks. @Sayshal since you use pTweaks, could you check if performing /reload while chunks are being sent results in missing chunks too? It is mostly a native bug, but it could be pTweaks sends all (100+!) chunks around the player after reloading.

    I did use Spout, now checking if the same happens w/o Spout enabled.

    EDIT

    Yup it is Spout. I'll write an issue ticket to them. @Sayshal did you use Spout?

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

    Sayshal

    I do, I'll switch back when its fixed. but it only happens when I'm using noLagg (It never downloaded the NoLagg folder.. it was always NoLaggChunkcs folder.)
     
  17. Offline

    bergerkiller

    @Sayshal I don't really get it...
    In the download only the 'NoLagg.jar' and 'NoLaggChunks.jar' are included. There is no folder. If you installed the NoLaggChunks 'folder', better remove it. I'll remove it from the downloads too...

    A NoLagg folder is created when the server starts.

    (and yes, the add-on causes missing chunks. The main plugin, NoLagg.jar, not)

    EDIT

    Looool Ptweaks stated and still states the following:
    - Reduces RAM usage, server usage from 1 gig to 300 mb

    I look at source: Exactly the same as performance tweaks, no coding changed since previous updates (maybe 2 lines of code?...)
    And the last time I checked was a month ago...
    No coding of 'ram reduction' to be seen...
     
  18. Offline

    Sayshal

    Please dont bag on other devs. His/her plugin is working, and for ME it is easier/less laggy.
     
  19. Offline

    Greylocke

    mob limits are just for active chunks, right? So if a chunk had 10 creepers but just got unloaded, 10 slots opened up -- right?

    autosave interval: by increasing this number we are decreasing the overall storage I/O and CPU cycles that go along with that operation. But we're also increasing the chance of losing world updates if the server crashes. Is this correct? Are there any other downsides to a higher interval?
     
  20. Offline

    bergerkiller

    @Sayshal My plugin is a 100% continuation of Performance Tweaks. I even added limits for ALL entities instead of just animals or monsters. He also claims to have lots of features not existing, such as:
    - TNT handler (nothing)
    - RAM deduction (nothing to less found)

    Missing: how this is done, where this remainder is stored, no code is found either.

    Plugin doesn't even contain the word TNT in the source...

    I don't bag on him, but I asked him a month ago to make sure he'd add the things he promised. Being a month later, he hardly added 2-5 lines of code. I understand 'not spending too much time on it' is an argument...but that is a little bit 'low' for 'not spending too much time on it'.

    We had a length discussion before, and I agreed he'd take up the 'RAM deduction' part and I the 'CPU and network usage' deduction. As for right now, he has less than me...that is kinda strange.

    If you want to compare sources, I can easily put them side-to-side to give you an idea of what I mean. I have no problems with devs continueing support for a certain plugin, but then claiming having better RAM handling than another plugin while this is not true...ye then he is being a bag on me lol.

    Also, he references 'RAM.jar', whatever that is. It is not included in the download and is not described in his entire page.

    @Greylocke nope, either global or world-specific. Since entities can change chunks I can't have chunk-specific limits unfortunately.

    The auto save interval indeed changes the CPU cycles used to save changed data to file. It prevents crashes on my server too, which is a nice (yet unexpected) benefit.

    High vs. low interval:
    Low: Less disk usage, less ticks out of sync, more time to 'perform the game'. Only downside is that you can lose progress, so it is wise to perform a world or global save once you made something huge.

    High: Progress will be saved almost real-time, downside is that it has a lot of (random) disk usage, which can cause the computer to crash.
     
  21. Offline

    Sayshal

    Lol okay. Once again all I'm saying is at this current time, his plugin is working, yours is spamming me with NoLaggChunks folder. :p
     
  22. Offline

    Mrchasez

    Ram.jar was going to be an addon, Then i realized why not just put it into the main plugin, instead of just making it like a package. It is a Unused Import.

    Make slight tweaks, Updating the plugin is not the most important thing to me right now.
    Just stay off my thread. Good day.
     
  23. Offline

    Greylocke

    hm. I don't think I was clear. Or I'm not understanding. How about an example!

    Example: I create a new world and set the mob spawn limit to 200. I then build my Mega Mobtrap of Doom(tm) and it quickly fills with 200 mobs. I soon grow bored with my mob trap and wander off to find one of those nifty strongholds. Assuming that I wander far enough that the chunks containing my Mega Mobtrap of Doom(tm) are unloaded, will I see any more mobs on my journey? Or will I wander a mobless world because every available mob "slot" is being used up by my trap?
     
  24. Offline

    bergerkiller

    @Greylocke yep, since those entities will eventually de-spawn, those slots become clear and other mobs can spawn.

    @Mrchasez wish I could, but I can't stand it if people:
    - Use other's plugin coding without stating what he changed to it
    - Not linking to the original plugin it is based off
    - Not saying 'continuation' while this is the case
    - Claiming features that don't exist
    - Don't even remove unused references...so you even copied his classpath?!
    - Showing a video containing something non-existent, I even suspect you are going to copy NoLagg's tnt handling
    - Good day to you sir.

    @Sayshal No problem, still don't get the NoLaggChunks folder spamming...lol. Do note that you may be using something that will hardly survive for long...
     
  25. Offline

    Quotation

    The download link isn't working for me. Did it break?
     
  26. Offline

    Sayshal

    Yes. Go on the github page and download it manually under 'Downloads'
     
  27. Offline

    Quotation

    Thanks for your quick reply, I was able to download it.
    Edit: for anyone else who needs a link: https://github.com/bergerkiller/NoLagg/downloads
     
  28. Offline

    GameFAQsRolo

  29. Offline

    Lakanate

    so just trying to have assurance, will I have a problem if I use both Ptweaks and Nolagg? Because both seem to affect different areas, Ram and Cpu. I wish to tackle both problems successfully, without much overlaps.
     
  30. Offline

    kahlilnc

    404 errors on the links !!!
    EDIT:
    Still got the dl off github :D
     
  31. Offline

    Mrchasez

    You dont want to say Ptweaks on here or Berger will go on a nerd rage xD
     

Share This Page