Re: [PATCH 0/9] mmap read-around and readahead

From: Fengguang Wu
Date: Wed Dec 19 2007 - 02:37:34 EST


On Sun, Dec 16, 2007 at 03:35:58PM -0800, Linus Torvalds wrote:
>
>
> On Sun, 16 Dec 2007, Fengguang Wu wrote:
> >
> > Here are the mmap read-around related patches initiated by Linus.
> > They are for linux-2.6.24-rc4-mm1. The one major new feature -
> > auto detection and early readahead for mmap sequential reads - runs
> > as expected on my desktop :-)
>
> Just out of interest - did you check to see if it makes any difference to
> any IO patterns (or even timings)?

Now I have some numbers on 100,000 sequential mmap reads:

user system cpu total
(1-1) plain -mm, 128KB readaround: 3.224 2.554 48.40% 11.838
(1-2) plain -mm, 256KB readaround: 3.170 2.392 46.20% 11.976
(2) patched -mm, 128KB readahead: 3.117 2.448 47.33% 11.607

The patched (2) has smallest total time. It has no cache hit overheads
and less I/O block time(thanks to async readahead). Here the I/O size
makes no much difference, since there's only one single stream.

Note that (1-1)'s real I/O size is 64KB and (1-2)'s real I/O size is
128KB, since the half of the read-around pages will be cache hits.

Fengguang
---

PS. raw time numbers:

1) linux-2.6.24-rc5-mm1, 128KB read_ahead_kb:

3.27s user 2.62s system 50% cpu 11.730 total
3.25s user 2.65s system 49% cpu 11.816 total
3.07s user 2.62s system 47% cpu 11.911 total
3.32s user 2.42s system 48% cpu 11.948 total
3.21s user 2.46s system 48% cpu 11.787 total

2) linux-2.6.24-rc5-mm1, 256KB read_ahead_kb:

3.00s user 2.46s system 45% cpu 12.077 total
3.41s user 2.51s system 49% cpu 12.038 total
3.25s user 2.34s system 47% cpu 11.889 total
3.13s user 2.33s system 45% cpu 11.922 total
3.06s user 2.32s system 45% cpu 11.952 total

3) linux-2.6.24-rc5-mm1 + this patchset, 128KB read_ahead_kb:

2.79s user 2.26s system 43% cpu 11.515 total
3.19s user 2.21s system 46% cpu 11.563 total
3.28s user 2.51s system 49% cpu 11.596 total
3.22s user 2.75s system 51% cpu 11.687 total
3.08s user 2.58s system 48% cpu 11.643 total
3.14s user 2.38s system 47% cpu 11.637 total

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/