From: rmoser <mlmoser@comcast.net>
To: linux-kernel@vger.kernel.org
Subject: Re: Swap Compression
Date: Tue, 29 Apr 2003 15:21:21 -0400 [thread overview]
Message-ID: <200304291521210840.0462CAF4@smtp.comcast.net> (raw)
In-Reply-To: 200304291521120230.0462A551@smtp.comcast.net
Why keep a fixed page size? A 4k page can be represented by an
N bit offset in the swap partition (32 for 4 gig or less) and a 13 bit
length description. Let's not go with the overhead of 13 bit; 16 bit
lengths. Something divisible by two. Sure, we gain what
4 + 2 == 6 bytes per page, but we compress out more than that in
most cases (in theory).
and as for RAM, I really prefer the user to control swap-on-ram, and
to have it implimented as such. 4 meg'ers might try SoR but it may
hurt. The kernel should default to using the RAM swap as its primary
swap partition though. Why make extra overhead chopping up and
reassembling pages? We did that with compression.
--Bluefox Icy
(Well that's my opinion)
*********** REPLY SEPARATOR ***********
On 4/29/2003 at 10:13 AM Timothy Miller wrote:
>Here's a way to keep the two-level swap complexity down, perhaps.
>
>The VM is aware of two kinds of memory space and therefore two kinds of
>swap. The first kind of memory is "normal" memory that is used by
>applications. When the VM has to swap that, it compresses to RAM. The
>second kind of memory is "compressed" memory. When the VM has to swap
>that, it swaps it to disk.
>
Swap-on-RAM with compression enabled.
>All swapping operations are done in page units. Compressed pages will
>use arbitrary amounts of memory, so when compressed pages are swapped,
>the boundaries between one compressed page and another are not
>considered. Compressed pages will be broken up. But that's okay,
>because if there is a page fault in the compressed memory, the VM just
>swaps in from disk. Perhaps some intelligent memory management could be
>employed which reorganizes compressed RAM so that a recently used
>compressed page does not share a physical page with a compressed page
>that has not been touched in a while.
>
Ouch. That introduces extra managment between the compressed RAM
and the swapping procedure. On the plus, it would save us the hassle
of fragmented swap but heck, idle-time and on-urgent page defragmentation
should take care of that (do I need to explain these concepts?).
>There has been talk of a "simpler" system which compresses to swap
>without the intermediate level. The thing is, that intermediate level
>always exists to some extent. And trying to manage compressed pages on
>disk like that can get quite complex. If we were to compress to a whole
>number of sectors, just so we could keep things separate, then we would
>limit the benefit from compressing. The two level system could be
>employed to compress to swap simply by keeping the compressed memory
>fixed and very small.
next prev parent reply other threads:[~2003-04-29 19:10 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-04-25 22:48 Re: Swap Compression rmoser
2003-04-26 9:17 ` Jörn Engel
[not found] ` <200304261148590300.00CE9372@smtp.comcast.net>
[not found] ` <20030426160920.GC21015@wohnheim.fh-wedel.de>
2003-04-26 23:41 ` Some code for " rmoser
2003-04-27 2:24 ` rmoser
2003-04-27 9:04 ` Jörn Engel
2003-04-27 17:24 ` rmoser
2003-04-27 17:51 ` Jörn Engel
2003-04-27 18:22 ` William Lee Irwin III
2003-04-27 18:31 ` rmoser
2003-04-27 19:04 ` Jörn Engel
2003-04-27 19:57 ` Livio Baldini Soares
2003-04-27 20:24 ` rmoser
[not found] ` <200304271609460030.01FC8C2B@smtp.comcast.net>
2003-04-27 20:10 ` rmoser
2003-04-27 21:52 ` rmoser
2003-04-27 21:55 ` Re: Swap Compression -- Try 2 rmoser
2003-04-28 8:52 ` Swap Compression Eric W. Biederman
2003-04-28 10:26 ` Jörn Engel
[not found] ` <3EAE8899.2010208@techsource.com>
[not found] ` <200304291521120230.0462A551@smtp.comcast.net>
2003-04-29 19:21 ` rmoser [this message]
[not found] ` <3EADAA5D.1090408@techsource.com>
[not found] ` <200304282258310030.00DED562@smtp.comcast.net>
2003-04-29 2:58 ` rmoser
-- strict thread matches above, loose matches on Subject: below --
2003-05-09 3:21 Perez-Gonzalez, Inaky
2003-05-08 3:17 Perez-Gonzalez, Inaky
2003-05-08 8:07 ` Jörn Engel
2003-04-29 20:07 Timothy Miller
2003-04-29 20:40 ` rmoser
2003-04-29 21:14 ` John Bradford
2003-04-30 0:59 ` rmoser
2003-04-30 2:48 ` Con Kolivas
2003-04-30 12:59 ` Jörn Engel
2003-04-30 19:18 ` rmoser
2003-05-01 22:07 ` rmoser
2003-05-02 2:46 ` jw schultz
2003-04-25 22:32 rmoser
2003-04-28 21:35 ` Timothy Miller
2003-04-29 0:43 ` Con Kolivas
[not found] <200304251640110420.0069172B@smtp.comcast.net>
2003-04-25 20:48 ` rmoser
2003-04-25 21:14 ` Jörn Engel
2003-04-25 21:17 ` John Bradford
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200304291521210840.0462CAF4@smtp.comcast.net \
--to=mlmoser@comcast.net \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox