Inactive [FIX/ADMN] NoLagg v1.88.1 - Prevent common lag causes on your server [2338]

Discussion in 'Inactive/Unsupported Plugins' started by bergerkiller, Sep 17, 2011.

  1. Offline

    bergerkiller

    I had already made this plugin before after having a major lag issue. (lots of torches being filled, turned into items, lag for 20 minutes) It also works for 1060.

    Some feature ideas are taken over from PerformanceTweaks by @LexManos so some credit goes to him. Code, however, written from scratch by me. :)

    Important:

    If you get a warning message [NoLagg TLN] followed up with a stack trace in the log, this has to do with the main thread not having responded within 10 seconds. When a plugin takes more than this time to enable, it will show that. The warning is NOT an error and is no bug, and not a bug related to NoLagg. To disable this feature, disable 'threadlocknotifier' in the config.yml. This feature is mainly intended to notify you what plugin is causing the server to freeze, may it ever happen. It is used to debug plugins in general, as they may get stuck for whatever reason.

    NoLagg's features in a nutshell

    Description

    Prevent lag caused by many items

    Every time an item gets spawned, it is buffered per chunk. For example, you spawn 30 items using Q and the maximum allowed items per chunk is 20, then the 10 remaining items are not spawned. They are spawned as soon the item count in this chunk is < 20 again.

    Read more...

    Form item stacks - fully automatically

    Whenever two or more (configurable) items or experience orbs get near each other, they form a single stack of that item type. If someone drops 64 dirt blocks on the ground using Q, it will show a single item of 64 dirt instead.

    Read more...

    Prevent lag caused by TNT

    This plugin takes over tnt ignition caused by explosions. When exploding stacks of tnt, it does not rush all tnts into a single tick, but detonate them nicely in sync. This results in pretty awesome fireworks. :)

    Read more...

    Prevent lag caused by lighting glitches

    Whenever a new chunk is generated, it's lighting information is generated and all nearby players receive the updated chunk data. If the auto-method fails, you can use /nolagg fix to do it manually. This fixing fixes, for example, dark spots in and around caves lagging the client.

    Read more...

    Set entity spawn limits

    You can set a spawn limit on virtually every entity in the game. From mobs to items to TNT. Only thing being excluded is Players, since I can't simply kick someone 'like that'. :)
    Note: It removes already spawned entities too. So, if you want to keep your animals alive, don't set mob or animal limits, or it will possibly clear your farm animals. (or you can disable the spawn limiter all together)

    I recommend finding an alternative plugin for this instead. Removing entities after they are spawned causes more lag than it prevents!

    Global auto-saver

    Since asynchronous chunk saving is now implemented internally, it is no longer a problem to save entire worlds frequently. You can set auto-save intervals in the configuration. If used with an interval higher than 400 ticks (20 seconds) it will use a scheduled task instead of the internal saver to prevent chunks never getting saved. Another benefit is that player information is also auto-saved, preventing your players losing their inventory state.

    New chunk sending mechanics

    Instead of loading chunks all around the player, the player direction is used to load the visible chunks first. This means that players can expect chunks in front of them to load quickly, while chunks on the sides take a bit longer to appear. When the player looks into another direction, the direction changes and thus the new visible chunks get loaded first. Only if all chunks ahead of the player are loaded, chunks around the player are sent. This all can be configured using a simple minimum and maximum sending rate.

    Read more...

    Examining the server tick rate

    If you encounter very low tick rates and you want to find out what plugin is causing it, you can use the examine component to find it out. It comes with a graphic viewer, which makes bug tracking the easiest thing ever.

    Read more...

    Prevent cross-thread access for events

    As it seems, some plugins don't follow the rules and use Bukkit methods in another thread. This plugin will notify you and cancel if possible whenever this happens so other plugins understand their mistake. If you encounter a lot of spam in the console, first check the stack trace for the plugin that caused the error. Report this error to the author or remove the plugin, if you have questions you are free to ask.



    Configuration (on BukkitDev)

    Commands and Permissions (on BukkitDev)

    Synchronized code accessed by another thread? (BukkitDev)



    Media



    Video by brandcool86


    FAQ

    - Help I experience missing chunks
    If you are using Spout, don't use Reloads. This is also the reason why Spout added a warning when a player tries to reload the server. Not using Spout, then it's a bug which you can report.

    - Can this plugin be used with PTweaks
    (this message was really old...) Yes, they are compatible, but if certain features overlap, make sure you disable these features in either plugin.

    - I get a warning about the async auto save and interval. Wat do?
    Change the autoSaveInterval value in the configuration to a value higher than 400, like 600. The warning is to prevent endless autosaves to occur, clogging up CPU.

    - I have experienced CPU usage
    CPU usage is not the same as lag. NoLagg uses multiple (2-3) extra threads to prevent tick and network lag. If a lot has to be done, it does this quicker, but this takes more CPU obviously.

    - I have lag when using NoLagg
    See also the FAQ above. Explain what type of lag you have: tick lag, client lag, network lag and/or 'block placement' lag. You can use /nolagg monitor to check the tick rate. If this is normal (>15), then you have network lag. Client lag is when the FPS drops. Block placement lag is lag when the tick rate is normal and other network messages, like chat, are instant.

    - WorldEdit causes lag...
    YES because it is unsafe to take over the main thread while another plugin is having hold over it. I can try fixing this, but it could ultimately lead to some serious concurrency exceptions. Don't expect this to be implemented very soon...

    - Do spawn limits interfere with mob-spawning plugins like MobArena?
    No, it does not. It only limits mobs spawned by 'nature': all custom creature spawns are ignored throughout the run of the plugin. Only after you reload will it lose track of these entities and will it remove custom-spawned mobs. If you use MobArena, be sure nothing is going on when you reload the server.

    - Does item stacking interfere with Showcase or BleedingMobs?
    It supports Showcase and ShowcaseStandalone entirely. (showcased items are completely ignored at all times) The same applies to the 'particles' created by the BleedingMobs plugin. Know of a plugin where it stacks items which should not be stacked? Post the plugin name so I can add support. You are an owner and want to add support? Only having a function in your plugin to check if an item is 'ignored' is enough.

    - Can this plugin be used with Chunk Manager
    If you want to use the Chunk Manager with Nolagg, disable the chunk sending of Nolagg first. If you don't do that, this plugin will do that by itself and send a warning in the log. Of course, compare the results first. :)

    - What are the best settings if I have a lot of RAM memory?
    This plugin does not deal with reduced RAM memory. If I could, I would, but you simply can't reduce the amount of memory Java uses. This data is locked and secured, so I can't simply throw away bits of data or write and read data from/to disk. Any plugin claiming to reduce RAM usage on a server, is probably 'garbage collecting'. This fakes having less RAM usage by removing unused data, but Java does this by itself as well once it hits a certain limit. All these plugins will do is make the Garbage Collector run in overdrive, which will only kill your tick rate and/or CPU speeds. A bad thing.

    - I get a lot of 'Synchronized code accessed from another thread' errors
    Find out what plugin is acting up by inspecting the stack trace. If the plugin that causes this is inactive, all you can do is wait for a refurnished version or someone to fix it for you, or use an alternative plugin. If it's still under development, notify the author of this, it IS an error caused by that plugin. If you can't find out the cause, PM me or post in this thread.


    Before you begin writing a lag issue

    This is very important, just posting a 'it causuz lagz und shitz' won't do, won't help and I won't be able to help you any further either. Question is if I even want to help you, if you post such a message without anything worth looking at. Things to include in your message:
    - Errors in the log if possible
    - What CB version you use and what NoLagg version you use
    - When this lag occurs. Tick rate drop in general?
    - The configuration you used when running this plugin
    - What type of lag if applicable. Options are: tick lag, client lag, network lag (see above)

    Important links

    NoLagg Download page and others at Dev Bukkit
    View the source code of NoLagg at GitHub

    Use an archive extracting program (WinRar, WinZip) to open the archive.

    TODO-list:
    - Add option to disable physics when the tick delay becomes too high

    Changelog

    Show your appreciation for my plugins by donating
    [​IMG]
     
  2. Offline

    bergerkiller

    Give me a second, first got to review this error previously posted:
    Code:
    2011-10-01 18:34:53 [WARNING] Task of 'NoLaggChunks' generated an exception
    java.lang.NullPointerException
        at net.minecraft.server.NetServerHandler.sendPacket(NetServerHandler.java:674)
        at lishid.orebfuscator.utils.OrbfuscatorNetServerHandler.sendPacket(OrbfuscatorNetServerHandler.java:38)
        at com.bergerkiller.bukkit.nolaggchunks.PlayerChunkLoader.send(PlayerChunkLoader.java:163)
        at com.bergerkiller.bukkit.nolaggchunks.PlayerChunkLoader.send(PlayerChunkLoader.java:209)
        at com.bergerkiller.bukkit.nolaggchunks.PlayerChunkLoader.send(PlayerChunkLoader.java:204)
        at com.bergerkiller.bukkit.nolaggchunks.PlayerChunkLoader.send(PlayerChunkLoader.java:69)
        at com.bergerkiller.bukkit.nolaggchunks.PlayerChunkLoader.sendAll(PlayerChunkLoader.java:63)
        at com.bergerkiller.bukkit.nolaggchunks.PlayerChunkLoader$1.run(PlayerChunkLoader.java:38)
        at org.bukkit.craftbukkit.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:137)
        at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:441)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:374)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:417)
    EDIT

    May have got it, could be the result of a null packet flowing into the server handler. I'll add some checks against it, hopefully it fixes something.

    EDIT

    @Fr0zenfr0g what features of ptweaks do you use then? Auto-save stopper, keep chunks loaded and more are already included in NoLagg.

    EDIT

    I am going to remove the 'rate' option, it was a bad idea. The rate will be set when you set an interval < 1, such as 0.5 will send 2 chunks ever tick.
     
  3. Offline

    Fr0zenfr0g

    Ok but I have no idea wath this dont have and ptweak have but it seams like my ram keeps lower with ptweaks
     
  4. Offline

    Borch

    1.2 was working best for me, still getting players kicked for flying all the time since 1.21+.
    I think I'm compiling 1.2 from git to confirm the problems are gone then.
     
  5. Offline

    bergerkiller

    @Borch it's in no way possible NoLagg can cause players getting kicked for flying: it doesn't teleport players. Note that you can set flying to true in the server properties. It could be that the creative fly mode is causing this to happen, although not on purpose.

    @Fr0zenfr0g I'll look at the source code to see if I am missing anything. NoLagg can be seen as an 'active continuation' of ptweaks.

    EDIT

    All features are included, even improved. Only thing missing is 'threaded save', to save world(s) Async. But I don't think this is really needed, and would only cause chunks to be corrupted if right at that time an user decides to use /save-all or /world save.

    EDIT 2

    Updated it once more. Removed the rate property, since it was pretty useless. Had to keep it at 1, otherwise chunk issues occurred. Just to prevent people from getting issues. :)
     
  6. Offline

    ledhead900

    Alright I'm on again so did u still want me to temp set my main server to offline mode and let u in, Is there anything you want me to do first.

    btw github links down for me ?
     
  7. Offline

    bergerkiller

    @ledhead900 yup, and no. You can remove the sendChunkRate property, but it won't be read anyway, so that's optional.
     
  8. Offline

    ledhead900

    I'm not on your latest version yet github links down for me. Can you do me a favor can u ping 150.101.108.178 have some users with a connection issues.
     
  9. Offline

    Fr0zenfr0g

    Ok great to hear, i love you as a developer because you are so active, and nolagg is great, sometimes i cant standout with buggs but i will keep be a user/tester for this plugin... :D
     
  10. Offline

    bergerkiller

    @ledhead900 server appears down from here, no connection established at all. Do I need to use a certain port?
     
  11. Offline

    ledhead900

    mindcalf.sytes.net:7767

    edit:
    Ok its not just me, another AU bloke I know cannot connect to hardly any sites but me I just get invalid username on both my servers and time out connecting to notchs auth server. I think maybe ISP is having an issue our end or its in AU in general.
     
  12. Offline

    bergerkiller

    @ledhead900 very bad connection from here, 1 green stripe, and that's it.

    I guess it's AUstralia in general, the connection tends to get bad. (island ey :) )
    Now 2 stripes, not all that bad though.
     
  13. Offline

    ledhead900

    I don't trust notch's stripe thing coz I had two people connecting locally yesterday on the same network as me and it showed me in the TAB list 1 green stripe for them and they had 1 green stripe for me lol.

    Hmm well both my servers are throwing end of stream and Invalid username due my inability to talk to notch's authserver. I could not auth a second ago.
     
  14. Offline

    bergerkiller

    @ledhead900 sure, will do that.

    EDIT

    Yup, they have issues. 365 ms
     
  15. Offline

    ledhead900

    So you can ping me but cannot connect and notch auth is having issues again.
     
  16. Offline

    lishid

    Heh, I guess by that you mean that our problem is solved?
     
  17. Offline

    bergerkiller

    @lishid probably, but I can't check that atm. Also, just pushed NoLaggChunks to Nolagg, huray. :)
     
  18. Offline

    Borch

    @bergerkiller That's what's confusing me. I don't actually want to allow flying, and it's not related to creative mode, as I'm running SMP, and only admins switch to creative for de-griefing etc. It was working before, and I neither updated any other plugin nor the server itself. I first suspected Spout, but removing it didn't help. But well, running 1.2 again now, will report back whether the issue is gone or not.
     
  19. Offline

    ledhead900

    @bergerkiller
    Your git links are still down for me ? I can get onto everything else those.
     
  20. Offline

    bergerkiller

    @ledhead900 Afraid your connection in AU is not at it's finest, will have to skip it this time then...
    (got more things to do, TrainCarts related)
     
  21. Offline

    ledhead900

    yes it appears AU is being a sick today. It very rare I ever have the issues normally my server hosted here and myself are lagfree for AU players.

    Edit:
    Speaking of the devil
    Github just came right. AANNND so did minecraft.net I am going to install your latest build and let u know how it goes.

    Um what says you about my request tho, on the way to handle custom mobs and mob spawners. I am having a super hard time getting a good setting for having mobs spawn but NOT disappear in front of my eyes and at distances.

    Its fustrating me coz I have all animal mobs disabled and only endermen and couple others allowed at low rates like 20 max the global limit is 4500 on the test server and the world mob:1500 as well I have these mobs allowed only

    enderman:20 Slime: 5 Pigzombie : 5 Sliverfish: 3
    and the mobspawners are set by essentials to spawn those and they do not spawn at anything they spawn is removed in like ms.
     
  22. Offline

    bergerkiller

    @ledhead900 that is already managed. Custom spawned mobs (spawned through plugins/arena plugins) do not count as a spawned mob, and don't add to the limit.
     
  23. Offline

    ledhead900

    Ok but I edited my post above I will show what I have in config instead and your welcome to come on our testserver just be warned we are in building the it for 1.9 so its has some secrets and some of its being blogged.

    I will add you to the whitelist I assume your IGN is the same as here.
    The IP is the same mindcalf.sytes.net but port is 7769 instead of 7767.

    PHP:
    autoSaveInterval40
    explosionRate
    40
    chunkUnloadDelay
    10000
    formItemStacks
    true
    tntDetonationRate
    10
    maxItemsPerChunk
    40
    orbScannerInterval
    200
    updateInterval
    20
    tntDetonationInterval
    1
    spawnlimits
    :
        default:
            
    mob150
            creeper
    40
            enderman
    150
            itemwood
    64
            tnt
    50
        
    global:
            
    mob4500
        worlds
    :
            
    Space:
                
    mob300
                enderman
    300
                slime
    0
                spider
    0
                zombie
    0
                pigzombie
    0
                cavespider
    0
                silverfish
    0
                giant
    0
                creeper
    0
                animal
    0
                tnt
    50
            Earth
    :
                
    mob150
                enderman
    10
                tnt
    0
                creeper
    0
                slime
    5
                skeleton
    0
                zombie
    0
                pigzombie
    0
                ghast
    0
                silverfish
    3
                animal
    0
    chunkSendInterval
    7.0
    PHP:
    earth:
        
    loadedtrue
        environment
    NORMAL
        pvp
    true
        gamemode
    creative
        deniedCreatures
    :
        - 
    creeper
        
    sheep
        
    wolf
        
    pig
        
    zombie
        
    cow
        
    skeleton
        
    chicken
        
    ghast
        
    giant
        holdWeather
    false
        keepSpawnLoaded
    true
    space
    :
        
    loadedtrue
        environment
    NORMAL
        pvp
    true
        gamemode
    creative
        deniedCreatures
    :
        - 
    PIG
        
    WOLF
        
    SLIME
        
    ZOMBIE
        
    CREEPER
        
    SHEEP
        
    COW
        
    SKELETON
        
    CHICKEN
        
    PIGZOMBIE
        
    GIANT
        holdWeather
    false
        keepSpawnLoaded
    false

    ^ and the mobs I allow will not spawn unless I force spawn them they will not come out the spawners I set for them on earth. and things like creepers and other mobs set to be DISABLED still spawn for like 2ms, I though Disabling and limiting spawn rate STOPS the spawn event, well it should be I do not want to see any GHOST appearances ever.

    can anything be done about this, Please come on my testserver listed above to we will try replicate it for you.

    Edit:
    Quickly fixed a cap sensitive world name error on my part causing the myworlds to re find the worlds and add them in the config "dupeing" It appears even if your world has a captial first letter it does not like caps in the config for the worldname.

    Oh one more thing I cannot find the list on myworld thread that you said u created for the config options like generator: and how to manually or in game set that to a world.

    Also I wish again thank you the generator support works lovely it did not interfere with naturally generation using the generator plugin, normally banana space will not create a world if it detects a world manager but it did tho at the same time your plugin never added the generator when it detected the Space world upon a restart after world gen occurred. So I need to manually add the generator info to the config that is if your plugin is going to interfere with it if I do not.
     
  24. Offline

    bergerkiller

    @ledhead900 I could come if offline mode was on. :)

    Also, it should actually cancel the spawn event, not spawn the mobs for a ms. It could be mobs appear to get through this when they were in an unloaded chunk and the chunk becomes loaded. They are hidden?

    Also, not sure if it's a good idea to use both MyWorlds and NoLaggs creature deny feature, better to use NoLagg for fixed limits, and MyWorlds for on/off toggling.

    Disable one of the two and try with only MyWorlds or only NoLagg, then I at least know which plugin is 'failing'. (I expect NoLagg)
     
  25. Offline

    ledhead900

    Alright I assumed since both plugins were yours they would play nice have not tested if this exisits under the latest 24 release I just installed it tho and will patch up your request for offlinemode. I need to verify one thing about it, If I have a mob limit of 500 and set up enderman to be 500 this will override anything else ? so I do not have to set individual things like animal: 0 and individual monster mobs to 0.

    One other questions that has been bothering related to the same thing, If I set monsters to 0 and animal to 0 would setting an individual entity override that and allow it ? such as pig: 5 or creeper: 5.

    EDIT

    I removed deny from myworld's and it is still doing it. I have a room with some spawners that are ment to spawn the mobs allowed for the map and I can see the pig and spawn for 2ms then poof its gone. Plus as I walk around sometimes a creeper or something like that will spawn and go away as well. You only see a glimpse I you should be able to get on now.

    You can see my setup for Nolagg world Earth here http://forums.bukkit.org/threads/fi...on-your-server-1185.36986/page-13#post-719080

    as you can read I allowed for plenty more then what the individual limit was and I set them to come out of spawners placed in a specific place yet they spawn nothing. Also the room with grass in it is ignoring the spawn limit as a pig keeps appearing for a couple ms then leaves I do not think it is the spawner as essentials confirmed it set to sivlerfish spawn.

    Remember its port 7769 for the testserver.
     
  26. Offline

    bergerkiller

    @ledhead900 try this version:
    <Edit by Moderator: Redacted mediafire url>
     
    Last edited by a moderator: Nov 12, 2016
  27. Offline

    ledhead900

     
    Last edited by a moderator: Nov 12, 2016
  28. Offline

    Fr0zenfr0g

    i have big holes in v1.25 but no fail in console...
    and not if i dont have the chunk stuff
     
  29. Offline

    ledhead900

    @bergerkiller
    PHP:
    2011-10-03 04:25:24 [INFOPluginsBorderGuardEssentialsEssentialsProtectFalseBookBlockFalseBookCoreFalseBookExtraFalseBookICLazyRoadMy WorldsNoLaggSignLinkSkylandsPlusSpoutWorldEditWorldFeaturesNoLaggChunksBananaSpaceTrain Carts
    and I set animal: 5

    to match the 5 slimes and well you might need to grab those and have a play around. Essential protect could be the issue I will test that.

    Edit:
    did nothing still mob issues Maybe I try this alone
    on server with no plugins but this.

    EDIT:
    Nope I tested this alone on fresh server with only spout and this installed same issues we saw on the testserver happend here.
     
  30. Offline

    bergerkiller

    @Fr0zenfr0g upper the chunk send interval until it works.
     
  31. Offline

    QQCucumber

    Generally if I get a world hole it appears as one long stripe, as if that section got skipped over or something.
     

Share This Page