5

I am running a game server on an Ubuntu 11.04 box. The game is Minecraft. The biggest (smallest?) bottleneck for my server is the read/write/access time of data on the hard disk. I feel a SSD could make a huge difference in performance.

The Minecraft map is stored in individual region files that are further divided into 'chunks'. Each file is between 64 KB and 10 MB each (depending on how 'developed' they are). Users are crafting the world and so are constantly loading these files and editing them while playing the game. I'm hoping to have about 15-30 users on at peak times, and 2 or 3 at minimum. The server would be up 24/7.

The entirety of the game directory (the map, player data, config file, plugins, etc) is less than 1 GB. So I don't need a lot of storage. I will be performing daily backups of the game data to a much larger HDD on the system.

Considering this scenario, would you recommend against using a SSD? I've read 'DRAM-based' SSD's do not have write limitations. Is this something I should consider?

James Mertz
  • 26,224
  • 41
  • 111
  • 163
Jesse
  • 53
  • 1
  • 4
  • 1
    If you have enough RAM, you might consider hosting the map directory completely in memory using something like `tmpfs`. But then again, for an infinite-area game like Minecraft, that may not be feasible. – new123456 Aug 03 '11 at 20:51
  • map growth could present a significant problem with that many users if they tend to spread out and explore. – Lamar B Aug 03 '11 at 21:13
  • @new123456 The machine has 6GB of RAM which I will upgrade to 8GB soon. – Jesse Aug 03 '11 at 22:07
  • @Lamar B I've pregenerated the entire map and have 'border-guard' to prevent users from moving beyond the bounds. – Jesse Aug 03 '11 at 22:08

1 Answers1

9

If you can guarantee that the datafiles were never going to exceed the 1-2GB mark I would suggest (if you have enough memory in your system) simply creating a new tmpfs or ramfs or some other type of ramdisk-like filesystem.

You would then need a startup script to copy the data onto the ramdisk and probably have a regular backup process going to back it up to the hard drive, but it would mean that while memory is not at a premium in your system then the entire world could be kept in much faster RAM.

Of course disk caching algorithms (which I believe Linux uses by default) would keep most of the recently used world data in RAM anyway, but this would prevent writes to the chunks from blocking the server.

SSD are blazingly fast, but if you are constantly writing to the drive then they can potentially die quite quickly, a ramdisk would last as long as your memory...

Mokubai
  • 89,133
  • 25
  • 207
  • 233
  • this is a good idea as long as he has a large amount of ram, 4gb minimum 6-8+ would be better. A minecraft server needs a very large amount of ram for that many concurrent users. – Lamar B Aug 03 '11 at 21:11
  • DRAM is also 20 times faster then most high-end *consumer* solid-state drives (and 20 times faster then the SATA-III bus). – Breakthrough Aug 03 '11 at 21:59
  • I used this tutorial: http://www.minecraftwiki.net/wiki/Tutorials/Ramdisk_enabled_server and it worked perfectly. – Jesse Aug 07 '11 at 15:51