From: Dan Magenheimer <dan.magenheimer@oracle.com>
To: Seth Jennings <sjenning@linux.vnet.ibm.com>
Cc: gregkh@suse.de, devel@driverdev.osuosl.org, ngupta@vflare.org,
cascardo@holoscopio.com, rdunlap@xenotime.net,
linux-kernel@vger.kernel.org
Subject: RE: [PATCH 0/3] staging: zcache: xcfmalloc support
Date: Thu, 1 Sep 2011 08:17:48 -0700 (PDT) [thread overview]
Message-ID: <36dad993-ea60-43f4-89f0-77831befd483@default> (raw)
In-Reply-To: <4E5EB066.6020007@linux.vnet.ibm.com>
> > Do you have any data comparing xcfmalloc vs xvmalloc for
> > compression ratio and/or performance (cycles to compress
> > or decompress different pages) on a wide(r) range of data?
> > Assuming xcfmalloc isn't "always better", maybe it would
> > be best to allow the algorithm to be selectable? (And
> > then we would also need to decide the default.)
> >
>
> I can get you some results comparing the two tomorrow.
>
> You have to make the distinction between the
> "compression ratio" and the "effective compression".
> The compression ratio is the same since the compression
> algorithm, LZO, was changed. The effective compression,
changed -> NOT changed, correct? LZO is used in both?
I had forgotten that, so the only issue might be the
overhead.
> the ratio of stored compressed pages to allocator pool
> pages, is different between the two, especially for
> allocation sets > PAGE_SIZE/2.
> What the numbers will tell you is that for allocations sets
> < PAGE_SIZE/2 xcfmalloc is a little worse (~2% greater
> overhead). But for allocation sets > PAGE_SIZE/2,
> xcfmalloc has up to a 50% advantage over xvmalloc.
>
> As far as performance numbers, all I can see is that
> the throughput is the same between the two. I'm not
> sure how to get, for example, and cycles delta
> between the two.
IIRC, xvmalloc has O(1) overhead regardless of the number
of chunks of data stored. Some algorithms are O(N) or
even O(N**2), i.e. might walk a potentially increasingly
very long list of allocations/descriptors
to find a slot, which would not be acceptable for
zcache as, for a large data set, the overhead might
be much worse than the cycles-to-compress. Which is
xcfmalloc, O(1) or O(N) or O(N**2)?
(Also, since I think interrupts are still disabled,
reading the tsc before/after should be safe to
get the cycles delta.)
> I would be difficult to make it selectable because the
> function signatures (and some concepts) aren't the same.
> You can see the changes that were required in the patch
> 2/3.
Then I definitely would like to see some review
and discussion from Nitin. Clearly xcfmalloc is better
for poorly-compressible data; I would like to be confident
that it is not "worse" for another large common set of
data.
An even better implementation could be if both are
active and the selection is made at runtime depending
on the compressibility of the data, i.e. poorly-compressible
data gets stored in xcfmalloc and other data in xvmalloc?
Probably not worth the effort, but food for thought.
Thanks,
Dan
next prev parent reply other threads:[~2011-09-01 15:18 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-31 14:40 [PATCH 0/3] staging: zcache: xcfmalloc support Seth Jennings
2011-08-31 14:40 ` [PATCH 1/3] staging: zcache: xcfmalloc memory allocator for zcache Seth Jennings
2011-09-01 15:43 ` Seth Jennings
2011-09-06 23:51 ` Greg KH
2011-08-31 14:40 ` [PATCH 2/3] staging: zcache: replace xvmalloc with xcfmalloc Seth Jennings
2011-08-31 14:40 ` [PATCH 3/3] staging: zcache: add zv_page_count and zv_desc_count Seth Jennings
2011-08-31 19:46 ` [PATCH 0/3] staging: zcache: xcfmalloc support Dan Magenheimer
2011-08-31 22:06 ` Seth Jennings
2011-09-01 15:17 ` Dan Magenheimer [this message]
2011-09-01 16:33 ` Seth Jennings
2011-09-01 16:54 ` Dave Hansen
2011-09-01 22:01 ` Seth Jennings
2011-09-01 23:44 ` Dave Hansen
2011-09-01 22:42 ` Seth Jennings
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=36dad993-ea60-43f4-89f0-77831befd483@default \
--to=dan.magenheimer@oracle.com \
--cc=cascardo@holoscopio.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=ngupta@vflare.org \
--cc=rdunlap@xenotime.net \
--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