Re: compressed swap performance issues

Prasun Kapoor (prasun@wipinfo.soft.net)
Tue, 22 Dec 1998 17:22:09 -0500 (GMT)


> In article <199812210952.DAA27240@babushka.cs.utexas.edu> you wrote:
> > Compressed VM has been tried before, and gave mixed results, but
> > technology trends make it a much better deal now, and getting
> > better all the time.
> [rest snipped]
>
> I see some minor issues with what I think you mean:
>
> 1) Programs _never_ enter the swap. (At least ELF-executables) So there
> is nothing to win here, unless you want to _write_ an executable to disk
> first before reading it (which effectively gains probably nothing)

I think what was meant here was the memory footprint of a running program
and not just the execulable size. All running processes have swappable
segments that often exceed the text segment.

Also "text" pages that are simply discarded on a page out, to be read back
in from the a.out later, would gain by being compressed and put in memory.

> 2) The current swap-code is efficient because it uses a _fixed_ granularity
> (eg one page, 4k or 8k). Disks like this. Unless you are using a
> fixed-to-fixed block-encoding algorithm, compression loses this property.

I dont see this as a difficult issue. Based on worst case compression
ratio, we could say "2 pages = 1 page" or such like.

> 3) For swapping over the network: A compressed network-protocol would gain
> MUCH more, not only swapping but for normal traffic also.
> 4) In your timings, you assume there is one physical disk. If there are
> more, Linux spreads the load amoung them and is able to achieve much
> higher bandwidths.
> 5) Reserving a fixed piece of memory loses the flexibility the current
> kernel has in splitting the "spare" memory amoung cache/data/programs
> in an optimal way

This is what it does exactly. Smart management of RAM. You mention
cache... and this is just another form of cahe. Cache the pages you know
you are going to need soon when the process becomes active again.

prasun

>
> Greetings,
> Arjan van de Ven
>
> -
> 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/
>

_____________________________________________________________________________
"If seven maids with seven mops, Swept it for half a
Prasun Kapoor year, do you suppose" the Walrus said, "That they
Wipro Infotech Ltd. could get it clear"."I doubt it" said the Carpenter,
Ph. 5530084/34/36/53 and shed a bitter tear
Extn. 1052
"Through the looking glass and what alice found
there" - Alice in Wonderland -

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