How To Improve Minecraft Server Performance

Discussion in 'Bukkit Help' started by TnT, Jan 15, 2011.

Thread Status:
Not open for further replies.
  1. Offline

    TnT Retired Staff

    You can, but since you use Windows x86, you'll have to Google around for a ramdisk (I simply do not know any programs to use for that, I switched my server to a Ubuntu server because it was just easier for me). Because you can only allocate a max of 1536MB to your Java process, you have plenty to spare for a ramdisk.
     
  2. Offline

    rct2guy

    Would this be the kind of thing I'm looking for?

    So, how do I use this exactly? I mean, do I just put it on the RAM disc and run it from there? Or do I need to do anything special before I shut it down or anything like that?
     
  3. Offline

    TnT Retired Staff

    Yes, that looks like the right kind of software. Depending how it works, it may not need a reboot to setup. You MUST do backups regularly if you use a ramdisk, as any power loss, or complete crash will wipe out what you have in RAM (obviously).
     
  4. Offline

    spacerules

    I am using -Xincgc, i am just paying attention to a 20 mg increase each time a user logs in that doesn't always go away.
     
  5. Offline

    PierreLouis

    On Sun's website:
     
  6. Offline

    TnT Retired Staff

    Yes, that's what the -Xincgc command does. It has worked to lower RAM usage and decrease the amount of resources my server has used, so I will gladly exchange that 10% garbage collection performance for better overall server performance.
     
  7. Offline

    blutherz

    a
    if you have lot of money buy 4 ssd and make a RAID1+RAID5 on it as basement and use a actual x64 intel chipsetmainboard for + iCore7 cpu 3ghz+ and min. 8GB RAM DDR3.
     
  8. Offline

    TnT Retired Staff

    Why wouldn't you just use a ramdisk? Its cheaper and faster. Sure you need to do backups regularly, but I highly suggest doing backups regardless of how you run the server.
     
  9. Offline

    blutherz

    If you use a lot of plugins you will need to use Mysql and i think it is not a good idea to have the databse also in the ramdisk.

    But sure if you don't use mysql db then a ramdisk is more fast
     
  10. Offline

    TnT Retired Staff

    I still haven't found a reason to use MySQL for any plugin. However, I really only store the world in a ramdisk anyway, which is where you really need the speed increase, as disk I/O on the world itself is what causes a lot of lag. This post is about getting real world, noticeable increases in speed for your MC server, and will give you noticeable increases even if you just use the vanilla MC server.
     
  11. Offline

    PierreLouis

    I hate garbage! [​IMG]
    I understood why you used it, I'm using it now; just thought it would be nice to know what it really does![​IMG]
     
  12. Offline

    Nukaazul

    (Windows 7)
    Anyone know how to make the junction?Confused on what to do..Already got my Ramdisk set up.
    What files do I connect together?
    (Also what do I do to back it up)
     
  13. Offline

    mindless728

    having a lot of plugins does not need a mysql database, only certain plugins (really only one, BigBrother) need the database everything else doesn't really need it as it is complete overkill
     
  14. Offline

    mutiny

    if running bigbrother anyways, then isnt having other plugins use mysql as well beneficial?
     
  15. Offline

    mindless728

    not necessarily, as it takes time to do queries and more memory for the buffers and databases, most plugins (if not all, exception being BigBrother) do not need mysql, not to mention if the plugin's author doesn't know how to program well the database may not be setup correctly and cause slow downs
     
  16. Offline

    wokka1

    If you are on a decent raid array, you probably won't notice a difference from ramdisk to physical, at least I didn't. I haven't tested RAM disk since 1.3 hit, which helped saves on my raid 0 stripe quite a bit, but I have a very large world file, 700+ meg uncompressed.
     
  17. Offline

    Brettflan

    Storing the world in memory (tmpfs rather than ramdisk in my case, due to limitations) helps immensely with my VPS setup.
    Though, I haven't actually tested a 1.3 server (with the new world storage format) without the world stored in memory. The difference might not be as pronounced as before.
     
  18. Offline

    vicflo

    since 1.3 update i noticed no difference between worlds running on my servers ramdisk and the one i tested running on physical disks. I have since then moved all the worlds to an old sata drive backing up to a raid array and i dont get the "cant keep up" messages like in pre 1.3. i kinda needed the extra ram that the worlds were taking up too so that was a bonus.
     
  19. Offline

    Nima304

    Would you recommend me putting my map on a ramdisk if my map file is 2GBs in size? I have 6GBs of RAM in total, and would like to allocate 2.5GBs, while giving 500MBs for the operating system to use. However, I still have a ton of swap (7.2GBs) on two 15,000 RPM SCSI drives. What do you think?
     
  20. Offline

    TnT Retired Staff

    You could do it - you have enough RAM to spare. It would be worth trying out to test, imo. However, that being said, if you have two 15,000 RPM SCSI drives (are they in a stripe? mirror? independent) you will already have pretty decent I/O. If they are in a stripe, you'll get even faster speeds than independent disks, but have 0 redundancy.

    If you use a ramdisk, and your system starts swapping everything anyway, you might as well skip that and just use your HD's as that's what you're doing anyway.
     
  21. Offline

    Nima304

    They aren't in RAID at all. I was going to talk to one of my friends about putting them in some sort of RAID configuration, since I've never done it before myself. However, I'm not really sure what you meant in your last sentence. Do you mean I should keep running the map off of my hard drives, or that I should try it out, and use swap for overflow?
     
  22. Offline

    TnT Retired Staff

    I mean try it out - but keep an eye on your resource usage. If you see a lot of data hitting your swap, you may be negating any benefits you get from running a ramdisk, so you may want to just use your hard drive's instead. However, if you find your swap stays low (or empty) you should be fine using a ramdisk.
     
  23. Offline

    Nima304

    Alright. I'll do that, or try to beg for some 2GBs+ RAM modules from people. Thanks for your help.
     
  24. Offline

    Nima304

  25. Offline

    Erbros

    Thank you very much for this guide, especially howto setup ramdisk :)
     
  26. Offline

    TnT Retired Staff

    You're most welcome. With the day I've been having, its great to see someone appreciate the effort. :)
     
  27. Offline

    QQCucumber

    Hey @TnT, my server uses the following to create a ramdisk:

    Code:
    mount -t tmpfs -o size=512m tmpfs /home/minecraft/server
    Is your method superior or is this just another way of doing it? The server I have running on AlienVPS needs to do this because no other way will work, but I have a dedicated server as well and I'm using this same method on it since it seems to work just fine.
     
  28. Offline

    TnT Retired Staff

    Its almost the same thing. Benchmarks prove its barely any different.
     
  29. Offline

    PacketCollision

    Several people asked about whether this "ramdisk" method was better than using tmpfs. I can clear up the confusion: it is exactly the same, because you are simply mounting a tmpfs partition that is called "ramdisk". The first column in fstab is the "mount source", which for pseudo-devices like proc or tmpfs is simply an arbitrary label. Try it out if you want, replace "ramdisk" with a bunch of random letters. It should still work exactly the same.

    That said, there is nothing wrong with using tmpfs. The virtual memory allocation system in Linux is plenty good, so if it thinks your tmpfs drive really needs to be swapped out, it is probably right.

    Edit:
    I use
    Code:
    minecraft /home/bukkit/server/world tmpfs mode=775,uid=bukkit,gid=mcadmin,size=1024m
    in my fstab. Notice the uid= and gid= parts. The advantage of them for me is that I don't have to chown the directory to the bukkit user, so I don't have to be there to start the server. I run an rsync -a in a cron job to copy the ramdisk back out to disk (well, SSD in my case) every 10 minutes.
     
  30. Offline

    QQCucumber

    @PacketCollision Interesting! And thanks for clearing the ramdisk confusion up. Truth be told my method is a lot less conventional, someone gave me a service script that will run all the commands in a specified file while the system is booting up. So it's pretty much like an autoexec type thing. Given I'm a complete Linux noob, it's very convenient. :)
     
Thread Status:
Not open for further replies.

Share This Page