Re: Interleaving swap and filesystem to reduce seek times

Matthew Kirkwood (weejock@ferret.lmh.ox.ac.uk)
Fri, 8 Jan 1999 11:07:51 +0000 (GMT)


On Thu, 7 Jan 1999, Oskar Pearson wrote:

> If we were to interleave the swap and filesystem, the seek time would
> (for machines with one disk, at least) be reduced.

An interesting idea. You could simulate this by nearly filling up a
biggish partition near the middle of the disk and then making a swap file:

$ df -k
[ note that /home had 300M free ]
$ dd if=/dev/zero of=/home/fill.tmp bs=1M count=230
$ dd if=/dev/zero of=/home/new.swap bs=1M count=64
$ rm -f /home/fill.tmp
$ swapoff -a
$ mkswap -f /home/new.swap
$ swapon /home/new.swap

or similar.

Unfortunately, ext2 is a little too resistant to fragmentation for
this to work well, I suspect (although nearly filling up the disk
first helps).

Matthew.

-
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/