All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bob Liu <bob.liu@oracle.com>
To: Martin Steigerwald <Martin@lichtvoll.de>
Cc: Seth Jennings <sjenning@linux.vnet.ibm.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 18:42:18 +0800	[thread overview]
Message-ID: <51E6750A.9060900@oracle.com> (raw)
In-Reply-To: <1674223.HVFdAhB7u5@merkaba>

Hi Martin,

On 07/17/2013 06:04 PM, Martin Steigerwald wrote:
> Hi Seth, hi everyone,
>
> Yesterday I build 3.11-rc1 with CONFIG_ZSWAP and wanted to test it.
>
> I added zswap.enabled=1 and get:
>
> martin@merkaba:~> dmesg | grep zswap
> [    0.000000] Command line: BOOT_IMAGE=/vmlinuz-3.11.0-rc1-tp520+
> root=/dev/mapper/merkaba-debian ro rootflags=subvol=root init=/bin/systemd
> cgroup_enable=memory threadirqs i915.i915_enable_rc6=7 zcache zswap.enabled=1
> [    0.000000] Kernel command line: BOOT_IMAGE=/vmlinuz-3.11.0-rc1-tp520+
> root=/dev/mapper/merkaba-debian ro rootflags=subvol=root init=/bin/systemd
> cgroup_enable=memory threadirqs i915.i915_enable_rc6=7 zcache zswap.enabled=1
> [    1.452443] zswap: loading zswap
> [    1.452465] zswap: using lzo compressor
>
>
> I did a stress -m 1 --vm-keep --vm-bytes 4G on this 8 GB ThinkPad T520 in
> order to allocate some swap.
>

Thank you for your testing.
I'm glad to see there is new people interested with memory compression.

> Still I think zswap didn't do anything:
>
> merkaba:/sys/kernel/debug/zswap> grep . *
> duplicate_entry:0
> pool_limit_hit:0
> pool_pages:0
> reject_alloc_fail:0
> reject_compress_poor:0
> reject_kmemcache_fail:0
> reject_reclaim_fail:0
> stored_pages:0
> written_back_pages:0
>
>
> However:
>
> merkaba:/sys/kernel/slab/zswap_entry> grep . *
> aliases:9
> align:8
> grep: alloc_calls: Die angeforderte Funktion ist nicht implementiert
> cache_dma:0
> cpu_partial:0
> cpu_slabs:4 N0=4
> destroy_by_rcu:0
> grep: free_calls: Die angeforderte Funktion ist nicht implementiert
> hwcache_align:0
> min_partial:5
> objects:2550 N0=2550
> object_size:48
> objects_partial:0
> objs_per_slab:85
> order:0
> partial:0
> poison:0
> reclaim_account:0
> red_zone:0
> remote_node_defrag_ratio:100
> reserved:0
> sanity_checks:0
> slabs:30 N0=30
> slabs_cpu_partial:0(0)
> slab_size:48
> store_user:0
> total_objects:2550 N0=2550
> trace:0
>
> It has some objects it seems.
>
>
> How do I know whether zswap actually does something?
>
> Will zswap work even with zcache enabled? As I understand zcache compresses
> swap device pages on the block device level in addition to compressing read
> cache pages of usual filesystems. Which one takes precedence, zcache or zswap?
> Can I disable zcache for swap device?
>

Please disable zcache and try again.

>
>
> Here is dmesg for zcache:
>
> martin@merkaba:~> dmesg | grep zcache
> [    0.000000] Command line: BOOT_IMAGE=/vmlinuz-3.11.0-rc1-tp520+
> root=/dev/mapper/merkaba-debian ro rootflags=subvol=root init=/bin/systemd
> cgroup_enable=memory threadirqs i915.i915_enable_rc6=7 zcache zswap.enabled=1
> [    0.000000] Kernel command line: BOOT_IMAGE=/vmlinuz-3.11.0-rc1-tp520+
> root=/dev/mapper/merkaba-debian ro rootflags=subvol=root init=/bin/systemd
> cgroup_enable=memory threadirqs i915.i915_enable_rc6=7 zcache zswap.enabled=1
> [    1.453531] zcache: using lzo compressor
> [    1.453634] zcache: cleancache enabled using kernel transcendent memory and
> compression buddies
> [    1.453679] zcache: frontswap enabled using kernel transcendent memory and
> compression buddies
> [    1.453722] zcache: frontswap_ops overridden
> [    5.358288] zcache: created ephemeral local tmem pool, id=0
> [    8.155684] zcache: created persistent local tmem pool, id=1
> [    8.331680] zcache: created ephemeral local tmem pool, id=2
> [    8.593235] zcache: created ephemeral local tmem pool, id=3
> [    8.743330] zcache: created ephemeral local tmem pool, id=4
>
>
> Thanks,
>

-- 
Regards,
-Bob

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

WARNING: multiple messages have this Message-ID (diff)
From: Bob Liu <bob.liu@oracle.com>
To: Martin Steigerwald <Martin@lichtvoll.de>
Cc: Seth Jennings <sjenning@linux.vnet.ibm.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 18:42:18 +0800	[thread overview]
Message-ID: <51E6750A.9060900@oracle.com> (raw)
In-Reply-To: <1674223.HVFdAhB7u5@merkaba>

Hi Martin,

On 07/17/2013 06:04 PM, Martin Steigerwald wrote:
> Hi Seth, hi everyone,
>
> Yesterday I build 3.11-rc1 with CONFIG_ZSWAP and wanted to test it.
>
> I added zswap.enabled=1 and get:
>
> martin@merkaba:~> dmesg | grep zswap
> [    0.000000] Command line: BOOT_IMAGE=/vmlinuz-3.11.0-rc1-tp520+
> root=/dev/mapper/merkaba-debian ro rootflags=subvol=root init=/bin/systemd
> cgroup_enable=memory threadirqs i915.i915_enable_rc6=7 zcache zswap.enabled=1
> [    0.000000] Kernel command line: BOOT_IMAGE=/vmlinuz-3.11.0-rc1-tp520+
> root=/dev/mapper/merkaba-debian ro rootflags=subvol=root init=/bin/systemd
> cgroup_enable=memory threadirqs i915.i915_enable_rc6=7 zcache zswap.enabled=1
> [    1.452443] zswap: loading zswap
> [    1.452465] zswap: using lzo compressor
>
>
> I did a stress -m 1 --vm-keep --vm-bytes 4G on this 8 GB ThinkPad T520 in
> order to allocate some swap.
>

Thank you for your testing.
I'm glad to see there is new people interested with memory compression.

> Still I think zswap didn´t do anything:
>
> merkaba:/sys/kernel/debug/zswap> grep . *
> duplicate_entry:0
> pool_limit_hit:0
> pool_pages:0
> reject_alloc_fail:0
> reject_compress_poor:0
> reject_kmemcache_fail:0
> reject_reclaim_fail:0
> stored_pages:0
> written_back_pages:0
>
>
> However:
>
> merkaba:/sys/kernel/slab/zswap_entry> grep . *
> aliases:9
> align:8
> grep: alloc_calls: Die angeforderte Funktion ist nicht implementiert
> cache_dma:0
> cpu_partial:0
> cpu_slabs:4 N0=4
> destroy_by_rcu:0
> grep: free_calls: Die angeforderte Funktion ist nicht implementiert
> hwcache_align:0
> min_partial:5
> objects:2550 N0=2550
> object_size:48
> objects_partial:0
> objs_per_slab:85
> order:0
> partial:0
> poison:0
> reclaim_account:0
> red_zone:0
> remote_node_defrag_ratio:100
> reserved:0
> sanity_checks:0
> slabs:30 N0=30
> slabs_cpu_partial:0(0)
> slab_size:48
> store_user:0
> total_objects:2550 N0=2550
> trace:0
>
> It has some objects it seems.
>
>
> How do I know whether zswap actually does something?
>
> Will zswap work even with zcache enabled? As I understand zcache compresses
> swap device pages on the block device level in addition to compressing read
> cache pages of usual filesystems. Which one takes precedence, zcache or zswap?
> Can I disable zcache for swap device?
>

Please disable zcache and try again.

>
>
> Here is dmesg for zcache:
>
> martin@merkaba:~> dmesg | grep zcache
> [    0.000000] Command line: BOOT_IMAGE=/vmlinuz-3.11.0-rc1-tp520+
> root=/dev/mapper/merkaba-debian ro rootflags=subvol=root init=/bin/systemd
> cgroup_enable=memory threadirqs i915.i915_enable_rc6=7 zcache zswap.enabled=1
> [    0.000000] Kernel command line: BOOT_IMAGE=/vmlinuz-3.11.0-rc1-tp520+
> root=/dev/mapper/merkaba-debian ro rootflags=subvol=root init=/bin/systemd
> cgroup_enable=memory threadirqs i915.i915_enable_rc6=7 zcache zswap.enabled=1
> [    1.453531] zcache: using lzo compressor
> [    1.453634] zcache: cleancache enabled using kernel transcendent memory and
> compression buddies
> [    1.453679] zcache: frontswap enabled using kernel transcendent memory and
> compression buddies
> [    1.453722] zcache: frontswap_ops overridden
> [    5.358288] zcache: created ephemeral local tmem pool, id=0
> [    8.155684] zcache: created persistent local tmem pool, id=1
> [    8.331680] zcache: created ephemeral local tmem pool, id=2
> [    8.593235] zcache: created ephemeral local tmem pool, id=3
> [    8.743330] zcache: created ephemeral local tmem pool, id=4
>
>
> Thanks,
>

-- 
Regards,
-Bob

  parent reply	other threads:[~2013-07-17 10:42 UTC|newest]

Thread overview: 13+ 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:04 ` Martin Steigerwald
2013-07-17 10:36 ` Wanpeng Li
2013-07-17 10:36 ` Wanpeng Li
2013-07-17 10:42 ` Bob Liu [this message]
2013-07-17 10:42   ` Bob Liu
2013-07-17 11:41   ` Martin Steigerwald
2013-07-17 11:41     ` Martin Steigerwald
     [not found]     ` <20130717143834.GA4379@variantweb.net>
2013-07-17 19:38       ` Martin Steigerwald
2013-07-17 19:38         ` Martin Steigerwald
2013-07-18 12:43         ` Bob Liu
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=51E6750A.9060900@oracle.com \
    --to=bob.liu@oracle.com \
    --cc=Martin@lichtvoll.de \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.