LWN.net Logo

Compcache: in-memory compressed swapping

Compcache: in-memory compressed swapping

Posted May 29, 2009 5:57 UTC (Fri) by zmi (guest, #4829)
In reply to: Compcache: in-memory compressed swapping by rvfh
Parent article: Compcache: in-memory compressed swapping

> mem -> compressed swap -> uncompressed swap on disk
> [and from the article:]
> allow swapping of xvmalloc memory to physical swap disk

That was my immediate idea when reading the article. I'd love it to be a
layer inserted just before normal swap disks, absolutely transparent. Like
this, (compressed) pages not used for a long time can be put to disk swap
at low I/O rates (or low I/O times, if that's easily measurable). And when
too much real mem is used, ramzswap can move pages to disk swap (maybe just
as a last resort to recover before OOM conditions).

The disk swap should support compressed pages directly, and you can also
drop (or at least increase) the "if not enough compression gain, store
uncompressed to disk" rule, and just store pages that are not good
compressed to disk swap, but in it's compressed state. That should help
lower I/O, which is never a failure :-)

If this feature arrives, the vm.swappiness can be increased to more quickly
swap. Currently I lower it to 10 on my desktop (8GB RAM) because the disk
swapping in the morning after nightly backup used to be a nightmare with
the default value, the system very much unresponsive for quite a long time
(at least it feels like before the first coffee *g*). And that's already on
a 10krpm VelociRaptor drive.

I wonder if ramzswap will help on my 8GB desktop, and want to test it.
(already running now)

BTW: shouldn't there be a compressed name also? Like zap or just zp ;-)


(Log in to post comments)

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds