mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Timothy Miller" <tmiller10@cfl.rr.com>
To: <linux-kernel@vger.kernel.org>
Subject: Page compression in lieu of swap?
Date: Sat, 12 Apr 2003 18:35:19 -0400	[thread overview]
Message-ID: <000d01c30143$ccf54ad0$6801a8c0@epimetheus> (raw)

I did some searching of the kernel archives and the only things related to
the forthcoming idea had to do with compressing pages when writing to swap
and doing compressed disks.  Here's a different idea...

Inspired by my recent experiments in compressing kernel messages, I started
to wonder what else might benefit from compression, and the following idea
occurred to me:

Given the hideous amount of time required to access a disk, especially when
something else wants to access it, could there be a benefit to "swapping"
pages by compressing them to somewhere else in memory?  If we could achieve,
even say, 30% compression on pages, on average, then we could free up RAM
without having to do any I/O.  This would be the first line of defense
against a low-memory situation, finally resorting to actual disk access when
that becomes unworkable or for pages which can't be compressed enough for it
to help (which has a penalty worse than just writing to disk).  And
furthermore, if we were to swap first memory containing compressed pages, we
can reduce the total amount of I/O for swapping.

This would, of course, suck a lot of CPU, and in the case of a server
running many services where the CPU usage is pegged even when there's a lot
of swapping, it would be better to just swap as normal.  But in any case
where swapping is causing an increase in idle time, I would expect a
considerable benefit from being able to free up pages by making LRU pages
simply take up less space in RAM when they're not being used.

Comments?




             reply	other threads:[~2003-04-12 22:17 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-04-12 22:35 Timothy Miller [this message]
2003-04-12 22:50 ` Barry K. Nathan
2003-04-13  0:06 ` Jan Knutar
2003-04-13  1:09   ` Con Kolivas
2003-04-13  1:59   ` Timothy Miller
2003-04-13  3:12     ` Jan Knutar
2003-04-13  3:36 Perez-Gonzalez, Inaky

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='000d01c30143$ccf54ad0$6801a8c0@epimetheus' \
    --to=tmiller10@cfl.rr.com \
    --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

all inboxes | Powered by JetHome®