Gentoo Archives: gentoo-user

From: Pandu Poluan <pandu@××××××.info>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] zram / compcache, anyone?
Date: Fri, 14 Oct 2011 01:12:22
Message-Id: CAA2qdGWaceo8G9gZ+d2C9jCCZ9zOcXg0SURmaCNuZEG0-hMA2A@mail.gmail.com
In Reply to: Re: [gentoo-user] zram / compcache, anyone? by Florian Philipp
1 On Oct 13, 2011 8:32 PM, "Florian Philipp" <lists@×××××××××××.net> wrote:
2 >
3 > Am 13.10.2011 03:52, schrieb Pandu Poluan:
4 > > Just stumbled upon this blog:
5 > >
6 > > http://www.webupd8.org/2011/10/increased-performance-in-linux-with.html
7 > >
8 > > anyone got any experience with zram/compcache on Gentoo?
9 > >
10 > > Rgds,
11 > >
12 >
13 > Hmm, it seems like my reply was eaten by the mail server. Apologies if
14 > you receive this twice:
15 >
16
17 In addition to "the dog ate my homework", now we have a new excuse, "the
18 server are my document" :-D
19
20 Ah, progress ;-)
21
22 > I use it on my laptop (4GB RAM, typically 1-2GB swap used). It
23 > works pretty well but I can't give you any hard figures.
24 >
25 > I wrote my own init script for this. I can share it if you want.
26 > Otherwise the sunrise, betagarden and mv overlays offer ebuilds for it.
27 > I think the mv version is closest to mine.
28 >
29
30 What makes the proliferation of ebuilds?
31
32 > What has been pretty confusing is that there are two versions: The
33 > original one from Google(?) and the one in the mainline kernel. They
34 > have different APIs (hint: if you have a userland tool instead of
35 > manipulating /sys, it is the original version) and only the original
36 > version can use a swap device as an additional backend for
37 > uncompressable pages. With the mainline version (which I use), you can
38 > only use zram as an additional swap device and give it a higher priority
39 > than your normal swap.
40 >
41
42 In the kernel? What .config knob should I twiddle?
43
44 I do prefer having zram support in the kernel.
45
46 > /etc/fstab:
47 > /dev/zram0 none swap sw,pri=1,discard 0 0
48 > /dev/sda7 none swap sw,pri=0 0 0
49 >
50 > Only drawback so far: When zram is full, putting the laptop into standby
51 > takes longer, maybe 15s compared to 3s without. Sometimes this can lead
52 > to timeouts and the kernel aborts the suspend operation with an error on
53 > dmesg. Reattempting it then succeeds.
54 >
55
56 Point taken. Do you think it's worth the slight annoyance?
57
58 Rgds,

Replies

Subject Author
Re: [gentoo-user] zram / compcache, anyone? Adam Carter <adamcarter3@×××××.com>
Re: [gentoo-user] zram / compcache, anyone? Florian Philipp <lists@×××××××××××.net>