Re: Dynamic swap priority depending on headmove/time and drive utilization ?

Stephen C. Tweedie (
Tue, 7 Jul 1998 13:05:23 +0100


On Sat, 4 Jul 1998 05:00:55 +0200 (CEST), Arjan Filius <> said:

> At the moment i use 3 swap partitions on 3 different IDE disks with the
> same priority (so each swap is used equal). But all those 3 disks contain
> also data and it depends which drive is the most busy (normal data, no
> swap).

> So i wonder if is it is possible to change dynamicly the priority of
> each swapspace depending on how busy thos those drives are?

In theory yes. In practice it's probably a bad idea, since when you
write data to swap, you are committing that data to live at a certain
location in swap. Just knowing the current business of the swap
drives may not necessarily tell you a lot about how busy they will be
when you want to read the data back in again.

In short, the risk is that a burst of activity on one drive will send
all of swap to another disk, and then that for the remainder of that
process's lifetime, large chunks of its VA are being swapped to a
single disk rather than striped over multiple disks.

Writing to swap is only a part of the cost of swapping; read counts
too, and we potentially read many times for a single write. We'd have
to balance the improvement in write throughput against the unbalancing
of the read performance.


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to