Move Minecraft world to RAMdisk

Problem Statement

On systems with abundance of RAM, but relatively slow storage, loading new chunks in Minecraft can be very laggy. My idea is that optionally you could copy the world directory to a RAMdisk and set the server to use the copy there.

Who will benefit?

It could benefit anyone who has systems with a lot of free RAM, since RAMdisks have huge I/O performance compared even to modern SSDs.

Benefits and risks

What benefits does this bring?

  • Less lag when travelling.
  • Free up disk I/O for more important stuff.

What risks might this introduce?

  • Only suitable for systems with a lot of free RAM, therefore has to be disabled by default.
  • I currently only know how to create a RAMdisk on Linux.
  • It probably won't fit the whole server directory (configs, JARs, etc.), just the world directory.
  • You need to be extra careful to always copy the directory back on disk every once in a while, to prevent data loss from power outage.

Proposed solution

I don't know how about other platforms, but on Linux (and therefore Docker as well, since it uses the Linux kernel) the easiest way to create a RAMdisk is using the already existing /dev/shm directory, that in most distros is mounted as tmpfs, Linux' native RAMdisk solution.

Examples

I don't know about any.

Priority/Severity

  • High (This will bring a huge increase in performance/productivity/usability)
  • Medium (This will bring a good increase in performance/productivity/usability)
  • Low (anything else e.g., trivial, minor improvements)
Edited by creeper6530