LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Kernel (https://www.linuxquestions.org/questions/linux-kernel-70/)
-   -   zcache behavior when swapping to disk (https://www.linuxquestions.org/questions/linux-kernel-70/zcache-behavior-when-swapping-to-disk-4175428571/)

lucatrv 09-22-2012 03:31 PM

zcache behavior when swapping to disk
 
I know in general how zcache works using cleancache and frontswap frontends. However I would like to ask how zcache behaves when actually swapping to the physical hard drive (for instance because memory is full). Is it saving compressed pages to disk or are pages that need to be written to disk uncompressed first?
In general, as hard drives are slow, even without zcache I would imagine that compressing everything with a fast algorithm such as LZO would be faster than just writing uncompressed data. However if zcache is used we have the additional advantage that compression comes "for free" upstream. Pages previously stored into memory are already compressed, but even pages that are not actually stored into memory because they do not shrink by half were pre-processed by zcache, so it would make sense to save all pages to disk compressed.
Thanks.

H_TeXMeX_H 09-24-2012 01:38 AM

From my understanding of zcache it only stores compressed pages in RAM, NOT on disk. It uncompresses them before writing to disk. I would use it if it were stable.


All times are GMT -5. The time now is 02:48 PM.