public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Chris Snook <csnook@redhat.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Filesystem for block devices using flash storage?
Date: Wed, 08 Oct 2008 16:51:46 -0400	[thread overview]
Message-ID: <48ED1D62.8080100@redhat.com> (raw)
In-Reply-To: <jwvvdw33v5p.fsf-monnier+gmane.linux.kernel@gnu.org>

Stefan Monnier wrote:
> Google finds some people asking this same question, but I couldn't find
> any answer to it: what filesystem is recommended to use on an flash
> based disk that does not give access to the MTD layer (e.g. USB keys,
> most SSDs, ...)?

Unless you really know what you're doing, you should use a general-purpose disk 
filesystem.  You probably also want to use the relatime mount option, which is 
default on some distros.

> Since they do their own wear-levelling, any filesystem should be "safe",
> but I expect there is still a lot of variance in terms of performance,
> wear, robustness, ...

Writes to magnetic disks are functionally atomic at the sector level.  With 
SSDs, writing requires an erase followed by rewriting the sectors that aren't 
changing.  This means that an ill-timed power loss can corrupt an entire erase 
block, which could be up to 256k on some MLC flash.  Unless you have a RAID card 
with a battery-backed write cache, your best bet is probably data journaling. 
On ext3, you can enable this with the data=journal mount option or the 
rootflags=data=journal kernel parameter for your root filesystem.  It's entirely 
possible that doing this will severely harm your performance, though it's also 
possible that it may actually help it if you use a larger-than-default journal, 
thanks to improved write coalescing.

> Has anyone conducted serious experiemnts to try and find out what works
> better?  Also, since it appears that such devices are here to stay,
> would there be a need to design a new filesystem or to tune existing
> filesystems for this particular kind of device?

logfs tries to solve the write amplification problem by forcing all write 
activity to be sequential.  I'm not sure how mature it is.

> Or is there some hope for SSDs to provide access to the MTD layer in the
> not too distant future?

I hope not.  The proper fix is to have the devices report their physical 
topology via SCSI/ATA commands.  This allows dumb software to function 
correctly, albeit inefficiently, and allows smart software to optimize itself. 
This technique also helps with RAID arrays, large-sector disks, etc.

I suspect that in the long run, the problem will go away.  Erase blocks are a 
relic of the days when flash was used primarily for low-power, read-mostly 
applications.  As the SSD market heats up, the flash vendors will move to 
smaller erase blocks, possibly as small as the sector size.  Intel is already 
boasting that their new SSDs have a write amplification factor of only 1.1, 
which leaves very little room for improvement with erase-block-aware filesystems.

-- Chris

  reply	other threads:[~2008-10-08 20:51 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-08 16:38 Filesystem for block devices using flash storage? Stefan Monnier
2008-10-08 20:51 ` Chris Snook [this message]
2008-10-11 14:35   ` Pavel Machek
2008-10-11 16:29     ` Arjan van de Ven
2008-10-11 17:51     ` Alan Cox
2008-10-12 13:01     ` Jörn Engel
2008-10-13 10:57       ` Pavel Machek
2008-10-13 12:10         ` Jörn Engel
2008-10-14 18:04     ` Lennart Sorensen
2008-10-12 14:35   ` Jörn Engel
2008-10-13 17:30     ` Chris Snook
2008-10-13 18:13       ` Jörn Engel
2008-10-13 18:38         ` Chris Snook
2008-10-14 11:18 ` Jörn Engel
2008-10-14 13:05   ` Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=48ED1D62.8080100@redhat.com \
    --to=csnook@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox