Re: New Feature Idea: Compress swap file

Stefan Monnier (monnier+lists/linux/kernel/news/@TEQUILA.SYSTEMSZ.CS.YALE.EDU)
20 Feb 1998 11:55:27 -0500


Rik van Riel <H.H.vanRiel@fys.ruu.nl> writes:
> Sorry Jim and Adam, compressed swap has already been
> implemented and tried. The results were:
> - - more CPU spent on swapping --> slower system
> - - more I/O spent on swapping because the I/O patterns
> became more complex than normal swap --> slower system
>
> Compressed swap would only make sense when:
> - - paging space is short
> - - you are actually _swapping_ (suspending_) some
> process to alleviate the above problem

Indeed, it's been tried and mostly failed.
The only way I can see to make it successful is:
1 - compress fast
2 - compress a lot
3 - beware of mapping between incore addresses and compressed addresses.

1 and 2 require a non-generic compression algorithm: the compression code
should know what is on the page and compress integers differently from floats
or from pointers or strings...

3 requires a lot more flexibility in positioning objects: basically the VM
should be allowed to move objects around and update pointers to them.

All in all, unrealizable within Unix, but probably doable in a
(non-conservatively) GC'd world (since the GC already knows what is a pointer
and what is not and is able to move objects at will). LISP machines, Smalltalk
machines, or JavaOS would probably be good systems to try it on.

Stefan

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