public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: Florian Philipp <lists@binarywings.net>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] zram / compcache, anyone?
Date: Thu, 13 Oct 2011 08:58:25 +0200	[thread overview]
Message-ID: <4E968C11.9070206@binarywings.net> (raw)
In-Reply-To: <CAA2qdGWb1fhF2ENnNbipQKU08tPj3gwkmqD46C+-z+REX9u7dw@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1443 bytes --]

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 #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 262 bytes --]

  reply	other threads:[~2011-10-13  6:59 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-13  1:52 [gentoo-user] zram / compcache, anyone? Pandu Poluan
2011-10-13  6:58 ` Florian Philipp [this message]
2011-10-13 13:28 ` Florian Philipp
2011-10-14  1:10   ` Pandu Poluan
2011-10-14  1:29     ` Adam Carter
2011-10-14  1:33       ` Adam Carter
2011-10-14  1:39         ` Pandu Poluan
2011-10-14 15:30         ` Florian Philipp
2011-10-19 22:48     ` Florian Philipp
2011-10-18  5:16 ` Paul Hartman
2011-10-18  5:53   ` Florian Philipp
2011-10-19  0:30     ` Paul Hartman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4E968C11.9070206@binarywings.net \
    --to=lists@binarywings.net \
    --cc=gentoo-user@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox