From owner-freebsd-hackers Sat Feb 10 02:32:46 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id CAA02132 for hackers-outgoing; Sat, 10 Feb 1996 02:32:46 -0800 (PST) Received: from hda.com (hda.com [199.232.40.182]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id CAA02126 for ; Sat, 10 Feb 1996 02:32:41 -0800 (PST) Received: (from dufault@localhost) by hda.com (8.6.11/8.6.9) id FAA09522; Sat, 10 Feb 1996 05:37:16 -0500 From: Peter Dufault Message-Id: <199602101037.FAA09522@hda.com> Subject: Re: Compressed RAM/SWAP To: luigi@labinfo.iet.unipi.it (Luigi Rizzo) Date: Sat, 10 Feb 1996 05:37:15 -0500 (EST) Cc: hackers@FreeBSD.ORG In-Reply-To: <199602100936.KAA04409@labinfo.iet.unipi.it> from "Luigi Rizzo" at Feb 10, 96 10:36:46 am X-Mailer: ELM [version 2.4 PL24] Content-Type: text Sender: owner-hackers@FreeBSD.ORG Precedence: bulk > > Weekend brainstorm: compressed memory/swap. > I'd like ideas on the subject. (...) > Trying to compress random, single pages yields highly variable > results, but usually does better than 2:1. Many pages even compress > to <100 bytes, they are probably unused or bzeroed. > > Although the above numbers might just mean that swap blocks are > not allocated contiguously [is this true ?], it sounds reasonable > that the swap in many cases holds bzero-ed pages with sparse non-zero > elements. If this is true, then even simpler/ad hoc (and faster) > compression algorithms than gzip can work. If there are lots of zero'd pages that aren't used that often, can't be eliminated, and would benefit from compression wouldn't it be better to look at a ZFOD (zero fill on demand) mechanism? Warning: I say this in response to this message and without looking closely enough at the VM source - I see some zero_page stuff in there but it seems to wind up using bzero. -- Peter Dufault Real-Time Machine Control and Simulation HD Associates, Inc. Voice: 508 433 6936 dufault@hda.com Fax: 508 433 5267