From: Stephan von Krawczynski <skraw@ithnet.com>
To: Chris Mason <chris.mason@oracle.com>
Cc: sander@humilis.net, Hubert Kario <hka@qbs.com.pl>,
linux-btrfs@vger.kernel.org, Gordan Bobic <gordan@bobich.net>
Subject: Re: SSD Optimizations
Date: Sat, 13 Mar 2010 17:43:59 +0100 [thread overview]
Message-ID: <20100313174359.ec81c8b7.skraw@ithnet.com> (raw)
In-Reply-To: <20100311180017.GK6509@think>
On Thu, 11 Mar 2010 13:00:17 -0500
Chris Mason <chris.mason@oracle.com> wrote:
> On Thu, Mar 11, 2010 at 06:35:06PM +0100, Stephan von Krawczynski wrote:
> > On Thu, 11 Mar 2010 15:39:05 +0100
> > Sander <sander@humilis.net> wrote:
> >
> > > Stephan von Krawczynski wrote (ao):
> > > > Honestly I would just drop the idea of an SSD option simply because the
> > > > vendors implement all kinds of neat strategies in their devices. So in the end
> > > > you cannot really tell if the option does something constructive and not
> > > > destructive in combination with a SSD controller.
> > >
> > > My understanding of the ssd mount option is also that the fs doens't try
> > > to do all kinds of smart (and potential expensive) things which make
> > > sense for rotating media to reduce seeks and the like.
> > >
> > > Sander
> >
> > Such an optimization sounds valid on first sight. But re-think closely: how
> > does the fs really know about seeks needed during some operation?
>
> Well the FS makes a few assumptions (in the nonssd case). First it
> assumes the storage is not a memory device. If things would fit in
> memory we wouldn't need filesytems in the first place.
Ok, here is the bad news. This assumption everything from right to completely
wrong, and you cannot really tell the mainstream answer.
Two examples from opposite parts of the technology world:
- History: way back in the 80's there was a 3rd party hardware for C=1541
(floppy drive for C=64) that read in the complete floppy and served all
incoming requests from the ram buffer. So your assumption can already be wrong
for a trivial floppy drive from ancient times.
- Nowadays: being a linux installation today chances are that the matrix has
you. Quite a lot of installations are virtualized. So your storage is a virtual
one either, which means it is likely being a fs buffer from the host system,
i.e. RAM.
And sorry to say: "if things would fit in memory" you probably still need a fs
simply because there is no actual way to organize data (be it executable or
not) in RAM without a fs layer. You can't save data without an abstract file
data type. To have one accessible you need a fs.
Btw the other way round is as interesting: there is currently no fs for linux
that knows how to execute in place. Meaning if you really had only RAM and you
have a fs to organize your data it would be just logical to have ways to _not_
load data (in other parts of the RAM), but to use it in its original storage
(RAM-)space.
> Then it assumes that adjacent blocks are cheap to read and blocks that
> are far away are expensive to read. Given expensive raid controllers,
> cache, and everything else, you're correct that sometimes this
> assumption is wrong.
As already mentioned this assumption may be completely wrong even without a
raid controller, being within a virtual environment. Even far away blocks can
be one byte away in the next fs buffer of the underlying host fs (assuming
your device is in fact a file on the host;-).
> But, on average seeking hurts. Really a lot.
Yes, seeking hurts. But there is no way to know if there is seeking at all.
On the other hand, if your storage is a netblock device seeking on the server
is probably your smallest problem, compared to the network latency in between.
> We try to organize files such that files that are likely to be read
> together are found together on disk. Btrfs is fairly good at this
> during file creation and not as good as ext*/xfs as files over
> overwritten and modified again and again (due to cow).
You are basically saying that btrfs perfectly organizes write-once devices ;-)
> If you turn mount -o ssd on for your drive and do a test, you might not
> notice much difference right away. ssds tend to be pretty good right
> out of the box. Over time it tends to help, but it is a very hard thing
> to benchmark in general.
Honestly, this sounds like "I give up" to me ;-)
You just said that generally it is "very hard to benchmark". Which means
"nobody can see or feel it in real world" in non-tech language.
Please understand that I am the last one critizing your and others' brillant
work and the time you spend for btrfs. Only I do believe that if you spent one
hour on some fs like glusterfs for every 10 hours you spend on btrfs you would
be both king and queen for the linux HA community :-)
(but probably unemployed, so I can't really beat you for it)
> -chris
--
Regards,
Stephan
next prev parent reply other threads:[~2010-03-13 16:43 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
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 [this message]
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=20100313174359.ec81c8b7.skraw@ithnet.com \
--to=skraw@ithnet.com \
--cc=chris.mason@oracle.com \
--cc=gordan@bobich.net \
--cc=hka@qbs.com.pl \
--cc=linux-btrfs@vger.kernel.org \
--cc=sander@humilis.net \
/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;
as well as URLs for NNTP newsgroup(s).