Linux – Which linux folders to put on an SSD drive

linuxssd

I will be buying a SSD drive soon and I read that putting the swap partition in there would wear the drive down.

Is there something else that I should put on a different drive?

What about the /dev and /proc folders? I see a lot of file system activity in there.

Best Answer

  • /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…).

Related Question