What are the best practices for using an SSD on a Linux workstation?
Specifically, I'm interested in:
- What mounts I should put on the SSD and what I should keep on my HDD
- What filesystem I should use for what I do put on the SSD
- Whether it's okay to use LVM between the filesystems and the SSD
- What do I need to do to get things like TRIM to work (and whether it matters)
Right now, my mounts are 20G for /
, 200M for /boot
, 15G for /home
, 5G for /srv
, 5G for /tmp
, and 10G for /var
. Everything uses ext3 on standard LVM, and there's a ton of free space both on the filesystems and on the disks (500G HDD and 64G SSD.) I have "enough" RAM, so I shouldn't need to swap; OTOH, I could always increase swappiness to swap more and use more RAM for the page cache.
Pretty much everything about the setup is mutable; I don't need to do whatever I do live. (It would be nice to be able to grow things live later, though.)
Also, if there's anything I'm forgetting to consider, please tell me. :)
If you have a 2nd or 3rd generation SSD (that means any drive with TRIM) then you don't have to treat it any different than a regular HDD: you can put write intensive files, journal and swap on it. One thing to remember: align all your partitions to 4MiB boundaries. New versions of
parted
should do that automatically.For filesystems: ext3 and ext4, especially the later, do work fine on SSDs and do support TRIM (others received support sometime later) but only in recent kernels: 2.6.32 (AFAICR). TRIM through LVM is supported, but was added even later. Basically everything above 3.0 is fine.
All in all: yes, all those use-cases are supported and should work fine, but it depends on kernel version and the specific patches your distribution provider added to the kernel above the standard version.
And sorry for the lack of specifics, but those features were added in at least 4 or 5 non consecutive versions.