Re: Request: I/O request recording

From: Valdis . Kletnieks
Date: Sat Jan 24 2004 - 13:26:13 EST


On Sat, 24 Jan 2004 19:10:27 +0100, Felix von Leitner <felix-kernel@xxxxxxx> said:
> I would like to have a user space program that I could run while I cold
> start KDE. The program would then record which I/O pages were read in
> which order. The output of that program could then be used to pre-cache
> all those pages, but in an order that reduces disk head movement.
> Demand Loading unfortunately produces lots of random page I/O scattered
> all over the disk.

The Fedora version of the kernel-utils RPM includes /usr/sbin/readahead, which
gets launched like this:

start() {
echo -n $"Starting background readahead: "
/usr/sbin/readahead /usr/share/icons/Bluecurve/48x48/mimetypes/* &
/usr/sbin/readahead /usr/share/icons/Bluecurve/24x24/stock/* &
/usr/sbin/readahead /usr/share/applications/* &
/usr/sbin/readahead `cat /etc/readahead.files` &
}

So given that program, you could simpy strace your KDE stuff, grep out all the
open calls and the filenames, stick them in /etc/readahead.files, and be done.

Attachment: pgp00000.pgp
Description: PGP signature