From owner-freebsd-hackers Mon Feb 26 12:31:09 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id MAA13681 for hackers-outgoing; Mon, 26 Feb 1996 12:31:09 -0800 (PST) Received: from labinfo.iet.unipi.it (labinfo.iet.unipi.it [131.114.9.5]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id MAA13667 for ; Mon, 26 Feb 1996 12:31:03 -0800 (PST) Received: from localhost (luigi@localhost) by labinfo.iet.unipi.it (8.6.5/8.6.5) id VAA01280 for hackers@freebsd.org; Mon, 26 Feb 1996 21:24:43 +0100 From: Luigi Rizzo Message-Id: <199602262024.VAA01280@labinfo.iet.unipi.it> Subject: RAM compression again To: hackers@freebsd.org Date: Mon, 26 Feb 1996 21:24:43 +0100 (MET) X-Mailer: ELM [version 2.4 PL23] Content-Type: text Sender: owner-hackers@freebsd.org Precedence: bulk I have been thinking a little bit on the subject. I have come out with a relatively simple zero-removal algorithm which compresses (and decompressed) a 4KB page in about 100us (yes, that's 40MB/s) on a Pentium 100. While the compression ratio is not as high as with gzip, I consistently get a 2.5 reduction on FreeBSD 2.1R and 1.1.5 (maybe this is an artifact of the inefficient malloc) and on Alpha/OSF (64-bit architecture, known not to make a very efficient use of memory). More interesting is that some 15-20% of the pages compress to 64-bytes or less. Thus a very effective RAM-swap area could be implemented with little cost and additional complexity (with fixed-size, 64-bytes blocks). A description of the compression/decompression algorithm and its implementation are available from the following URL: http://www.iet.unipi.it/~luigi/research.html I'd be interested if someone could try it on a more recent system than 2.1R and report the results. Thanks Luigi ==================================================================== Luigi Rizzo Dip. di Ingegneria dell'Informazione email: luigi@iet.unipi.it Universita' di Pisa tel: +39-50-568533 via Diotisalvi 2, 56126 PISA (Italy) fax: +39-50-568522 http://www.iet.unipi.it/~luigi/ ====================================================================