What makes a great Minecraft server?
The Minecraft server wrapper is a JAVA application. The wrapper is a CPU, Disk and Memory hungry application. It is like this because it is basically a huge database server, trying to simulate a world in one meter blocks. I am sure if you had to remember the location of a few million blocks of dirt and stone – you would behave similar.
So what can we do to ensure our server runs nicely? Do we use a Virtual Server or a dedicated Server?
If you are running a server with only a few users at any given time – then almost anything will be fine. Even a little tiny single core Intel system with 1gb of memory of which your sister used to play Pony World back in 2005 would be nice.
When it comes to a popular server – you have four major things to think about. Disk IO/Performance, Memory, CPU speed and Internet speed. We will go in order and what we need to do to ensure your users are happy
Myself I think this is the most major thing to think about with a Minecraft server. You will want to get the fastest possible storage system for your Minecraft world files. A crappy 7.2RPM drive will probably let you down where as a 15k RPM or SSD system will keep you happy. It all comes down to how many IOPS (Input/Output Operations Per Second) your storage system can do.
Let’s look into the background a little for storage. There are dozens and dozens of different brands, drive types and connections. Your computer at home probably has a 7,200 RPM Hard Drive. One of these drives can typically do between 75 and 100 IOPS. Having four of these in RAID10 (The physical space of two drives while having four drives in your system), One disk write will be spanned between two drives so you will get around double – 150 to 200 IOPS. By using 15,000 RPM Hard Drives (175-210 IOPS) in RAID10, you will get around 350 to 420 IOPS. Using a performance rated SSD (Such as an OCZ Vertex 3), you can get around 60,000 IOPS per drive. Chuck for of them into RAID10, and you can get around 120,000 IOPS. Even just RAID1 (two disks, in a mirror) will far outperform a bunch of 15K RPM hard drives but with decreased storage.
There is RAID5 – but you may have a big impact on write speeds as the storage system must write to at least 3 disks at the same time – thus giving lower IOPS then using RAID10 but of course, still more than just using a single disk. Some people say otherwise, such as on this blog.
You can also use a RAM Disk, such as Dataram RAMDisk. It has its advantages, such as even faster IO but also has its disadvantages such as more chance of something going wrong if you have memory corruption / issues which may result in your entire world breaking. Of course, keep backups of everything. Even if you are using normal hard drives or SSD.
So – from reading the above – my suggestion for a popular Minecraft server is to run slower disks (ie, 7,200 RPM hard drives) for the operating system / backups and then SSD’s for your Minecraft files (and any databases, such as MySQL). You will get best bang-for-buck performance by using smaller SSD’s (such as 40GB SSD’s) as chances are your world will never get this big and by placing everything else on slower drives – you can reduce the cost per GB by a lot.
Storage of Minecraft Files
Maps are actually pretty small.
Map resolutions and estimated physical storage required
1140x 1140 (1.1km by 1.1km) map will use around 40mb of storage.
2280x 2280 (2.2km by 2.2km) map will use around 130mb of storage
4560x 4560 (4.5km by 4.5km) map will use around 430mb of storage
9120x 9120 (9.1km by 9.1km) map will use around 1700mb of storage
18240x 18240 (18.2km by 18.2km) map will use around 6300mb of storage
Then, if you were to use another program such as Overviewer to make web accessible maps – you will need around 7x the storage of the world. Example – a 40mb world will use around 270mb of storage for the web accessible version.
The more… the better… the faster it is… even better it will be. The key things to note here is to run a 64bit version of JAVA. A 32bit version will have memory limits (around 2gb) and as such, will be useless on a popular server. When working out how much memory you need – I would be factoring in 200mb of memory per user and then an additional 2gb of memory to cover the operating system etc. So, if you were to have 40 users – you would need 10gb of memory (200 x 40 + 2000). This will help to keep your server running smooth. You will want to adjust the launch system of your Minecraft server to put a limit on memory usage.
By the nature of JAVA, an application (Such as the Minecraft server) can only use a single thread on your CPU’s. This means, even if you have a six core AMD CPU – Minecraft will only use a single core. So with this in mind – you will want to get a CPU which runs as fast and has as much cache as you can get it. A dual core 3.2Ghz CPU will outperform a 2.66Ghz Quad core CPU most of the time. A CPU with 12mb of cache will be better than one with 4mb. A CPU which talks to the system board at 1333Mhz (Front Side Bus) will be better than one which does it at 800Mhz. You get what I am saying? The fastest clock speed, with the most cache and fastest FSB. Of course, a single core CPU will be almost useless as then JAVA will need to fight with the operating system plus anything else you are running on the same server. You will want at least a dual core CPU
An Internet connection is required. Without it, how would xxFastestCat42xx connect to grief your server? Minecraft does very a lot in how much data it will eat. If everyone is close to each other it will use less traffic then if everyone was far away. If the area is simple then it will use less traffic then an area which has 10,000 blocks of moving lava.
You will need an Internet connection which has low latency, close to most of your users and has ample bandwidth available. Working out how much data you need is very hard. A popular ~30 user server can eat 400gb in a month where as a casual server for 1 or 2 people could do 10gb. At a rough guess – I would say you need around 256kbit/s per user. 10 concurrent connections may eat as little as 500kbit/s or as much as 3mbit/s. Better to be safe than sorry – so get more then you need to at first and then reduce over time if you have a limited budget.
Virtual or Dedicated Server – really depends.
Some places do really nice Virtual Servers (ie, 8gbit/s access to a real SAN system with dedicated resources such as CPU/memory) and others do a crap job (ie, local 7,200 RPM storage to the server and overselling the memory by a factor of two or more so the server starts to use the local disk for memory). Which one will you get? Hard to know without reading into what the provider says they will give you. You still have the chance of someone else on the same server doing something bad and reducing the performance of your server.
A dedicated server can be the same, they may give you a nice server with a big chunk of memory but the storage system could suck (fakeraid for example) which will let you down. But then a dedicated server does cost more than a virtual server as it will use more physical space and cost more to deploy to you.
Of course, no Minecraft server becomes really busy overnight. An entry level Virtual Server may be suitable to begin with but it may cause you issues as your server becomes more popular. You will need to ensure you do not have any long term contracts in place with a server supplier. You will also want to know the limits of the current system so when you do reach them, you know it is time to upgrade to something better. You will also want to somehow make it possible to get money from your users to help support their world.
A lot has changed with Minecraft servers recently… it seems to be way way more efficient! You still need really quick storage and you still need fast CPU’s, but less memory is required to keep it happy. This means it is now a little cheaper to run a server but you still need a good quality host/provider to do it correctly. Minecraft still isn’t multi threaded but that does not seem to be causing any issues today.
A few good Minecraft servers to try from within Australia… I might be a little bias… but Valk’s and for survival Minecraft and Cactus Retreat for Tekkit are good picks. Both are based on really awesome hardware (I know, because I supplied them!) and their operators are not idiots who want to steal your kidneys or diamond blocks. If you find any other decent server, drop me a line. I’ll have a lookie at it and if I feel the same, I will post a link to them!
If you have limits.. such as a hard limit of memory from your provider, try some of the following (these are mostly my ideas, some may not make much of a difference or may be wrong):
* Reduce the amount of plugins you have. Every single plugin you have, will consume more memory and will eat away as your CPU. Also make sure you are using the latest versions.
* Disable worlds you are not using – such as if you have made a creative world, turn it off. Having an idle world will consume a bit of memory.
* Make sure you have the latest version of Java
* Make sure you have the latest version of your server’s jar (ie, classic Minecraft or Bukkit etc)
* Make sure someone has not created a massive redstone device somewhere to eat CPU cycles.
* Reduce your world size.. the closer people are together, the less memory the server probably needs. Use a hard limit on the size, like a boarder plugin.
* Reduce the amount of users .. if you have a small amount of memory, and a lot of users currently connected, of course it is going to suck and be laggy.
* Reduce the amount of backups you make or do them off-peak hours as they will slow the server down while they are happening. Ditto for background tasks, like clearing outdated information from plugins like LogBlock or Hawkeye.
* Have programs, such as Overviewer, use less CPU’s (ie, limit to 2 CPU’s if you have a 4 core server) or run early in the morning like 4am. Ditto for the ‘live’ type maps.. they all consume a lot of CPU/memory and can make your server go slow.
* Pre-render your world for a new server – this means your server does not have to generate an area as people run away from spawn (a 380×380 area takes ~10 seconds to render, at 100% CPU of a core). Visit my site for examples you can use and download … (shameless plug, sorry!)
* Pay more for a better server/services from someone? (another shameless plug for my services!)