LWN.net Logo

Compcache: in-memory compressed swapping

Compcache: in-memory compressed swapping

Posted May 26, 2009 20:29 UTC (Tue) by BrucePerens (guest, #2510)
In reply to: Compcache: in-memory compressed swapping by JoeF
Parent article: Compcache: in-memory compressed swapping

For hibernate, the ram-based swap of course should be bypassed.
It's worse than that. Memory belonging to the ram-based swap medium would be marked as not itself swappable. Otherwise, you would get in a loop. So, it has to back itself up to its private backing store device before hibernating, and restore itself before the OS is allowed to resume. It can't just stand by and passively allow another swap device to take care of its pages.


(Log in to post comments)

Compcache: in-memory compressed swapping

Posted May 27, 2009 1:44 UTC (Wed) by nitingupta (subscriber, #53817) [Link]

Yes, true. Currently, swapping compressed memory to private swap disk is under development. It can be made hibernation aware once this is done.

Compcache: in-memory compressed swapping

Posted May 27, 2009 6:17 UTC (Wed) by avik (guest, #704) [Link]

swapoff /dev/ramzswap

Should allow hibernation.

Compcache: in-memory compressed swapping

Posted May 27, 2009 13:41 UTC (Wed) by JoeF (subscriber, #4486) [Link]

Yup. That's what I do right now.

Could compcache improve restore after STD responsiveness?

Posted May 27, 2009 6:50 UTC (Wed) by rvfh (subscriber, #31018) [Link]

Interestingly, storing compressed memory to swap to hibernate reminds me a lot of TuxOnIce (and maybe now uswsusp, but that needs user space magic), which could save much more than the default swsup thanks to compression...

Could ramzswap help have a more responsive system after restore too? Maybe with a little tweaking?

Could compcache improve restore after STD responsiveness?

Posted Apr 15, 2010 10:13 UTC (Thu) by dgm (subscriber, #49227) [Link]

Also, apparently compression would add vert little overhead to the swap-to-disk case, allowing for faster i/o and better use of swap space.

Maybe it should be considered to add this feature to the generic swap code?

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