Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Should I use btrfs (with discard, compress=lzo and space_cache options) or Ext4 (with discard option) for the SSD for my Ubuntu 11.10 (Oneiric) amd64 desktop root partition of my office machine?

/home will be an HDD so fs reliability affects OS not my data.

share|improve this question
up vote 10 down vote accepted

According to the tests by phoronix it always depends on many factors. In one case Btrfs will be doing much better than EXT4 when reading large files on an SSD. Similarly while considering Disk transaction performance, Ext4 can perform better than the later.

You can have a look through these tests here, here and here (WARNING: Lengthy articles).

But summing altogether, Btrfs right now does not have a quantitative performance advantage over the EXT4 file-system, Even when using in the SSD mode.

So you can choose over Ext4 for now.

share|improve this answer
The articles are Sep 2011, Aug 9 2010 and May 29 2009 respectively. Focusing on the latest because I assume btrfs would be evolving over the last 2 years. The btrfs+LZO chart on page 4 is amazing for sequential read and write performance, but btrfs does badly with random writes so its definitely no to btrfs for DBs and VM images. I guess with root partition the load is mostly random reads, for which its not much better than ext4. – Graham Nov 7 '11 at 9:35
Within a few years Btrfs will turn into an better option than EXT4. Its a more promising file system :) – Nikhil Nov 8 '11 at 4:02

The last time I tested it, and I haven't heard differently yet anywhere, ext4 eats solid-state media. (thumbdrives, solid-state drives, etc.) I don't recommend using it on such a device. Use ext3 instead. For most cases on SSD you won't be able to tell the difference anyway.

BTRFS is not yet quite stable. However, it is stable enough for non-critical applications. It is what I use for making bootable flash drives. If you use compress=zlib and ssd as your mount options the compression will make up for the lower write speeds of most solid-state media and the ssd changes the allocation algorithm to one that performs significantly better on such devices and will make up for any poor wear-levelling by the hardware. The one performance area that's still an issue is that sync calls are slow. This is not a problem for general use, but dpkg calls sync after every operation, so installing and updating software can be slow. BTRFS also offers snapshotting and other advanced features that are quite useful under certain circumstances.

If you decide to go with BTRFS, be sure to use a distro using kernel 3.2.0-2 or later. 3.1.x is workable if necessary. For older kernels you'll need to compile the latest BTRFS modules yourself. The in-built ones are almost stable, but the error-correction doesn't work in the older versions, which can leave you up a creek if something goes wrong. The latest versions have fsck that can actually repair the most common faults.

One final caveat, I have heard reports that swapfiles on a BTRFS filesystem will corrupt it. This issue may well have been fixed, but be sure to check carefully before implementing one.

If you need any help getting a BTRFS setup configured the way you want, let me know. I've done a couple of crazy ones that work rather nicely for specific things.

share|improve this answer

I would not use ext4 on a solid state drive based on anecdotal evidence and my own experience that suggests ext4 can greatly diminish the lifetime of a SSD due to the number of reads and writes associated with the file system. One article I recently read suggested that unoptimized (accounting for page size, etc.) ext4 on an SSD can cut the disk life in half. After a week of trouble shooting, I've come to the conclusion that my own SSDs have only lasted eight months due to this issue. If you use an SSD, do lots of reading on how to optimize the file system based on things like flash page size which may be different than the typical cylinder size the file system is set up for.

share|improve this answer
Can you provide a link to, or other identifying information for, the article you read? – Eliah Kagan Jul 5 '12 at 12:24
I'll try to find that article specifically. Please remember, that statement was found on the internet while surfing at the cigar shop.Bottom line, do your reading and homework before using ext4 on a SSD. Look at the articles on things like TRIMM and optimization. Whatever you do, don't be like me and start getting I/O errors on commands like "sudo reboot" after eight months. – user75153 Jul 6 '12 at 0:05

Your Answer


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.