Re: Compressed pages to/from swap devices/files?

Drew Eckhardt (drew@poohsticks.org)
Thu, 15 Feb 1996 13:46:37 -0700


In message <9602150222.AA01843@host>, chorn@warwick.net writes:
>
> There was some talk on the development newsgroup about compressed
>memory schemes and things like that. Also mentioned was a patch from a
>few years back that compressed pages before swapping to disk. I'm not
>sure if the CPU overhead would make it worthwhile, and of course you
>need some free memory to do compression in the first place. Does
>anyone think something like this might be worth pursuing?

The problem with swapping isn't throughput (which compression could help
IF you had enough CPU horsepower, which you don't), but access time, which
compression will always hurt. So, compressing pages before swapping them
to disk will decrease performance.

However, an i486-66 with gzip can compress at the same speed as it can read/
write random pages on a moderately quick disk (12ms); and can decompress
significantly faster.

So, with some memory access patterns, on most hardware (486-DX2 or
faster with a contemporary drive; or a slower system + older drive),
assuming you can achieve the right balance between "swap" memory usage
and page cache, you could achieve a performance increase by compressing
pages in-core.

-- 
You too can commit two felonies by using this .sig:
Eat bite fuck suck gobble nibble chew; nipple bosum hairpie finger-fuck screw
moose-piss cat-pud orangutan-tit; sheep-pussy camel-crack pig-a-lie-in-shit