Re: RAM compression?

Trevor Johnson (trevor@jpj.net)
Fri, 19 Jun 1998 04:47:10 -0400 (EDT)


> 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...

You might want to have a look at
http://www.uwsg.indiana.edu/hypermail/linux/kernel/9802.2/0507.html
and
http://www.ntlug.org/~cbbrowne/linux06.html.

> 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.

I just tried it:

# mkswap swapfile
Setting up swapspace, size = 16773120 bytes
# swapon /home/swapfile
EXT2-fs warning (device 03:06): ext2_bmap: compressed cluster
rw_swap_page: bad swap file
EXT2-fs warning (device 03:06): ext2_bmap: compressed cluster
rw_swap_page: bad swap file
EXT2-fs warning (device 03:06): ext2_bmap: compressed cluster
rw_swap_page: bad swap file
EXT2-fs warning (device 03:06): ext2_bmap: compressed cluster
rw_swap_page: bad swap file
Unable to find swap-space signature
swapon: /home/swapfile: Invalid argument

You can get the ext2 compression patches from
http://www.netspace.net.au/~reiter/e2compr/.

> (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

There are already resource limits--see the setrlimit(2) man page.
Typically, an administrator would set them in /etc/login.conf or
/etc/profile. It's been proposed that the way Linux does this should be
improved, but this is a matter of controversy among the top developers.
___
Trevor Johnson

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