From: Wu Fengguang <fengguang.wu@gmail.com>
To: John Galloway <John.Galloway@ingres.com>
Cc: lkml <linux-kernel@vger.kernel.org>
Subject: Re: readahead in the 2.6.25+ kernel
Date: Sat, 1 Nov 2008 10:33:58 +0800 [thread overview]
Message-ID: <1225506841.225780.4979@de> (raw)
In-Reply-To: <ABB90CDC9A08FF49851AC42557795A1802E6288D@USINVMAILB01.ingres.prv>
Hi John,
On Fri, Oct 31, 2008 at 09:00:30PM -0400, John Galloway wrote:
>
> Hi,
>
> I'm looking into read ahead issues wrt Ingres, particularly wrt mmap.
> I gather (but am not sure) your readahead patches have been incorporated
> into the 2.6 kernel around 2.6.15, with some simplfications it seems??
> Are you still maintaining a distinct patch set?
The ondemand readahead patch series have been merged into linux 2.6.23/24.
So I no longer maintain out-of-tree readahead patches.
> And can you help me out about how linux readahead will effect mmap() as
> opposed to read()? i.e. is it enabled for mmap() as well?
No, mmap readahead is always a dumb and simple 'read-around' one, and
it seems there is no general interest on improving it.
Currently you have two options to affect mmap readahead performance:
- tune readahead size with command `blockdev --setra'
- tell kernel to use the ondemand readahead routines with
madvise(MADV_SEQUENTIAL)
Note that MADV_SEQUENTIAL is safe to use at least for the current
readahead implementation, it won't blindly do aggressive readahead on
seeing MADV_SEQUENTIAL. The flag only switches the readahead routine
from the dumb read-around one to the somehow smarter readahead logic,
which _detects_ sequential patterns for us.
As a long term solution, if you get favorable numbers with MADV_SEQUENTIAL,
that could be a 'first impetus' to improve the default mmap readahead code ;-)
Cheers,
Fengguang
parent reply other threads:[~2008-11-01 2:34 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <ABB90CDC9A08FF49851AC42557795A1802E6288D@USINVMAILB01.ingres.prv>]
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=1225506841.225780.4979@de \
--to=fengguang.wu@gmail.com \
--cc=John.Galloway@ingres.com \
--cc=linux-kernel@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.