linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Martin Steigerwald <Martin@lichtvoll.de>
To: Seth Jennings <sjenning@linux.vnet.ibm.com>
Cc: Bob Liu <bob.liu@oracle.com>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: zswap: How to determine whether it is compressing swap pages?
Date: Wed, 17 Jul 2013 21:38:12 +0200	[thread overview]
Message-ID: <3125575.Ki4S75m1kx@merkaba> (raw)
In-Reply-To: <20130717143834.GA4379@variantweb.net>

Am Mittwoch, 17. Juli 2013, 09:38:34 schrieb Seth Jennings:
> On Wed, Jul 17, 2013 at 01:41:44PM +0200, Martin Steigerwald wrote:
> > Is there any way to run zcache concurrently with zswap? I.e. use zcache only
> > for read caches for filesystem and zswap for swap?
> 
> No, at least not with zcache's frontswap features enabled.  frontswap is a very
> simple API that allows only one "backend" to register with it at a time.  So
> that means _either_ zswap or zcache.
> 
> The only way they can be used in a meaningful way together is to use the
> "nofrontswap" zcache option in the kernel boot parameters to prevent
> zcache overriding zswap's frontswap registration.
> 
> But the general answer is no, they shouldn't be used together.
>
> 
> > 
> > What is better suited for swap? zswap or zcache?
> 
> zswap targets the specific case of caching swapped out pages in a compressed
> cache and this is much simpler than zcache. zswap is also in mainline as of
> 3.11-rc1.

Thanks.

Okay, then I will test zswap for now. I have a nice use case for it: Playing
PlaneShift while a full KDE session is open with 8 GB of RAM. The PlaneShift
client easily takes 2 GB RSS and to complicate matters I think there is even
a mem leak either in Intel Mesa driver or in PS client. zswap may not help
much with that I think. This brought down my laptop several times with a
storm to swap which locked the machine - no mouse movements possible -
for minutes while using the SSD like wild (LED constantly lid).

Currently I see zswap did some work:

merkaba:/sys/kernel/debug/zswap> grep . *                  
duplicate_entry:0
pool_limit_hit:0
pool_pages:14565
reject_alloc_fail:0
reject_compress_poor:1905
reject_kmemcache_fail:0
reject_reclaim_fail:0
stored_pages:29092
written_back_pages:0

About a hour later:

merkaba:/sys/kernel/debug/zswap> grep . *                
duplicate_entry:0
pool_limit_hit:0
pool_pages:18924
reject_alloc_fail:0
reject_compress_poor:1907
reject_kmemcache_fail:0
reject_reclaim_fail:0
stored_pages:37820
written_back_pages:0

> zcache, a driver in the staging tree, is much more complex offers some other
> functionality like compressed page/file cache for certain filesystems using
> cleancache and a remote-RAM system called RAMster.

I´d be interested in the cleancache stuff, but I wonder whether it would make
much of a difference with a desktop workload.

Anyway, for a while I focus on testing zswap.

-- 
Martin 'Helios' Steigerwald - http://www.Lichtvoll.de
GPG: 03B0 0D6C 0040 0710 4AFA  B82F 991B EAAC A599 84C7

  parent reply	other threads:[~2013-07-17 19:38 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-17 10:04 zswap: How to determine whether it is compressing swap pages? Martin Steigerwald
2013-07-17 10:42 ` Bob Liu
2013-07-17 11:41   ` Martin Steigerwald
     [not found]     ` <20130717143834.GA4379@variantweb.net>
2013-07-17 19:38       ` Martin Steigerwald [this message]
2013-07-18 12:43         ` Bob Liu
2013-07-18 17:36           ` Valdis.Kletnieks

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=3125575.Ki4S75m1kx@merkaba \
    --to=martin@lichtvoll.de \
    --cc=bob.liu@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=sjenning@linux.vnet.ibm.com \
    /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;
as well as URLs for NNTP newsgroup(s).