[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. Offline

    tha d0ctor

    very great idea, will use!
    I hate to be a stickler but would it be possible to show a before and after traffic log of server traffic with and witohut the plugin? I'm interested in seeing the correlation, thanks!
     
  3. Offline

    LexManos

    As i cant seem to find a tool that will give a nice KBps graph, I will have to resort to ProcMon.

    Also, all my friends are at school/work {which I will be heading to in 2 mins} so I don't have to much to test wiht.
    So this is my local server, After loading up and letting it idle for a while. I took a 1 min snapshot of with and without the plugin.
    60 Seconds Without the plugin:
    [​IMG]
    Average Disc Traffic: 1041Bps
    60 Seconds With the plugin:
    [​IMG]
    Average Disc Traffic: ... none.
     
  4. Would this plugin endanger world up2date-ness if server crashes ?

    You should add configurable options because I think 30 minutes is too long, I can make alot of stuff in 30 mins and I'd hate it if it crashed and I wouldn't have it saved :}
     
  5. Offline

    TehJammers

    Yes, I am veeeery interested. A config option to make it 5 minutes and a dropbox link would be excellent.
     
  6. Offline

    LexManos

    It shouldnt make the server in danger of roll backs any more then a normal crash does.
    The data that is written to the disc is never actually committed, its kinda in limbo waiting for the server to give the final 'yes im sure i want to write this' by flushing/closing the file.
    This may be a windows/ntfs specific thing but meh.
    The only proper way to be sure to prevent roll back is to use a proper save-all style plugin.

    Anyways, writing a config would be more code then this fix :p I may add it at a later time.
    Coupling this with AutoSave every 1/2 hour is how our main server is set up.
     
  7. Offline

    Plague

  8. Offline

    LexManos

  9. Offline

    Asymetrikon

    Uhm i installed the Plugin and now im getting a connection lost when i want to join my server? Even when i deinstalled the plugin. :eek:

    Hmmm ok Minecraft.net seems to be down atm.
     
  10. Offline

    LexManos

    That wouldn't be caused by this plugin.
     
  11. Offline

    Asymetrikon

    Yes sry my fault Minecraft.net is down. atm. Happened the same moment i tested yopur Plugin. :D
     
  12. Offline

    Mukrakiish

    Say I have a 15 minute auto-save interval. This won't hinder/interfere with that right? I mean, auto-save will force saving regardless of this disc fix or not. This will simply stop from crazy disc usage inbetween those and defaults to 30 minutes before it allows the disk to run.

    Just re-iterating so I understand correctly.
     
  13. Offline

    LexManos

    Correct, all this does is change how often (what i'm calling) cacheSave(chunks) is called inside World.doTick();
    All other calls to any other saving function will work without hindrance at all.
    http://pastebin.com/QDjTXXpG
    Thats the source, seriously, it doesn't screw with anything else.
     
  14. Offline

    Mukrakiish

    I imagine this little tweak will substantially change how well some monster servers will run.

    Appreciate it. Thanks!
     
  15. Offline

    eriorkless

    So, just to clarify. You just drag this into the plugin folder for it to save every 30 minutes rather than every 2 seconds. Is there a properties file were I can make it every 10 minutes?
     
  16. Offline

    spunkiie

    Will try this on my 300+ server :)
     
  17. Offline

    LexManos

    Nope, not settings, no nothing.
    Just drag and drop it in.
     
  18. Offline

    eriorkless

    So we can't adjust the save time? What happens if it hasn't saved yet and the server crashes? Will the window between the last save and the crash not be saved? Can we still force-save?
    (This sounds like a great plugin and I greatly appreciate it. I'm planning to use it anyway--just curious)
     
  19. Offline

    Mukrakiish

    He explained how the disk work...worked up in an earlier post. It has nothing to do with world saving per se. Your world saving & auto saving are separate from this fix.
     
  20. Offline

    LexManos

    While your users are playing, other parts of the code are constantly calling the same function as this when players actually do something intersting.

    Combine this with a Auto Save plugin {of which there are many on the forum, and you should be running anyways.} and you will not have any issues.
     
  21. Offline

    PatrickFreed

    Will this allow more players to play at the same time?
     
  22. Offline

    Ratchet

    will reduce RAM usage at all, or increase it by more, or neither?
     
  23. Offline

    eRko16

    It is helpful for less lags on server ? 3gb ram 80players online with this plugin will be good ?
     
  24. Offline

    LexManos

    Someone with a large server go test. I can only do local things with 1-5 players.
    java -agentlib:hprof=cpu=y,lineno=y,depth=10 -jar craftbukkit.jar
    And send me java.hprof.txt after a few hours.
    Do this once with the plugin and once without it.
    And i'll be able to give more concrete information on exactly how this improve things.
    Beyond that, it *should* increase performance. Especially for those that have a lot of people running around and are getting a lot of could not keep up warning. This is in no way going to make you suddenly able to host 10 more people or anything like that. Its a miner increase.
     
  25. Offline

    Ratchet

    zing!
     
    cholo71796 likes this.
  26. Offline

    G1R Productions

    Uhmm does this work on mac? and if so how do i instal?
     
  27. Offline

    Kahl

    Configurable time would be awesome. 5 minutes would make me feel alot better about installing this on my server.
     
  28. Offline

    aaron

    My server runs on dual SSD/RAID 0. Can't wait to see what this does.
     
  29. Offline

    woodzy

    does this work with out a gui remote liunx server?
     
  30. Offline

    Craftee

    can this be used with a paid server?
     

Share This Page