Re: clustering page-ins

Jamie Lokier (lkd@tantalophile.demon.co.uk)
Tue, 27 Jul 1999 18:24:46 +0200


Chuck Lever wrote:
> + read-ahead is triggered half a cluster before the end of the
> previously read segment. is this too far in advance?

For a straight linear sweep through the file (see also Steven's notes
about tiled accesses):

The optimal trigger point depends on the rate at which the app is
sweeping through the file, vs. the disk read rate.

Assumption 1: we want to avoid any blocking in the app.

Assumption 2: we want to minimise read-ahead to satisfy 1 so we don't
flush other useful pages from the system, while doing enough
read-ahead to get good clustering and so on.

If the sweep is relatively fast you want either (a) large clusters or
(b) to trigger read-ahead _several clusters_ ahead. Specifically, the
trigger point has to be N pages ahead, where N is going to imply large
clusters or many smaller clusters. Very large clusters are bad
because they use a lot of memory, and the large requests hog the I/O
subsystem.

If the sweep is relatively slow, for minimal read-ahead page usage,
trigger read-ahead near the end of the previously read segment.
However the segments will be quite small in this case, so triggering
at the beginning of the previously read segment (Steven's suggestion)
seems fine.

-- Jamie

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