lkml.org 
[lkml]   [1998]   [Jun]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRAM compression?

Is anybody has thought about writing/replacing a part of the kernel for
RAM compression? this would 1. reduce swapping and 2. make swapping
faster... this would be useful mostly to compress page tables, text
buffers, data segments of zero-filled buffers, etc., obviously. this
should be tunable to different levels of compression (-0 through -9), via
a /proc file.

There should be a special compression method for arrays of ints, because
it happens often that large tables of ints containing small values are
stored. So, for example, in a 4k block, the bytes would become in that
order: 0, 4, 8, 12, 16, 20, ... 4092, 1, 5, 9, ... and then regular
compression would apply. this would make all 0's straight in line. i
didn't test whether this is good in practice.

if not, could a swap file be stored on a compressed drive? if this seems
a weird idea, i'd say that it depends on the implementation. there could
be optimizations done on the compression.

another idea, this one is mine i believe, is to implement a form of
hierarchical swap system, similar to a hierarchical window system such as
X. You would define, for example, that all processes of common ancestor
(like nice or chroot systems) would run in no more than 8 MB of physical
RAM. This way, a sysadmin could prevent a user from thrashing the machine
that many users use at once, among other things. At a finer grain, a user
might decide to confine netscape in 5 megs of RAM to let other processes
live better. and so on.



well, that was my 0.02 $ (canadian money).

matju



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu

\
 
 \ /
  Last update: 2005-03-22 13:43    [W:0.532 / U:0.224 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site