Linux – What are the best options for a root filesystem hosted on SSD under Linux

filesystemslinuxssd

I'm working on an embedded system which is going to be booting and hosting it's rootfs on an SSD disk. We are currently looking at using Intel X-18M SSDs.

The file system structure will have a fairly static /usr section (modulo software upgrades) and an active /var and /var/log for maintaining state and logging. Given the wear-levelling done by the underlying flash does having separate partitions help or hinder?

As modern SSDs appear as straight block devices and hide their mapping magic behind their firmware is there any point trying to optimise the choice of file-system that sits on-top of the SSD?

Finally does enable SMART monitoring make any sense in this context or are their SSD specific ways of determining the underlying health of the storage hardware?

Best Answer

Having separate partition can help if you use different filesystem/mount configuration for different partition based on usage. Some filesystems are optimised for SSDs like NILFS. So,yes, they do matter. If you have sufficient RAM, you can mount /var/log on tmpfs to reduce pressure on SSD. Options like noatime can certainly be used to reduce disk updates. If you do not have sufficent RAM, you can still mount it and use SSD for swap device as well. Also it has been strongly suggested to use noop I/O scheduler instead of default CFQ on linux. This should certainly reduce CPU usage.

Also make sure to use linux 2.6.33 if possible since it supports ATA Trim which should improve life of the device significantly. If 2.6.33 is not available then you can look at backporting them.

EDIT: Since you have mentioned embedded, I presume memory will be scarce for tmpfs. So in that situation I suggest using swap partition on SSD or if that is also not possible, a swap file(as backing store) will also do.