Tips on improving server performance

Discussion in 'Bukkit Help' started by LHammonds, Nov 5, 2013.

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


    Here are some tips I've collected all over the place and some of my own ideas. Feel free to mention any tips you may have.

    1. Run as a dedicated server (don't play Minecraft from the same machine)
    2. Use Linux as the server instead of Windows
    3. Use 64-bit architecture instead of 32-bit (32-bit severely limits the amount of RAM you can use). Use 64-bit Java if you have a 64-bit operating system.
    4. If you have the option, use the fastest CPU possible. Minecraft will only use 1 CPU so it doesn't matter if you have 8 cores.
    5. If you have the option, use SSD drives. The faster the drive and faster throughput, the better. (in other words, do not put it on your slowest drives) This impacts startup speed and data read/writes (especially loading/saving of chunks)
    6. If you have the option, use high performance RAM. Speed of RAM impacts everything including the continual running of the server.
    7. Check your bandwidth consumption, you might need to increase your upload/download speed to accommodate usage or lower the amount of available slots.
    8. A good rule-of-thumb I've seen when it comes to estimating how much memory your server will need is 1GB of RAM for every 10 players but don't forget the first 1GB of RAM should be for the OS, Java (Minecraft server) and a couple of players (admins). Keep in mind that Linux servers will use less than Windows because they don't have to load a graphical user interface (GUI). Base Linux OS can run in 300 MB of RAM where base Windows install consumes 1,500 MB.
    9. Use the latest version of Java. Version 1.7+ has better performance over 1.6
    10. Use recommended builds such as CraftBukkit 1.6.4-R2.0 instead of dev builds.
    11. Do not let CraftBukkit or plugins update themselves automatically. Only upgrade if you need to and always test it on a copy of your server before applying it to your online server.
    12. Reboot your server on a regular and automated basis. At least once per day. Monitor the server to see if you should do it more or less frequently. This helps clear up discarded and unused memory that is wasting CPU cycles.
    13. Avoid plugins that only one person will use (exceptions are admin-level utilities)
    14. Avoid plugins that are resource-intensive (requiring high amounts of RAM, CPU or disk access)
    15. Monitor your server's TPS (ticks per second) with something like NoLagg. (/nolagg memlag)
    16. Monitor your plugins performance with something like NoLagg. (/nolagg examine 500, then open the .exam file using NoLagg.jar to analyze and compare plugin performance) It does not matter if you are running 10 plugins or 70 if you have 1 plugin that is sucking up all your CPU cycles.
    17. Monitor your server's memory and CPU usage with external tools. I use Linux so utilities like "htop" comes in handy.
    18. Use a plugin that can check and clear entities like ClearLagg on a regular basis.
    19. Limit your world size fairly small with something like WorldBorder and only expand by a little at a time as necessary. Additional players in the same loaded chunk do not add much overhead as players spread out all over the world.
    20. Pre-generate your world so that generation does not have to occur when players are exploring. WorldBorder is one plugin that can do this.
    21. If using plugins that have huge datafiles (like LogBlock, Hawkeye, CoreProtect), consider using MySQL...preferably on a different server but in the local network. Make sure the overall performance of Minecraft is increased or the same. Not good if you have a slower MySQL server or the connection to it is poor)
    22. If all else fails, reduce the chunk load radius in which is the "view-distance" option. It is "10" by default in 1.6.4-R2.0
  2. Offline


    Nice, These are great tips! Keep up the good work!
  3. Offline


    Remember to clear out the 1TB worth of pron from the hard drive.
  4. Offline


    Don't agree with the RAM usage part. You can get 20-30 players on 1GB no problem.
  5. Offline


    I said it was a rule of thumb, not exact science. If you are new to hosting a server, it is a nice cookie cutter for planning. It completely depends on how you setup your server, amount of plugins, kinds of plugins, etc. Exact requirements can be vastly different for a bukkit server running 5 plugins on Linux verses a server with 70 plugins on Windows. As I try to point out, you need to measure what is happening on your server and what is going on with your plugins in order to "know" rather than guess...but guesswork has to be done initially while you plan and build up your server.

  6. Really? I have a home server with a 1 GB of RAM that ran out of heap space if I did much more than set off TNT with a few players.

    Then again, it had to use some of that memory for the OS and whatnot.
  7. Offline


    I get 100+ players on 3GB no problem.
    drtshock likes this.
  8. Offline


    2. I don't think this really matters, use what works for you I suppose, but I haven't seen any better performance with one or the other.

    4. Not true, you can set Java to use as many CPUs/Cores as you want with either Windows or Linux. ;)
  9. Offline


    RAM requirements will depend on whether the players are all in one area or if they're spread out in different areas of the map, and on on how many worlds are being used. RAM is cheap. It doesn't hurt to have more.
  10. Offline


    If you are looking at renting a server, you typically pay for more resources your server uses. A default install of Ubuntu Server will use much less than a default install of a windows server. For the same amount of money for the same server, you will have more memory to allocate to Minecraft than you would on a Windows OS.

    We are talking about Minecraft/CraftBukkit here. This server runs on 1 core. Bukkit can allow some things to be spun off onto separate threads such as network handling, chunk saving and compression of chunk data before sending to a client which helps a little bit...but the bulk of the intensive work is still done in the single main server thread. It would require a complete rewrite (by Mojang) to make Minecraft utilize multiple CPUs. This cannot be done at the CraftBukkit API level.
  11. Offline


    Note, the Minecraft server CAN take advantage of multiple cores:

    Super great article below:

    Even if Minecraft Server was truly single threaded (which based upon the article above, it's not), you can still benefit from multiple cores as other tasks (OS level tasks) do not compete for the same core/processes.
  12. Offline


    ClearLag and NoLagg plugin
  13. Offline


    Did you even read my post? Specifically #15, #16 and #18? LoL
  14. Offline


    Firstly you are not allowed to recommend Spigot on the bukkit forums, and secondly NoLagg's examiner is in no way an accurate way to check plugin performance. Bukkits inbuilt timings is more accurate, and a CPU profiler like jVisualVM will be completely accurate.
Thread Status:
Not open for further replies.

Share This Page