Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I always thought that traditional file systems, are geared and optimized for non-ssd drive, where, for instance, data locality is important, and fragmentation is problematic.

Is there a file system recommended today for SSD drives? Am I better off just using ext4?

share|improve this question
add comment

3 Answers

up vote 5 down vote accepted

If the SSD is to be your only disk platform, regardless of number of devices, then you have a quandry; how to minimize writes while maintaining reliability and performance.

More specifically, ext4, and 3 for that matter, NILFS, and almost any other modern file system will maintain a journal. Ordinarily this is desirable, however, when dealing with SSD devices it increases the writes performed against the device and thereby reduces its lifespan. One option is to select a conventional IDE, SATA, or other device to which the file system can write its journal. This way one may maintain the benefits of journaling without sacrificing lifespan of the SSD device(s). In the case of ext4 this can be accomplished as: mke2fs -O journal_dev /dev/external_device then attached to the specific file system as: mkfs.ext4 -J journal=/dev/external_device. More information can be found in the man page.

An additional feature of file systems to keep in mind when deal with SSD devices is atime. Setting atime on a file system can drastically increase the number of writes to a given device over time. Options for changing this behavior include 'relatime' and 'noatime'.

Since we seem to be focusing on ext4, the kernel documentation on the file system, including its available options, is available for reference here.

Some other options to consider: noload, as vorbote suggested, and errors=remount-ro;

share|improve this answer
    
What about nodiratime? –  Elazar Leibovich May 17 '11 at 13:48
    
@Elazar Leibovich - 'noatime' implies 'nodirtime'. If your question was in regards to the value of the latter over the former then certainly exempting directories from atime is better than nothing, but obviously the benefit will be less when compared to the former. –  Tok May 17 '11 at 15:33
    
I dunno - this seems like a lot of continued FUD about "write endurance". Even the most consumery drives will put up with at least 6 months of continuous writing of large data (SSD's are slow to write small changes). i.e. if it's a corporate file server, be concerned (tweak and get a good SSD). If it's a single user PC, then you'll want to replace your SSD in 5 years anyhow. That said, turning off atime etc will increase your performance (more over time) –  Stephen Aug 21 '13 at 3:05
add comment

If available in your kernel and you are feeling adventurous you may wish to consider NILFS

Otherwise use ext4 but mount with noatime - see here for more tips.

share|improve this answer
1  
Sounds similar to btrfs. –  Elazar Leibovich May 17 '11 at 9:27
add comment

You can use ext4 with the noload mount option added to your /etc/fstab file. It will make the filesystem behave as ext2 on steroids. In fact, AFAIK this is what Google uses in its data centers. You lose the safety net data journaling provides but you gain speed and longer life for your SSD.

You can make it permanent by running tune2fs -O ^has_journal on the unmounted partition(s).

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.