RE: [PATCH] zsmalloc: Add Kconfig for enabling PTE method

From: Dan Magenheimer
Date: Mon Feb 18 2013 - 18:49:18 EST

> From: Seth Jennings [mailto:sjenning@xxxxxxxxxxxxxxxxxx]
> Subject: Re: [PATCH] zsmalloc: Add Kconfig for enabling PTE method
> On 02/16/2013 12:28 AM, Ric Mason wrote:
> > On 02/04/2013 08:23 AM, Minchan Kim wrote:
> >> + for object mapping. You can check speed with zsmalloc
> >> benchmark[1].
> >> + [1]
> >
> > Is there benchmark to test zcache? eg. internal fragmentation level ...
> First, zsmalloc is not used in zcache right now so just wanted to say
> that. It is used in zram and the proposed zswap
> (
> There is not an official benchmark. However anything that generates
> activity that will hit the frontswap or cleancache hooks will do.
> These are workloads that overcommit memory and use swap, or access
> file sets whose size is larger that the system page cache.

I think it's important to note that the question "is there
a benchmark" is a very deep and difficult question for any
compression solution because it is so workload-dependent.
Unlike many benchmarks that simply synthesize a _quantity_
of data, zcache/zswap/zram all are very sensitive to the
actual contents of that data as the compression ratio
varies widely depending on the data. So we need to ensure
that the data used by any benchmark has similar "entropy"
to real world workloads. I'm not sure how we can do that.

So it may or may not be useful to measure zcache/zswap/zram using
standard benchmarks (including things like SPECjbb). At least
kernbench is something that kernel developers do every day,
so it is definitely a real world workload... but adding
parallel compiles (via "make -jN") until the system thrashes,
and then showing zcache/zswap/zram reduces the thrashing may
not be at all representative of a broad range of workloads
that cause memory pressure... kernbench is just convenient for
us developers to demonstrate that the mechanism works.

Ideas welcome... well-thought out ideas anyway!


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at