Gentoo Archives: gentoo-user

From: Florian Philipp <lists@×××××××××××.net>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] zram / compcache, anyone?
Date: Thu, 13 Oct 2011 13:30:24
Message-Id: 4E96E779.4070006@binarywings.net
In Reply to: [gentoo-user] zram / compcache, anyone? by Pandu Poluan
1 Am 13.10.2011 03:52, schrieb Pandu Poluan:
2 > Just stumbled upon this blog:
3 >
4 > http://www.webupd8.org/2011/10/increased-performance-in-linux-with.html
5 >
6 > anyone got any experience with zram/compcache on Gentoo?
7 >
8 > Rgds,
9 >
10
11 Hmm, it seems like my reply was eaten by the mail server. Apologies if
12 you receive this twice:
13
14 I use it on my laptop (4GB RAM, typically 1-2GB swap used). It
15 works pretty well but I can't give you any hard figures.
16
17 I wrote my own init script for this. I can share it if you want.
18 Otherwise the sunrise, betagarden and mv overlays offer ebuilds for it.
19 I think the mv version is closest to mine.
20
21 What has been pretty confusing is that there are two versions: The
22 original one from Google(?) and the one in the mainline kernel. They
23 have different APIs (hint: if you have a userland tool instead of
24 manipulating /sys, it is the original version) and only the original
25 version can use a swap device as an additional backend for
26 uncompressable pages. With the mainline version (which I use), you can
27 only use zram as an additional swap device and give it a higher priority
28 than your normal swap.
29
30 /etc/fstab:
31 /dev/zram0 none swap sw,pri=1,discard 0 0
32 /dev/sda7 none swap sw,pri=0 0 0
33
34 Only drawback so far: When zram is full, putting the laptop into standby
35 takes longer, maybe 15s compared to 3s without. Sometimes this can lead
36 to timeouts and the kernel aborts the suspend operation with an error on
37 dmesg. Reattempting it then succeeds.
38
39 Regards,
40 Florian Philipp

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies

Subject Author
Re: [gentoo-user] zram / compcache, anyone? Pandu Poluan <pandu@××××××.info>