From: Wu Fengguang <fengguang.wu@intel.com>
To: Jamie Lokier <jamie@shareable.org>
Cc: Matt Mackall <mpm@selenic.com>,
Christian Ehrhardt <ehrhardt@linux.vnet.ibm.com>,
Andrew Morton <akpm@linux-foundation.org>,
Jens Axboe <jens.axboe@oracle.com>,
Chris Mason <chris.mason@oracle.com>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
Martin Schwidefsky <schwidefsky@de.ibm.com>,
Clemens Ladisch <clemens@ladisch.de>,
Olivier Galibert <galibert@pobox.com>,
Linux Memory Management List <linux-mm@kvack.org>,
"linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>,
Paul Gortmaker <paul.gortmaker@windriver.com>,
David Woodhouse <dwmw2@infradead.org>,
"linux-embedded@vger.kernel.org" <linux-embedded@vger.kernel.org>
Subject: Re: [PATCH 03/11] readahead: bump up the default readahead size
Date: Fri, 12 Feb 2010 21:59:49 +0800 [thread overview]
Message-ID: <20100212135949.GA22686@localhost> (raw)
In-Reply-To: <20100211234249.GE407@shareable.org>
On Fri, Feb 12, 2010 at 07:42:49AM +0800, Jamie Lokier wrote:
> Matt Mackall wrote:
> > On Mon, 2010-02-08 at 21:46 +0800, Wu Fengguang wrote:
> > > Chris,
> > >
> > > Firstly inform the linux-embedded maintainers :)
> > >
> > > I think it's a good suggestion to add a config option
> > > (CONFIG_READAHEAD_SIZE). Will update the patch..
> >
> > I don't have a strong opinion here beyond the nagging feeling that we
> > should be using a per-bdev scaling window scheme rather than something
> > static.
It's good to do dynamic scaling -- in fact this patchset has code to do
- scale down readahead size (per-bdev) for small devices
- scale down readahead size (per-stream) to thrashing threshold
At the same time, I'd prefer
- to _only_ do scale down (below the default size) for low end
- and have a uniform default readahead size for the mainstream
IMHO scaling up automatically
- would be risky
- hurts to build one common expectation on Linux behavior
(not only developers, but also admins will run into the question:
"what on earth is the readahead size?")
- and still not likely to please the high end guys ;)
> I agree with both. 100Mb/s isn't typical on little devices, even if a
> fast ATA disk is attached. I've got something here where the ATA
> interface itself (on a SoC) gets about 10MB/s max when doing nothing
> else, or 4MB/s when talking to the network at the same time.
> It's not a modern design, but you know, it's junk we try to use :-)
Good to know this. I guess the same situation for some USB-capable
wireless routers -- they typically don't have powerful hardware to
exert the full 100MB/s disk speed.
> It sounds like a calculation based on throughput and seek time or IOP
> rate, and maybe clamped if memory is small, would be good.
>
> Is the window size something that could be meaningfully adjusted
> according to live measurements?
We currently have live adjustment for
- small devices
- thrashed read streams
We could add new adjustments based on throughput (estimation is the
problem) and memory size.
Note that it does not really hurt to have big _readahead_ size on low
throughput or small memory conditions, because it's merely _max_
readahead size, the actual readahead size scales up step-by-step, and
scales down if thrashed, and the sequential readahead hit ratio is
pretty high (so no memory/bandwidth is wasted).
What may hurt is to have big mmap _readaround_ size. The larger
readaround size, the more readaround miss ratio (but still not
disastrous), hence more memory pages and bandwidth wasted. It's not a
big problem for mainstream, however embedded systems may be more
sensitive.
I would guess most embedded systems put executables on MTD devices
(anyone to confirm this?). And I wonder if MTDs have general
characteristics that are suitable for smaller readahead/readaround
size (the two sizes are bundled for simplicity)?
Thanks,
Fengguang
WARNING: multiple messages have this Message-ID (diff)
From: Wu Fengguang <fengguang.wu@intel.com>
To: Jamie Lokier <jamie@shareable.org>
Cc: Matt Mackall <mpm@selenic.com>,
Christian Ehrhardt <ehrhardt@linux.vnet.ibm.com>,
Andrew Morton <akpm@linux-foundation.org>,
Jens Axboe <jens.axboe@oracle.com>,
Chris Mason <chris.mason@oracle.com>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
Martin Schwidefsky <schwidefsky@de.ibm.com>,
Clemens Ladisch <clemens@ladisch.de>,
Olivier Galibert <galibert@pobox.com>,
Linux Memory Management List <linux-mm@kvack.org>,
"linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>,
Paul Gortmaker <paul.gortmaker@windriver.com>,
David Woodhouse <dwmw2@infradead.org>,
"linux-embedded@vger.kernel.org" <linux-embedded@vger.kernel.org>
Subject: Re: [PATCH 03/11] readahead: bump up the default readahead size
Date: Fri, 12 Feb 2010 21:59:49 +0800 [thread overview]
Message-ID: <20100212135949.GA22686@localhost> (raw)
In-Reply-To: <20100211234249.GE407@shareable.org>
On Fri, Feb 12, 2010 at 07:42:49AM +0800, Jamie Lokier wrote:
> Matt Mackall wrote:
> > On Mon, 2010-02-08 at 21:46 +0800, Wu Fengguang wrote:
> > > Chris,
> > >
> > > Firstly inform the linux-embedded maintainers :)
> > >
> > > I think it's a good suggestion to add a config option
> > > (CONFIG_READAHEAD_SIZE). Will update the patch..
> >
> > I don't have a strong opinion here beyond the nagging feeling that we
> > should be using a per-bdev scaling window scheme rather than something
> > static.
It's good to do dynamic scaling -- in fact this patchset has code to do
- scale down readahead size (per-bdev) for small devices
- scale down readahead size (per-stream) to thrashing threshold
At the same time, I'd prefer
- to _only_ do scale down (below the default size) for low end
- and have a uniform default readahead size for the mainstream
IMHO scaling up automatically
- would be risky
- hurts to build one common expectation on Linux behavior
(not only developers, but also admins will run into the question:
"what on earth is the readahead size?")
- and still not likely to please the high end guys ;)
> I agree with both. 100Mb/s isn't typical on little devices, even if a
> fast ATA disk is attached. I've got something here where the ATA
> interface itself (on a SoC) gets about 10MB/s max when doing nothing
> else, or 4MB/s when talking to the network at the same time.
> It's not a modern design, but you know, it's junk we try to use :-)
Good to know this. I guess the same situation for some USB-capable
wireless routers -- they typically don't have powerful hardware to
exert the full 100MB/s disk speed.
> It sounds like a calculation based on throughput and seek time or IOP
> rate, and maybe clamped if memory is small, would be good.
>
> Is the window size something that could be meaningfully adjusted
> according to live measurements?
We currently have live adjustment for
- small devices
- thrashed read streams
We could add new adjustments based on throughput (estimation is the
problem) and memory size.
Note that it does not really hurt to have big _readahead_ size on low
throughput or small memory conditions, because it's merely _max_
readahead size, the actual readahead size scales up step-by-step, and
scales down if thrashed, and the sequential readahead hit ratio is
pretty high (so no memory/bandwidth is wasted).
What may hurt is to have big mmap _readaround_ size. The larger
readaround size, the more readaround miss ratio (but still not
disastrous), hence more memory pages and bandwidth wasted. It's not a
big problem for mainstream, however embedded systems may be more
sensitive.
I would guess most embedded systems put executables on MTD devices
(anyone to confirm this?). And I wonder if MTDs have general
characteristics that are suitable for smaller readahead/readaround
size (the two sizes are bundled for simplicity)?
Thanks,
Fengguang
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2010-02-12 13:59 UTC|newest]
Thread overview: 57+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-07 4:10 [PATCH 00/11] 512K readahead size with thrashing safe readahead Wu Fengguang
2010-02-07 4:10 ` Wu Fengguang
2010-02-07 4:10 ` Wu Fengguang
2010-02-07 4:10 ` [PATCH 01/11] readahead: limit readahead size for small devices Wu Fengguang
2010-02-07 4:10 ` Wu Fengguang
2010-02-07 4:10 ` Wu Fengguang
2010-02-07 4:10 ` [PATCH 02/11] readahead: retain inactive lru pages to be accessed soon Wu Fengguang
2010-02-07 4:10 ` Wu Fengguang
2010-02-07 4:10 ` Wu Fengguang
2010-02-07 4:10 ` [PATCH 03/11] readahead: bump up the default readahead size Wu Fengguang
2010-02-07 4:10 ` Wu Fengguang
2010-02-07 4:10 ` Wu Fengguang
2010-02-08 7:20 ` Christian Ehrhardt
2010-02-08 7:20 ` Christian Ehrhardt
2010-02-08 7:20 ` Christian Ehrhardt
2010-02-08 13:46 ` Wu Fengguang
2010-02-08 13:46 ` Wu Fengguang
2010-02-08 13:46 ` Wu Fengguang
2010-02-08 13:46 ` Wu Fengguang
2010-02-11 21:37 ` Matt Mackall
2010-02-11 21:37 ` Matt Mackall
2010-02-11 23:42 ` Jamie Lokier
2010-02-11 23:42 ` Jamie Lokier
2010-02-12 0:04 ` Matt Mackall
2010-02-12 0:04 ` Matt Mackall
2010-02-12 13:59 ` Wu Fengguang [this message]
2010-02-12 13:59 ` Wu Fengguang
2010-02-12 20:20 ` Matt Mackall
2010-02-12 20:20 ` Matt Mackall
2010-02-21 2:25 ` Wu Fengguang
2010-02-21 2:25 ` Wu Fengguang
2010-02-07 4:10 ` [PATCH 04/11] readahead: introduce {MAX|MIN}_READAHEAD_PAGES macros for ease of use Wu Fengguang
2010-02-07 4:10 ` Wu Fengguang
2010-02-07 4:10 ` Wu Fengguang
2010-02-07 4:10 ` [PATCH 05/11] readahead: replace ra->mmap_miss with ra->ra_flags Wu Fengguang
2010-02-07 4:10 ` Wu Fengguang
2010-02-08 8:19 ` Nick Piggin
2010-02-08 8:19 ` Nick Piggin
2010-02-08 13:43 ` Wu Fengguang
2010-02-08 13:43 ` Wu Fengguang
2010-02-07 4:10 ` [PATCH 06/11] readahead: thrashing safe context readahead Wu Fengguang
2010-02-07 4:10 ` Wu Fengguang
2010-02-07 4:10 ` Wu Fengguang
2010-02-07 4:10 ` [PATCH 07/11] readahead: record readahead patterns Wu Fengguang
2010-02-07 4:10 ` Wu Fengguang
2010-02-07 4:10 ` Wu Fengguang
2010-02-07 4:10 ` [PATCH 08/11] readahead: add tracing event Wu Fengguang
2010-02-07 4:10 ` Wu Fengguang
2010-02-07 4:10 ` Wu Fengguang
2010-02-07 4:10 ` [PATCH 09/11] readahead: add /debug/readahead/stats Wu Fengguang
2010-02-07 4:10 ` Wu Fengguang
2010-02-07 4:10 ` [PATCH 10/11] readahead: dont do start-of-file readahead after lseek() Wu Fengguang
2010-02-07 4:10 ` Wu Fengguang
2010-02-07 4:10 ` Wu Fengguang
2010-02-07 4:10 ` [PATCH 11/11] radixtree: speed up next/prev hole search Wu Fengguang
2010-02-07 4:10 ` Wu Fengguang
2010-02-07 4:10 ` Wu Fengguang
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=20100212135949.GA22686@localhost \
--to=fengguang.wu@intel.com \
--cc=a.p.zijlstra@chello.nl \
--cc=akpm@linux-foundation.org \
--cc=chris.mason@oracle.com \
--cc=clemens@ladisch.de \
--cc=dwmw2@infradead.org \
--cc=ehrhardt@linux.vnet.ibm.com \
--cc=galibert@pobox.com \
--cc=jamie@shareable.org \
--cc=jens.axboe@oracle.com \
--cc=linux-embedded@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mpm@selenic.com \
--cc=paul.gortmaker@windriver.com \
--cc=schwidefsky@de.ibm.com \
/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.