From: Hubert Kario <hka@qbs.com.pl>
To: linux-btrfs@vger.kernel.org
Cc: Gordan Bobic <gordan@bobich.net>
Subject: Re: SSD Optimizations
Date: Thu, 11 Mar 2010 11:59:57 +0100 [thread overview]
Message-ID: <201003111159.58081.hka@qbs.com.pl> (raw)
In-Reply-To: <20100311073853.GA26129@attic.humilis.net>
On Thursday 11 March 2010 08:38:53 Sander wrote:
> Hello Gordan,
>=20
> Gordan Bobic wrote (ao):
> > Mike Fedyk wrote:
> > >On Wed, Mar 10, 2010 at 11:49 AM, Gordan Bobic <gordan@bobich.net>=
wrote:
> > >>Are there options available comparable to ext2/ext3 to help reduc=
e
> > >>wear and improve performance?
>=20
> With SSDs you don't have to worry about wear.
Sorry, but you do have to worry about wear. I was able to destroy a rel=
atively=20
new SD card (2007 or early 2008) just by writing on the first 10MiB ove=
r and=20
over again for two or three days. The end of the card still works witho=
ut=20
problems but about 10 sectors on the beginning give write errors.
And with journaled file systems that write over and over again on the s=
ame spot=20
you do have to worry about wear leveling. It depends on the underlying =
block=20
allocation algorithm, but I'm sure that most of the cheap SSDs do wear=20
leveling only inside big blocks, not on whole hard drive, making it muc=
h=20
easier to hit the 10 000-100 000 erase cycles boundary.
Still, I think that if you can prolong the life of hardware without not=
icable=20
performance degradation, you should do it. Just because it may help the=
drive=20
with some defects last those 3-5years between upgreades without any pro=
blems.
>=20
> > And while I appreciate hopeful remarks along the lines of "I think
> > you'll get more out of btrfs", I am really after specifics of what
> > the ssd mount option does, and what features comparable to the
> > optimizations that can be done with ext2/3/4 (e.g. the mentioned
> > stripe-width option) are available to get the best possible
> > alignment of data and metadata to increase both performance and lif=
e
> > expectancy of a SSD.
>=20
> Alignment is about the partition, not the fs, and thus taken care of
> with fdisk and the like.
>=20
> If you don't create a partition, the fs is aligned with the SSD.
But it does not align internal FS structures to the SSD erase block siz=
e and=20
that's what Gordon asked for.
And sorry Gordon, I don't know. But there's a 'ssd_spread' option that =
tries=20
to allocate blocks as far as possible (within reason) from themselfs. =
That=20
should, in most cases, make the fs structures reside on an erase block =
by =20
themself.
I'm afraid that you'll need to dive into the code to know about block=20
alignment or one of the developers will need to provide us with info.
>=20
> > Also, for drives that don't support TRIM, is there a way to make th=
e
> > FS apply aggressive re-use of erased space (in order to help the
> > drive's internal wear-leveling)?
>=20
> TRIM has nothing to do with wear-leveling (although it helps reducing
> wear).
> TRIM lets the OS tell the disk which blocks are not in use anymore, a=
nd
> thus don't have to be copied during a rewrite of the blocks.
> Wear-leveling is the SSD making sure all blocks are more or less equa=
lly
> written to avoid continuous load on the same blocks.
Isn't this all about wear leveling? TRIM has no meaning for magnetic me=
dia.=20
It's used to tell the drive which parts of medium contain only junk dat=
a and=20
can be used in block rotation, making the wear-leveling easier and more=
=20
effective.
--=20
Hubert Kario
QBS - Quality Business Software
ul. Ksawer=F3w 30/85
02-656 Warszawa
POLAND
tel. +48 (22) 646-61-51, 646-74-24
fax +48 (22) 646-61-50
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" =
in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2010-03-11 10:59 UTC|newest]
Thread overview: 52+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-10 19:49 SSD Optimizations Gordan Bobic
2010-03-10 21:14 ` Marcus Fritzsch
2010-03-10 21:22 ` Marcus Fritzsch
2010-03-10 23:13 ` Gordan Bobic
2010-03-11 10:35 ` Daniel J Blueman
2010-03-11 12:03 ` Gordan Bobic
2010-03-10 23:12 ` Mike Fedyk
2010-03-10 23:22 ` Gordan Bobic
2010-03-11 7:38 ` Sander
2010-03-11 10:59 ` Hubert Kario [this message]
2010-03-11 11:31 ` Stephan von Krawczynski
2010-03-11 12:17 ` Gordan Bobic
2010-03-11 12:59 ` Stephan von Krawczynski
2010-03-11 13:20 ` Gordan Bobic
2010-03-11 14:01 ` Hubert Kario
2010-03-11 15:35 ` Stephan von Krawczynski
2010-03-11 16:03 ` Gordan Bobic
2010-03-11 16:19 ` Chris Mason
2010-03-12 1:07 ` Hubert Kario
2010-03-12 1:42 ` Chris Mason
2010-03-12 9:15 ` Stephan von Krawczynski
2010-03-12 16:00 ` Hubert Kario
2010-03-13 17:02 ` Stephan von Krawczynski
2010-03-13 19:01 ` Hubert Kario
2010-03-11 16:48 ` Martin K. Petersen
2010-03-11 14:39 ` Sander
2010-03-11 17:35 ` Stephan von Krawczynski
2010-03-11 18:00 ` Chris Mason
2010-03-13 16:43 ` Stephan von Krawczynski
2010-03-13 19:41 ` Hubert Kario
2010-03-13 21:48 ` Chris Mason
2010-03-14 3:19 ` Jeremy Fitzhardinge
2010-03-11 12:09 ` Gordan Bobic
2010-03-11 16:22 ` Martin K. Petersen
2010-03-11 11:59 ` Gordan Bobic
2010-03-11 15:59 ` Asdo
[not found] ` <4B98F350.6080804@shiftmail.org>
2010-03-11 16:15 ` Gordan Bobic
2010-03-11 14:21 ` Chris Mason
2010-03-11 16:18 ` Gordan Bobic
2010-03-11 16:29 ` Chris Mason
-- strict thread matches above, loose matches on Subject: below --
2010-12-12 17:24 SSD optimizations Paddy Steed
2010-12-13 0:04 ` Gordan Bobic
2010-12-13 5:11 ` Sander
2010-12-13 9:25 ` Gordan Bobic
2010-12-13 14:33 ` Peter Harris
2010-12-13 15:04 ` Gordan Bobic
2010-12-13 15:17 ` cwillu
2010-12-13 16:48 ` Gordan Bobic
2010-12-13 17:17 ` Paddy Steed
2010-12-13 17:47 ` Gordan Bobic
2010-12-13 18:20 ` Tomasz Torcz
2010-12-13 19:34 ` Ric Wheeler
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=201003111159.58081.hka@qbs.com.pl \
--to=hka@qbs.com.pl \
--cc=gordan@bobich.net \
--cc=linux-btrfs@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.