LWN.net Logo

zcache: a compressed page cache

zcache: a compressed page cache

Posted Jul 31, 2010 3:00 UTC (Sat) by jzbiciak (✭ supporter ✭, #5246)
In reply to: zcache: a compressed page cache by joern
Parent article: zcache: a compressed page cache

The tradeoff with swap is that it can delay (and maybe completely avoid) hitting the disk at all. There are plenty of workloads that compression can make fit in RAM, whereas without compression, it can hit the disk a fair bit.

If you take hitting the disk as a given, as is the case with a compressed filesystem with compressed files, then the tradeoffs get much more complex. This is especially true whenyou consider that most files are small relative to disk block sizes.

But with VM, it's about dirty anonymous pages (heap and such). The only reason to push these to disk is that you're trying to use more RAM than is available. Disk acts as RAM overflow. If compression can push the "swap to disk" threshold out, then it is a clearer win.


(Log in to post comments)

zcache: a compressed page cache

Posted Jul 31, 2010 6:42 UTC (Sat) by saffroy (subscriber, #43999) [Link]

"There are plenty of workloads that compression can make fit in RAM"

Interesting. Got more details or pointers about this?

zcache: a compressed page cache

Posted Jul 31, 2010 14:34 UTC (Sat) by jzbiciak (✭ supporter ✭, #5246) [Link]

Here's an older one about compcache: https://code.google.com/p/compcache/wiki/Performance/LTSP...

That at least illustrates the principle that compression can keep you from hitting the disk and also increase the size of workload a machine can handles effectively.

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