Am 13.10.2011 03:52, schrieb Pandu Poluan:
> Just stumbled upon this blog:
> 
> http://www.webupd8.org/2011/10/increased-performance-in-linux-with.html
> 
> anyone got any experience with zram/compcache on Gentoo?
> 
> Rgds,
> 

Yes, I use it on my laptop (4GB RAM, typically 1-2GB swap used). It
works pretty well but I can't give you any hard figures.

I wrote my own init script for this. I can share it if you want.
Otherwise the sunrise, betagarden and mv overlays offer ebuilds for it.
I think the mv version is closest to mine.

What has been pretty confusing is that there are two versions: The
original one from Google(?) and the one in the mainline kernel. They
have different APIs (hint: if you have a userland tool instead of
manipulating /sys, it is the original version) and only the original
version can use a swap device as an additional backend for
uncompressable pages. With the mainline version (which I use), you can
only use zram as an additional swap device and give it a higher priority
than your normal swap.

/etc/fstab:
/dev/zram0 none swap sw,pri=1,discard 0 0
/dev/sda7 none swap sw,pri=0 0 0

Only drawback so far: When zram is full, putting the laptop into standby
takes longer, maybe 15s compared to 3s without. Sometimes this can lead
to timeouts and the kernel aborts the suspend operation with an error on
dmesg. Reattempting it then succeeds.

Regards,
Florian Philipp

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to