Spigot #603 huge memory leak?

Discussion in 'Performance Tweaking' started by jamesst20, Mar 7, 2013.

  1. Hi,

    I had hosted a minecraft server before christmas then I stopped. Finally, I came back and made a new server this weekend. I'm hosted on pytohost with a 2GB Ram plan + SSD.

    I have noticed that spigot (using latest 603 build) takes a lot of RAM. My memory usage could be up to 80-100% with only 4 players! I've checked if all my plugins were up to date and yes they are!

    I took the decision to switch to Craftbukkit latest developement build and since that, my memory usage is much much better, around 47% for 5 players.

    What do you guys suggest? Is Spigot really the problem?

    Plugins (13): WorldBorder, JCommandEssentials, JInitialRestriction, NoCheatPlus, WorldEdit, CoreProtect, PluginManager, BKCommonLib, My Worlds, PermissionsEx, Modifyworld, WorldGuard, ChatManager

  2. md_5

    Administrator Developer

    Spigot uses a little bit more ram in order to reduce CPU usage - however you have called this a leak - is it actually constantly increasing?
  3. Thanks for having replied :) Well when I first run the server, nobody is on, the ram is about 45% and once 5 players join, about 20 minutes later my ram usage is almost 100%. I didn't watch if it goes straight up to 100% ram usage or if it goes gradually thought :/

    Also, the server feels laggy, everyone complains the server lag and the worse is that there is no mobs, I don't see any reason why it should lag and since I switched to craftbukkit, no issue so far. I always loved Spigot so it might only be a little mistake introduced recently
  4. I also believe there could be a memory leak in it. I loaded my server (offline) waited about 30mins and I did notice about 10mb ram continuously rising every 5-10seconds
  5. md_5

    Administrator Developer

    Mhm, and then when the garbage collector kicks in it will drop again. Thats how programs work. I'll grab a graph of memory use on my server to show you.

    #5 md_5, Mar 7, 2013
    Last edited: Mar 7, 2013
  6. I left it on for the last 3 hours after that post, just to be sure :p
    It has kept all of my RAM in cached and available, No "free ram" im not sure if this is just because I dont have enough to begin with or not... I am using 6gb (3xmx 3 xms) and its keeping me at 7.3/8 (and the rest is cycling i suppose) I do have an order from newegg arriving tomorrow I believe, so maybe a new test will show different results :)

    edit: I would also like to add that this is a recent upgrade from 1.4.6 Latest spigot (not sure what number it was...) to latest dev 1.4.7 603 build. and I also notice that my server CPU Idle went from 3% steady. to 4-10% random (no users online)
  7. like to add to this that the memory thing looks real but the cpu is less atleast for me. but memory it used to be at around 20 % all the time for me but now is all the way to 40% , right now is at 34% with just one player on.. if you need more info let me know how I can help.
  8. Ran Craftbukkit latest dev built for more then 24 hours and my RAM usage never reached 70% and Spigot reach 100% in less then an hour and keep it at 100% :S Is there anything I can do? I don't see why 2GB of Ram wouldn't be enough for few players (less then 10 actually) :S

  9. md_5

    Administrator Developer

    Spigot trades ram for CPU, not noticeable when you have 4g, but I guess not might be at 2. Spigot can hold 300 players at 8gb.
  10. Not really, as I held up 180 players at 1GB with no issue lol. (This was back in December though, when I was growing my server).
  11. Wow that's a lot, how do you actually get a hundred peoples? I'm trying to advertise it as much as possible but I only get few players (max 18)
  12. Your server needs something unique (not saying it hasn't), and not just a regular Factions/PVP server with a few plugins.
  13. It's not even funny how many Factions + mcMMO or griefing/raiding servers I've seen on PMC.
  14. Google advertisement or projectwonderful. Note: Running these types of advertisement can get very expensive.
  15. md_5

    Administrator Developer

    Just pushed something to help ram uasge when using Netty.
    • Like Like x 1
  16. Thanks you! I will try as soon as I find out what Netty is :)
  17. md_5

    Administrator Developer

    Don't bother, its actually not ready
  18. so after running my server with 1gb of ram got 25 people on it running everywhere nether end mob grinders memory usage is at 100% all the time but no lag at all, using the inbuild xray I may post more info on this.

    ps cpu usage us very low at around 10%
  19. Alright :p Waiting for you to update to 1.5 :)