5

I've spent the past several hours (not few, several!) reading different pages and questions on how to setup a tmpfs/RAMDisk. They all say different things and say what filesystems I should and shouldn't be including, so I would really appreciate a conclusive, updated answer on this.

I have 16GB of RAM and I want to dedicate maybe 6-8GB to a RAM disk.

1) I plan on adding /tmp, /var/cache, and ~/.cache to the RAM Disk (and Firefox through profile-sync-daemon). Any other suggestions on what to add? I read on moving /var/lock and /var/run too, but since it's from /var is that advisable?

2) I run LaTeX a lot (LuaLaTeX specifically) so I was thinking maybe I could install that in the RAM instead of on the actual SSD and see if that runs faster? Or I could move /var/lib/texmf and ~/.texmf-var to RAM? I don't know, so I'd appreciate the advice!

airatin
  • 51
  • 3

1 Answers1

2

/var/run is tied to the specific running instance of a machine at a time due to storing PIDs of the running processes, I would only avoid placing that on a RAM disk if you are using a virtual machine and suspend the VM often. /var/lock is intended to prevent more than a single instance of a given application from running and thus should also be fine. If you have a service which is not well behaved and uses the leftover pid/lock files to detect crashes you should either relocate the paths they store the information or find alternatives.

Source: http://www.tldp.org/LDP/Linux-Filesystem-Hierarchy/html/var.html

There are estimates running applications on a RAM disk may result in performance increases of in the 10x range. The bandwidth between your process and memory is definitely faster on modern AMD64 systems, thus this claim has substance if you are IO bound somewhere between the CPU and the disk.

Mark
  • 131