Re: New Feature Idea: Compress swap file

Rik van Riel (H.H.vanRiel@fys.ruu.nl)
Mon, 23 Feb 1998 14:07:57 +0100 (MET)


On Fri, 20 Feb 1998, Sergio Devojno Bruder wrote:

> At 18:12 19/02/98 -0800, docwhat@gerf.org ;The Doctor What wrote:
> What about this:
>
> - Our objective is performance, by reducing the amount of read/write to
> the swap;
> - Compress by pages and write the compressed pages in 4k pages, possibly
> WASTING space
> in each page.. (it's ok);
> - But you can't guarantee that we can compress all cases. Make a map of
> the pages
> compressed/not-compressed. A 200MB swap will use 6400 bytes of memory
> with compressed/
> not compressed bits;

What all you folks seem to forget is that _seek_ time
is, by far, the dominant factor in swapping.

Let's assume a 2MB/second, 9ms seek, 5400RPM disk.
With a disk like this, is takes 9 + (60000 (ms/min) / 5400) / 2 =
14.5 ms to find a certain position on the disk.
And it takes 2meg/4k = 1/512th = 2ms to transfer the block.

This means that we won't get a performance increase from
compressed swapping.

Clustered swapping however, _is_ going to make a _huge_
difference. So if you want performance, better focus on
something that will work.

Rik.
+-----------------------------+------------------------------+
| For Linux mm-patches, go to | "I'm busy managing memory.." |
| my homepage (via LinuxHQ). | H.H.vanRiel@fys.ruu.nl |
| ...submissions welcome... | http://www.fys.ruu.nl/~riel/ |
+-----------------------------+------------------------------+

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu