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

  3. Offline

    bergerkiller

    Greylocke yeah I know it is confusing, that is why I added 'PermissionDefaults.yml' in the latest versions of all my plugins. When you need permissions, you can find them there with a description. It replaces the old standard of it being in the plugin.yml file.
     
  4. Offline

    Greylocke

    bergerkiller ah! I understand it now! I had read thru the PermissionDefaults many times, but I did not realize that I was looking at the actual structure of the permission nodes. I thought it was just a config file with its own structure, unrelated to permission nodes.

    It is all very clear now.
     
  5. Offline

    chopstick121

    Is this the lastest version :confused:
     
  6. Offline

    bergerkiller

  7. Offline

    chopstick121

    ok thanks you
     
  8. Offline

    magranger16

    Can u make this work for bukkit 1.3.1
     
  9. Offline

    bergerkiller

    magranger16 Will take one or two days, as I got another project I really need to finish first.
     
  10. Offline

    mahari3

    EDIT1: I saw your above post, and I don't expect a immediate response but it would be helpful to know if this is caused by 1.3 or not.

    Code:
    12:41:51 [SEVERE] java.lang.Exception: Field 'u' does not exist in class file 'W
    orld'!
    12:41:51 [SEVERE]      at com.bergerkiller.bukkit.common.SafeField.<init>(SafeF
    ield.java:25)
    12:41:51 [SEVERE]      at com.bergerkiller.bukkit.common.WorldListener.<clinit>
    (WorldListener.java:19)
    12:41:51 [SEVERE]      at com.bergerkiller.bukkit.nolagg.itemstacker.StackForme
    r.init(StackFormer.java:49)
    12:41:51 [SEVERE]      at com.bergerkiller.bukkit.nolagg.itemstacker.NoLaggItem
    Stacker.onEnable(NoLaggItemStacker.java:80)
    12:41:51 [SEVERE]      at com.bergerkiller.bukkit.nolagg.NoLaggComponent.enable
    (NoLaggComponent.java:59)
    12:41:51 [SEVERE]      at com.bergerkiller.bukkit.nolagg.NoLagg.enable(NoLagg.j
    ava:49)
    12:41:51 [SEVERE]      at com.bergerkiller.bukkit.common.PluginBase.onEnable(Pl
    uginBase.java:179)
    12:41:51 [SEVERE]      at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlug
    in.java:217)
    12:41:51 [SEVERE]      at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(
    JavaPluginLoader.java:337)
    12:41:51 [SEVERE]      at org.bukkit.plugin.SimplePluginManager.enablePlugin(Si
    mplePluginManager.java:381)
    12:41:51 [SEVERE]      at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftSe
    rver.java:263)
    12:41:51 [SEVERE]      at org.bukkit.craftbukkit.CraftServer.enablePlugins(Craf
    tServer.java:245)
    12:41:51 [SEVERE]      at org.bukkit.craftbukkit.CraftServer.<init>(CraftServer
    .java:197)
    12:41:51 [SEVERE]      at net.minecraft.server.ServerConfigurationManagerAbstra
    ct.<init>(ServerConfigurationManagerAbstract.java:50)
    12:41:51 [SEVERE]      at net.minecraft.server.ServerConfigurationManager.<init
    >(SourceFile:11)
    12:41:51 [SEVERE]      at net.minecraft.server.DedicatedServer.init(DedicatedSe
    rver.java:105)
    12:41:51 [SEVERE]      at net.minecraft.server.MinecraftServer.run(MinecraftSer
    ver.java:378)
    12:41:51 [SEVERE]      at net.minecraft.server.ThreadServerApplication.run(Sour
    ceFile:539)
    12:41:51 [WARNING] [NoLagg ItemStacker] Failed to hook into world access listene
    rs, will use a slower alternative!
    12:41:51 [SEVERE] [NoLagg SpawnLimiter] Failed to initialize spawn limiter: coul
    d not bind to world entity listener
    12:41:51 [INFO] [NoLagg Saving] will write world data to all region files every
    12000 ticks (10.0 minutes)
    12:41:51 [SEVERE] [NoLagg Saving] Failed to bind to the field to enable Auto-sav
    e interval changer!
     
  11. Offline

    bergerkiller

    mahari3 yup it is. The fields got changed and most of the reflection calls stopped working as a result.
     
  12. Offline

    joehot2000

    can you update to 1.3 please, then?
    the problem is something to do with nolagg chunks, but its so fast i cant even see what i type on console!
    this is a great plugin, by the way, and greatley reduces lag on my server ;)
    i would be very happy if there was an update ;)
    edit: oh, you said you would update.
    thank you!! :D
     
  13. Offline

    aeronetwork

  14. Offline

    shanko

    Thanks for the info man, you're a great help!
     
  15. Offline

    mahari3

    aeronetwork
    bergerkiller

    He will do his best to update, as he stated above he has another project to attend to. I'm in agreement that it needs to be updated, (and that this is by far the most useful of my plugins), but he has his own schedule to attend to.

    Please do be patient as I assume that he will update very soon! Besides, there is a BIG bug with the current craftbukkit build.

    EDIT: By the way bergerkiller, where did you learn java? I'm currently attempting to learn on my own, but was wondering if you had done the same; or had gone to school for this purpose?
     
  16. Offline

    joehot2000

    well, without him, we would not even have this plugin :)


    [/quote]
    i also want to learn java, i think theres a bukkit page about it, but i cant find it again.
    you should probably look it up.
     
  17. Offline

    bergerkiller

    Since many people ask about updating it.

    I have multiple projects to work on:
    • Spout development - getting Vanilla working
    • TrainCarts development - fixing the remaining bugs and getting it to 1.3
    • NoLagg development - fixing it to 1.3
    • MyWorlds development - fixing it to 1.3
    • SignLink development - fixing it to 1.3
    • CBasic electronic controller project - building one for a friend which has main priority atm
    Today I will be finishing off the CBasic project as it has been delayed way too much. I want that finished. Then I will have to take a short look at Vanilla as Windows were failing, as Zidane told me. Won't take too long I suppose. Then I will look into NoLagg to fix up the fields to make it compatible again. I haven't seen massive code breaking errors, so I don't think it will be too hard. Then it is time to get TrainCarts fully fixed, then some smaller updates for SignLink and MyWorlds.

    Most importantly: I have to get BKCommonLib updates to work for the 1.3 server, as almost all native logic is embedded in that library.

    mahari3 I've been through many programming languages, so I can't really tell where I learned it. Started off in Batch, then went to Visual basic .net to write GUI applications, then gave c# and C++ a look but I couldn't understand much of it. Then I had a Java 3D game project to make for School. It took me about 2 months to get into the whole language and Eclipse IDE thing. Then, after a lot of effort, I understood the language and even OpenGL programming. Took me 6 months to do all that, excluding the previous knowledge of 3D programming while creating a DirectX 3D (VB .net) model viewer. After that I found Bukkit and started scripting simplistic plugins for our server, and soon after I started publishing some of them. TrainCarts must be the first project I made, as that was also a request by someone. I thought it was a nice opportunity to better understand Java logic.

    Important: I always had a certain goal for my programs. You can't learn programming without having a goal in mind. Calculator? Meh who needs that? All of my VB .net programs had an actual goal: Making it easier to develop mods for Battlefield 2. When modding died off (slightly) I (luckily) found plugins.
     
    Inscrutable likes this.
  18. Offline

    mahari3

    joehot2000
    I have already looked at that page, and I can refer you to a few really great sites to learning java:
    this is the bukkit wiki on making a plugin: http://wiki.bukkit.org/Plugin_Tutorial

    here is my favorite site! http://thenewboston.org/

    Here is one I haven't looked at but you may want to try:

    bergerkiller

    Thanks for the info; I have found that learning this language on my own doesn't prove very fruitful. I would take the class but have no time or money for that; as I am still in high school (going into Jr. year).

    I'll try to follow what you had done and set a goal for just exactly what I want to achieve. Sooner or later however I will have to fork over some cash to learn and get really in-depth in this, especially if I want to become a game developer i.e. work for DICE or some other popular company.

    I plan on focusing on C++ for a main language, and java as a side project, who knows, I could make a game that you buy and bring home to really enjoy for hours on end. :D

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

    bergerkiller

    mahari3 Don't forget that game development does not really equal programming. Modern games come with an actual visual editor (frostbyte/Source/Unreal SDK/etc). The only real programming language you need there is either python, c++ or both. Even if you can't understand that, you can work with photoshop to make textures for the game, or in a 3D editor like Maja, Blender, 3ds max or you name it to make 3D models for the game. You can go ahead and work as the sound editor, make the sounds for the game.

    I didn't follow a single course to learn Batch or Visual basic .net, I just started. Over the course of 5 years or so I learned a massive amount of stuff, including OO programming and how variables are stored in memory (references), and garbage collection.
     
  20. Offline

    mahari3

    I had gotten Unity3D, (free and well the "special edition") just to see what it was like, the editor was smooth and worked rather well. It also allows you to publish your games to all types of platforms like xbox360, ps3, and so on. The program itself costs $1500, and then there are two more additions to it, each costing another $1500. Its expensive but well worth it.

    If I ever have some cash that I can blow that's what I would spend it on, I could get it in a year if I could actually get a job as is.

    EDIT: I'll leave you to your updates so you can actually get some work done, thanks for the info once again!
     
  21. Offline

    Derjyn

    Unity is actually quite cheap when you consider the quality of games you can make with it.

    bergerkiller You say "The only real programming language you need there is either python, c++ or both" in relation to the game engines that include SDKs and editors... rather, you can consider them a GDK. Just a minor correction there- while Python is popular, there are actually a whole plethora of scripting and programming languages used in the various engines. Lua for example, is used in the Unreal Engine/UDK. Ruby, YAML, others... even "home-rolled" languages. I've seen many developers that decided to roll their own script parser/compiler for the sake of performance or for other various reasons.
     
  22. Offline

    xBlueXFoxx

    my server's in severe need of no lag (or an upgrade? ;p) but it would be nice if it was prioritized, anyways I'll be donating like $5, wish you luck on your progress!
     
  23. Offline

    bergerkiller

    xBlueXFoxx Thanks!! And I finished off the other project (it has a nice case and all relais + display box are finished.) Now time to look at the new 1.3 CraftBukkit.

    Ok I pushed a test version for 1.3.1. It is a test version because I haven't been able to fully test it. Item Stacker, auto saving (primarily the changer) and Chunk sending appears to work fully, and no errors (missing fields and so on) on startup, so I guess I fixed everything. Can't be too sure about the item buffer/entity limiter though, as I didn't have much time to test that.

    NoLagg v1.87 (CB#2291 MC 1.3.1 R0.1) TEST VERSION

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

    chopstick121

    works with 1.3.1?
     
  25. Offline

    Derjyn

    Did you read his post, right the hell above yours? Grow a brain?

    bergerkiller
    Thanks for the release man! Will be testing this today.
     
  26. Offline

    xBlueXFoxx


    Seems to be causing holes/chunk loading failures everywhere.

    Also something that should be added would be optimization toward plant growth ticks, for example. (Not sure if this can be done outside of bukkit without a modified craftbukkit.jar).
    http://forums.spout.org/threads/craftbukkit.938/
     
  27. Offline

    bergerkiller

    xBlueXFoxx can't do that, as it requires a global rewrite of the entire server. (Tick operations happen in the World, and would require a complete world swap to do that through a plugin. Not efficient) Use CraftBukkit++ for these things.

    No errors? Can you post the configuration used? Could be a certain setting causes this to happen. (I could play in the world just fine, so I can't really explain it at this point)
     
  28. Offline

    chopstick121

    Chill i found the link after and i just forgot to remove the post
     
  29. Offline

    xBlueXFoxx

    is the previous configuration compatible with this test build?
     
  30. Offline

    shanko

    Using the new nolagg works fine so far, great job! I only use examine and the TNT aspects of it. The only issue is the TNT seems to not do any damage and doesnt pushback like it should in 1.3.1. I reduce the blast radius to 0.5.
     
  31. Offline

    bergerkiller

    xBlueXFoxx yes the configuration format stayed the same.

    shanko It uses some functions in the nms area, could be one of those got swapped. I'll have to check the 'Explosion' class tomorrow to compare it with my own.
     

Share This Page