From: Alex Izvorski <aizvorski@gmail.com>
To: dean gaudet <dean@arctic.org>
Cc: linux-raid@vger.kernel.org
Subject: Re: raid5 high cpu usage during reads - oprofile results
Date: Sat, 01 Apr 2006 22:03:04 -0800 [thread overview]
Message-ID: <1143957785.20527.138.camel@starfire> (raw)
In-Reply-To: <Pine.LNX.4.64.0604011414100.17019@twinlark.arctic.org>
On Sat, 2006-04-01 at 14:28 -0800, dean gaudet wrote:
> i'm guessing there's a good reason for STRIPE_SIZE being 4KiB -- 'cause
> otherwise it'd be cool to run with STRIPE_SIZE the same as your raid
> chunksize... which would decrease the number of entries -- much more
> desirable than increasing the number of buckets.
Dean - that is an interesting thought. I can't think of a reason why
not, except that it is the same as the page size? But offhand I don't
see any reason why that is a particularly good choice either. Would the
code work with other sizes? What about a variable (per array) size?
How would that interact with small reads?
Do you happen to know how many find_stripe calls there are for each
read? I rather suspect it is several (many) times per sector, since it
uses up something on the order of several thousand clock cycles per
*sector* (reading 400k sectors per second produces 80% load of 2x 2.4GHz
cpus, of which get_active_stripe accounts for ~30% - that's 2.8k clock
cycles per sector just in that one function). I really don't see any way
a single hash lookup even in a table with ~30 entries per bucket could
do anything close to that.
Short of changing STRIPE_SIZE, it should be enough to make sure the
average bucket occupancy is considerably less than one - as long as the
occupancy is kept low the the speed of access is independent of the
number of entries. 256 stripe cache entries and 512 hash buckets works
well with a 0.5 max occupancy; we should ideally have at least 32k
buckets (or 64 pages) for 16k entries. Yeah, ok, it's quite a bit more
memory than is used now, but considering that the box I'm running this
on has 4GB, it's not that much ;)
--Alex
next prev parent reply other threads:[~2006-04-02 6:03 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1143240438.8573.59.camel@starfire>
2006-03-25 8:38 ` raid5 high cpu usage during reads - oprofile results Alex Izvorski
2006-03-26 5:38 ` dean gaudet
2006-04-01 18:40 ` Alex Izvorski
2006-04-01 22:28 ` dean gaudet
2006-04-02 6:03 ` Alex Izvorski [this message]
2006-04-02 7:13 ` dean gaudet
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=1143957785.20527.138.camel@starfire \
--to=aizvorski@gmail.com \
--cc=dean@arctic.org \
--cc=linux-raid@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).