From: Ted Ts'o <tytso@mit.edu>
To: Dave Chinner <david@fromorbit.com>
Cc: linux-fsdevel@vger.kernel.org,
Ext4 Developers List <linux-ext4@vger.kernel.org>
Subject: Re: [PATCH, RFC 3/3] ext4: use the O_HOT and O_COLD open flags to influence inode allocation
Date: Thu, 19 Apr 2012 22:26:06 -0400 [thread overview]
Message-ID: <20120420022606.GA24486@thunk.org> (raw)
In-Reply-To: <20120419232757.GC9541@dastard>
On Fri, Apr 20, 2012 at 09:27:57AM +1000, Dave Chinner wrote:
> So you're assuming that locating the inodes somewhere "hot" is going
> to improve performance. So say an application has a "hot" file (say
> an index file) but still has a lot of other files it creates and
> reads, and they are all in the same directory.
>
> If the index file is created "hot", then it is going to be placed a
> long way away from all the other files that applciation is using,
> and every time you access the hot file you now seek away to a
> different location on disk. The net result: the application goes
> slower because average seek times have increased.
Well, let's assume the application is using all or most of the disk,
so the objects it is fetching from the 2T disk are randomly
distributed throughout the disk. Short seeks are faster, yes, but the
seek time as a function of the seek distance is decidedly non-linear,
with a sharp "knee" in the curve at around 10-15% of a full-stroke
seek. (Ref:
http://static.usenix.org/event/fast05/tech/schlosser/schlosser.pdf)
So most of the time, as you seek back and forth fetching data objects,
most of the time you will be incurring 75-85% of the cost of a
worst-case seek anyway. So seeking *is* going to be a fact of life
that we can't run away from that.
Given that, the question then is whether we are better off (a) putting
the index files in the exact middle of the disk, trying to minimize
seeks, (b) scattering the index files all over the disk randomly, or
(c) concentrating the index files near the beginning of the disk?
Given the non-linear seek times, it seems to suggest that (c) would
probably be the best case for this use case.
Note that when we short-stroke, it's not just a matter of minimizing
seek distances; if it were, then it wouldn't matter if we used the
first third of the disk closest to the outer edge, or the last third
of the disk closer to the inner part of the disk.
Granted this may be a relatively small effect compared to the huge
wins of placing your data according to its usage frequency on tiered
storage. But the effect should still be there.
Cheers,
- Ted
next prev parent reply other threads:[~2012-04-20 2:26 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-19 19:20 [PATCH, RFC 0/3] Introduce new O_HOT and O_COLD flags Theodore Ts'o
2012-04-19 19:20 ` [PATCH, RFC 1/3] fs: add new open flags O_HOT and O_COLD Theodore Ts'o
2012-04-19 19:20 ` [PATCH, RFC 2/3] fs: propagate the open_flags structure down to the low-level fs's create() Theodore Ts'o
2012-04-19 19:20 ` [PATCH, RFC 3/3] ext4: use the O_HOT and O_COLD open flags to influence inode allocation Theodore Ts'o
2012-04-19 19:45 ` Eric Sandeen
2012-04-19 19:59 ` Ted Ts'o
2012-04-19 22:55 ` Andreas Dilger
2012-04-19 23:27 ` Dave Chinner
2012-04-20 2:26 ` Ted Ts'o [this message]
2012-04-21 0:57 ` Dave Chinner
2012-04-20 0:26 ` [PATCH, RFC 0/3] Introduce new O_HOT and O_COLD flags Alex Elder
2012-04-20 2:45 ` Ted Ts'o
2012-04-20 9:31 ` Boaz Harrosh
2012-04-20 9:12 ` Boaz Harrosh
2012-04-20 9:45 ` Lukas Czerner
2012-04-20 11:01 ` James Bottomley
2012-04-20 11:23 ` Lukas Czerner
2012-04-20 14:07 ` Christoph Lameter
2012-04-20 14:42 ` James Bottomley
2012-04-20 14:58 ` Ted Ts'o
2012-04-21 23:56 ` KOSAKI Motohiro
2012-04-22 6:30 ` Nick Piggin
2012-04-23 8:23 ` James Bottomley
2012-04-23 11:47 ` Nick Piggin
2012-04-24 6:18 ` Nick Piggin
2012-04-24 15:00 ` KOSAKI Motohiro
2012-04-21 18:26 ` Jeff Garzik
2012-04-20 10:16 ` Bernd Schubert
2012-04-20 10:38 ` Lukas Czerner
2012-04-21 18:24 ` Jeff Garzik
2012-04-24 16:07 ` Alex Elder
2012-04-24 19:33 ` Jamie Lokier
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=20120420022606.GA24486@thunk.org \
--to=tytso@mit.edu \
--cc=david@fromorbit.com \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-fsdevel@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 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).