Which linux folders to put on an SSD drive
Solution 1:
-
/tmp
is a good choice because temporary files are often written and read by programs, not for persistent storage, but for storage of information that will be used while the program is running. Putting/tmp
on a fast disk (or even creating a RAM disk if you have the memory) will give you a performance boost. -
/etc
is also a good choice because/etc
tends to be configuration files that are read often but written rarely. This means that these configuration files can be read quickly, but you won't suffer much drive wear (though the extent of this for writing often is debated, and can be amortized through wear leveling)
Basically, anything that you are going to read more than you write is a good option because it won't wear on the drive. You should also enable wear leveling to lessen the impact of this even for many-write situations.
As chrisaycock points out, you should look through the Filesystem Layout and think about what works for you. Personally, I put pretty much everything (though, I don't use swap) except for /home
on an SSD and that is just due to space restrictions.
/dev
and /proc
are virtual filesystems which reside in kernel memory, so the writes shouldn't matter here (I could be completely wrong that the writes don't actually hit the disk, so if someone more knowledgable could weigh in, I would appreciate it. /proc
might make copies of the binaries you load for what it's worth…).
Solution 2:
You should familiarize yourself with Linux's filesystem. For example, the proc filesystem (/proc
) and the device files (/dev
) are created by the OS to look like files; they reside in memory and not on the disk anyway.
To answer your question, feel free to put anything that's actually a file on the SSD. That includes binaries, configs, logs, etc. The swap, for example, is created by the virtual memory system and is not a file, at least as far as you're concerned anyway.