Minecraft Wiki
Advertisement

As ramdisks clear when the server gets shut down, wouldn't it be easy to prevent stuff from getting lost with periodic saves to a HDD? Jgke 12:05, 8 July 2011 (UTC)

A Ramdisk is not a good idea for linux users.[]

The Server File is typically at most 1-2gbs.

With a Linux OS, any file node that gets accessed is stored in the RAM as cache anyways. Windows does something similiar, but is much worse at it overall.

What this means is that if a Linux server has a sufficient amount of RAM, all of Minecrafts data files will get pulled into the RAM cache eventually, providing the speed of a ramdisk without any administrative overhead, and without the risk of data loss. All it takes is loads of RAM, as minecraft can be configured to use a lot of it (internally caching already preprocessed nodes), and other applications and services on the system will require some RAM as well. But leaving it to the cache will always be more ram-efficient than using a ramdisk.

If initial preloading is a concern after booting,

cd /path/to/.minecraft ; find | xargs grep "Minecraft is Awesome"

would read all of minecrafts data files, and thus, preload them into the cache. This is however wasteful with ram and only recommended if you really have more ram than you can possibly fill up.

Just letting Minecrafts Java VM allocate plenty of RAM is going to be more efficient still, as it reduces the CPU overhead of processing file structure chunks into Live chunks.

By comparison, Windows is goddamn retarded and will put cached file accesses into the Swap file. Even when the RAM isn't full. I'm not even kidding. Ramdisk probably makes sense there, but even more sense would make: Just don't use Windows.

Advertisement