From: Dan Magenheimer <dan.magenheimer@oracle.com>
To: minchan@kernel.org, sjenning@linux.vnet.ibm.com,
Nitin Gupta <nitingupta910@gmail.com>
Cc: Konrad Wilk <konrad.wilk@oracle.com>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
Bob Liu <lliubbo@gmail.com>,
Luigi Semenzato <semenzato@google.com>,
Mel Gorman <mgorman@suse.de>
Subject: RE: zsmalloc limitations and related topics
Date: Thu, 28 Feb 2013 14:00:36 -0800 (PST) [thread overview]
Message-ID: <0621544c-dbb7-44ff-bfd0-ee623439bd9d@default> (raw)
In-Reply-To: <0efe9610-1aa5-4aa9-bde9-227acfa969ca@default>
> From: Dan Magenheimer
> Subject: zsmalloc limitations and related topics
>
> WORKLOAD ANALYSIS
> :
> 1) The average page compressed by almost a factor of six
> (mean zsize == 694, stddev == 474)
> 2) Almost eleven percent of the pages were zero pages. A
> zero page compresses to 28 bytes.
> 3) On average, 77% of the bytes (3156) in the pages-to-be-
> compressed contained a byte-value of zero.
> 4) Despite the above, mean density of zsmalloc was measured at
> 3.2 zpages/pageframe, presumably losing nearly half of
> available space to fragmentation.
>
> I have no clue if these measurements are representative
> of a wide range of workloads over the lifetime of a booted
> machine, but I am suspicious that they are not. For example,
> the lzo1x compression algorithm claims to compress data by
> about a factor of two.
I realized that with a small hack in zswap, I could simulate the
effect on zsmalloc of a workload with very different zsize
distribution, one with a much higher mean, by simply doubling
(and tripling) the zsize passed to zs_malloc. The results:
Unchanged: mean=694 stddev=474 -> mean density = 3.2
Doubled: mean=1340 stddev=842 -> mean density = 1.9
Tripled: mean=1636 stddev=1031 -> mean density = 1.6
Note that even tripled, the mean of the simulated
distribution is still much lower than PAGE_SIZE/2,
which is roughly the published expected compression for
lzo1x. So one would still expect a mean density greater
than two but, apparently, one-third of available space is
lost to fragmentation.
Without a "representative" workload, I still have no clue
as to whether this simulated distribution is relevant,
but it is interesting to note that, for a workload with
lower mean compressibility, zsmalloc's reputation as
"high density" may be undeserved.
--
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>
next prev parent reply other threads:[~2013-02-28 22:00 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-27 23:24 zsmalloc limitations and related topics Dan Magenheimer
2013-02-28 22:00 ` Dan Magenheimer [this message]
2013-03-01 1:40 ` Ric Mason
2013-03-04 18:29 ` Dan Magenheimer
2013-03-13 15:14 ` Robert Jennings
2013-03-13 15:33 ` Seth Jennings
2013-03-13 15:56 ` Seth Jennings
2013-03-13 20:02 ` Dan Magenheimer
2013-03-13 22:59 ` Seth Jennings
2013-03-14 12:02 ` Bob
2013-03-14 13:20 ` Robert Jennings
2013-03-14 18:54 ` Dan Magenheimer
2013-03-15 16:14 ` Seth Jennings
2013-03-15 16:54 ` Dan Magenheimer
2013-03-15 16:18 ` Seth Jennings
2013-03-14 17:39 ` Dan Magenheimer
2013-03-14 19:16 ` Dan Magenheimer
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=0621544c-dbb7-44ff-bfd0-ee623439bd9d@default \
--to=dan.magenheimer@oracle.com \
--cc=konrad.wilk@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lliubbo@gmail.com \
--cc=mgorman@suse.de \
--cc=minchan@kernel.org \
--cc=nitingupta910@gmail.com \
--cc=semenzato@google.com \
--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).