[INACTIVE][MECH] PerformanceTweaks v0.08 - Disc Usage Minimizer, And More [818]

Discussion in 'Inactive/Unsupported Plugins' started by LexManos, May 3, 2011.

  1. Offline

    LexManos

    PerformanceTweaks - Disc Usage minimizer, And Other performance tweaks
    Version: v0.08

    AutoSave Stopper:
    Instead of writing every chunk to the disc every 2 seconds. This changes it to 30 mins.
    This saves the server from writing about 9KBps to the disc (7 writes, 2 reads per chunk, on a 3 person server).
    As well as saves about 2 calls to deflate every 2 seconds. (per chunk)

    Chunk Persistance:
    Change how long chunks will stay loaded into RAM, instead of unloading instantly when not used. This way naturally high traffic areas will stay loaded, yet areas that someone was just passing through will unload after some time. This means you need SOME extra RAM but that extra RAM will actually give you a boost in performance while reducing the amount of reading and writing needed for the disk. Win-Win. This part can be disabled via the config file.

    Monster Limiter:
    The Monster limiter will disabled 'natural' monster spawning when the number of monster gets above the max threshold. Then it will re-enabled it when the monsters get below the threshold - 100. Note: Monsters spawn in groups so this is a rough threshold. The limit can be set in the configuration. You can also completely disable this there as well. Let me know how this works out for you.

    Features:
    • Massively reduces needless disc usage
    • Chunks stay in RAM longer
    Download wget friendly
    Download Source Here
    Donation Link[​IMG]

    If you have any other ideas let me know I can look into if they are feasible or not.
    60 Seconds Without the plugin on a idle server:
    [​IMG]
    Average Disc Traffic: 1041Bps
    60 Seconds With the plugin on as idle server:
    [​IMG]
    Average Disc Traffic: ... none.

    Changelog:

    Verion 0.08:
    • Updated to MC 1.6.6 RB 813
    Version 0.07:
    • /save-all now forces saving player data as well. Thanks PhantomGamers
    • Fixed NPE on Disable/Reload when MonsterLimiter was disabled. Thanks the like.. 60 of you who repeatidly reported it u.u
    • Added Perliminary Miltiverse world specific Monster Limiter configuration. Please test
    • -Changed MonsterLimiter config to yml.
    • Potential fix for a NPE in Chunk Persistance.run
    • Temporary fix for a Concurancy exception in MonsterLimiter.run();
    Version 0.06:
    • Re-wrote how monster Limiter works
    • --Added config option for allowing animals/monsters separately.
    • --Added a monitor thread, to catch edge cases where EntityDeath doesn't fire.
    • Changed how Persistent Chunks refreshing works, lowering the CPU impact.
    Version 0.05:
    • Changed how Chunk persistence works.
    • -Should get rid of any and all concurrency errors. Chunks are now unloaded by Bukkit itself in doTick()
    • -It will not try to unload spawn chunks any more.
    • -Chunks are new 'refreshed' when players move.
    • Added the /ptml command for debug info.
    Version 0.04
    • Added Monster Limiter
    Verions 0.03
    • Added Chunk Persistance
    Version 0.02
    • Added Configuration
    Version 0.01
    • First Release
     
    lemachinbidule, omnija, nacs and 13 others like this.
  2. ResMon?
     
  3. Offline

    sympnotic

    About the moblimiter thing, is there anyway to include a separate "squid limit", like "squidlimiter" ? Maps with a lot of water are bound to spawn too much squids.

    Anyway good job, this plugin is becoming a master piece of tweaking and you should keep on progressing in this way ;)
     
  4. Offline

    Zenithas

    This is an awesome mod, after trying it out. Many, many kudos to you, and many diamonds on you. Even with a very nice HDD for my minecraft server, the amount of extra performance this milks is ridiculous. And, I might add, it ties in flawlessly with the "chunks stay loaded" mod... though I regret not having the link here for that one.

    My thanks.
     
  5. Offline

    goz3rr

    Please give us a wget friendly link. (Mediafire, dropbox or github for example)
     
  6. Offline

    Mukrakiish

    There's a dropbox link on page 2.
     
  7. Offline

    LexManos

    @godsyn: Thanks added those spelling/rewording changes. Im not great at engrish :p They will be in the next version.
    @tr0y: ResMon looks promissing! Thanks i'll try using it.

    @sympnotic: I need to find a elegent way of keeping track of how many of what type are alive. I plan on adding the option to limit hostile vs nutral, specific types, etc.. I just need to think of a way that doesn't do more harm performance wise then it helps.

    @goz3rr: I added the drop box link to the main post. If this gits much larger code wise i'll add it to my github.

    @everyone: If you have mre ideas send em in. I'll see what I can do!
     
  8. I've never really understood these types of plugins, maybe because i don't know enough of the hardware to understand why they are usefull, so i have some questions that might make me use this depending on the answers :)

    1. With chunks only being written every 30min, wont this potentially affect player creations, or create lag when it then saves?
    2. If chunks are saved every 30min, what purpose does an "auto save" plugin do? I'm asking this, since i am running one, and if I can get rid of that and get a performance boost from this one, that would be awesome. If not, then i'd still get the potential boost from this.

    Thanks in advance for your answers :)
     
  9. Offline

    HunterAP

    I don't know that I'd even classify this as a "suggestion," I'm just kind of pointing it out. A lot of plugin developers are using YML for their config files. I don't know if that's intended to be a standard or anything... just pointing it out.
     
  10. Offline

    LexManos

    Well to try and answer your questions:

    1) If you have a full auto-save plugin which does a proper save to disc. Your players creations will be safe every time it runs. This should not create any additional lag during the full world save as the way saves work is they go through and compress each chunk and overwrite anything thats on disc anyways. {meaning the stuff that would of been written every 2 seconds is oblitereated anyways} In theory it works out, but in practice it just creates a ton more disc traffic that is needed.

    2) You should DEFINITELY keep the AutoSave plugin. As most of them are more robust then the built-in save functions. This plugin is a complement to those. With both of these plugins you should be golden when it comes to saving.

    @HunterAP: I doubt it was supposed to be a standard, But there is little configuration that needs to be done. So using java's built in properties class to handle it is fine. (Its not like I went out and arbitrarily made the config format, its a standard in java)
     
  11. Offline

    HunterAP

    I know. :) Was just pointing out that a lot of folks are doing the YML thing.
     
  12. Offline

    NotoriousPyro

    Brilliant plugin, makes chunks load WAY faster - everyone has noticed it.
     
  13. Offline

    ionbasa

    Thanks, wasn't expecting it to be that quick!;)
    One option extra may be to also allow to cache to a USB flash drive. This would work similarly to the Cache Chunks in RAM, but in the config file you would let users select the drive path of their USB flash drive. This concept is the same as Windows ReadyBoost
    http://en.wikipedia.org/wiki/ReadyBoost
     
  14. Offline

    Liger_XT5

    I thought I'd put in my report. I've been running the plugin for the last day or two (been busy with finals week so I've lost track) and I haven't had to force restart the server like I used to. My server used to freeze at random, multiple times a day. I haven't had to in the last 24-48 hours.
    So far I haven't seen any lagg when placing and removing blocks.
     
  15. Offline

    Zalastri

    I know it'd be a lot more complicated, but can you expand on your monster limiting? I used your plugin as is, and my users complained of no monsters, so obviously they'd all been used up elsewhere at the moment. I was thinking, maybe you can remove monsters that have no chance of being seen by the player, and drastically cut down the amount of monsters actually needed per person.
     
  16. Offline

    LexManos

    Honestly, I don't feel like writing a disc->ram bridge/management, plus, java is horrible when it comes to shit like that. So something ready-boost style is out of the question. You should simply move your world folder over to your flash drive.. that sounds simple enough....

    Zalastri: Im looking into that. the only problem is these fixes are ment to be light weight because they are balancing performance gains vs losses.
    If I detected monsters that wouldn't possibly be seem by players what criteria would I use? Would I use to compute line of sight, obstructions, light levels, pathing, etc? I'll look into it, Im thinking that I can limit the number of a specific type but that would durastially reduce the efficancy of the plugin. As I wouldnt be able to simply disable natural spawning and would instead have to veto creature spawn events. Which would cause MC to try again, *hopefully* making a creature that isn't limited.
    The way I am doing it now is the most efficient performance wise as it prevents MC from even thinking of making monsters until the numbers go down.

    Its all about gains vs costs.
     
  17. Offline

    Zalastri

    What about if you automatically deny all monster spawns that are more than 20 blocks below the lowest player in the chunk? Seems like most monsters are wasted underground.
     
  18. Offline

    parker_digg

    I run a server with 12GB, I'll report tmrw how this works when server is pretty full. So far I see some improvement, but hard to tell with 10-20 players. Usage is in the teens again though so far.
     
  19. Offline

    ShadowDrakken

    cool idea, 30min is too long for my server though, would be nice to have that configurable
     
  20. Offline

    LexManos

    It is configurable...
     
  21. Offline

    Nathan C

    File Size - 0.01 MB ............

    What you using dial up with a bandwidth cap or something lol?
     
  22. Offline

    mireka

    occasionally getting these errors

    any ideas?
     

    Attached Files:

  23. Offline

    Dangazzm

    Seems like it has to do with the AutoSave plugin writing to the file.
     
  24. Offline

    Sphax

    Great plugin !
    Would it be possible to add a customizable feature to flush extra needless mobs like squids or Creepers when they are too many ? The problem with those mobs is that when they have spawned, nothing will delete them (the day will not and the players will probably not).
    CurrentlyI use "/spawnmob kill all" command (spawnmob plugin) to delete those mobs when the server begins to lag in some areas (because of squids generally).
     
  25. Offline

    Dangazzm

    Agreed, this plans on becoming. As Lex said as long as it doesn't cost more processing time than it is worth. A full suite for mob spawn prevention and possibly killing. With soft caps on each mob being configurable. Cause I know I would rather more useful entities rather than squid lol. They kinda take over if noone is smiting them.
     
  26. Offline

    goz3rr

    Okay thanks for adding the dropbox link! The regular minecraft server DESTROYED a harddrive with the many read/write cycles, and since im running your plugin it has really helped!
     
  27. Offline

    ShadowDrakken

    ah, sorry... your first post only mentioned the mob portion being configurable, so I hadn't downloaded it to try prior to posting. Got it up and running now with a reasonable chunk save period for my server :)

    since I see it appears to have a conflict with AutoSave, is AutoSave still useful, or is it redundant? I was lead to believe that the AutoSave/save-all was slightly different than the regular chunk saving?
     
  28. Offline

    LexManos

    u.u please read my posts before asking questions.
    The reason he got this error is because it Chunk Persistance tried to unload a chunk DURING a world save.
    It doesnt hurt anything, chunk persistance just trys again during the next interval and unload the chunk.
    The errors are just because MC is trying to do two things at once and MC cant support that {it sucks :p}
    It doest harm anything when it fails it'll just try again later.
     
  29. Have had some lockups which stopped when I disabled "Chunk Persistance". Not seen a lockup since, but if it happens again with this feature disabled, I'll post...
     
  30. Offline

    Dangazzm

    How much RAM your server got? How many players rough estimate were on at the time. And around what was your pruning and keeping time for chunks?
     
  31. Offline

    silentdojo

    Yea I noticed the same thing. As soon as I turned just the Chunk Persistance off it worked flawlessly with over 10 people.
    AMD QuadCore 2.5 GHZ with 12 gigs of ram 4 for CraftBukkit 1 for system 2 for RamDisk and 5 Free. (All rough estimates of course).
    I'm even running BigBrother and maybe 30 other plugins now with no issues. Runs amazing. But it could be a combo of this and using SimpleSave now instead of a toolkit for save-all.
     

Share This Page