From: Avi Kivity <avi@redhat.com>
To: Sasha Levin <levinsasha928@gmail.com>
Cc: mtosatti@redhat.com, gregkh@linuxfoundation.org,
sjenning@linux.vnet.ibm.com, dan.magenheimer@oracle.com,
konrad.wilk@oracle.com, kvm@vger.kernel.org
Subject: Re: [RFC 00/10] KVM: Add TMEM host/guest support
Date: Wed, 06 Jun 2012 16:24:24 +0300 [thread overview]
Message-ID: <4FCF5A08.7080306@redhat.com> (raw)
In-Reply-To: <1338988073-6913-1-git-send-email-levinsasha928@gmail.com>
On 06/06/2012 04:07 PM, Sasha Levin wrote:
> This patch series adds support for passing TMEM commands between KVM guests
> and the host. This opens the possibility to use TMEM cross-guests and
> posibly across hosts with RAMster.
>
> Since frontswap was merged in the 3.4 cycle, the kernel now has all facilities
> required to work with TMEM. There is no longer a dependency on out of tree
> code.
>
> We can split this patch series into two:
>
> - The guest side, which is basically two shims that proxy mm/cleancache.c
> and mm/frontswap.c requests from the guest back to the host. This is done
> using a new KVM_HC_TMEM hypercall.
>
> - The host side, which is a rather small shim which connects KVM to zcache.
>
>
> It's worth noting that this patch series don't have any significant logic in
> it, and is mostly a collection of shims to pass TMEM commands across hypercalls.
>
> I ran benchmarks using both the "streaming test" proposed by Avi, and some
> general fio tests. Since the fio tests showed similar results to the
> streaming test, and no anomalies, here is the summary of the streaming tests:
>
> First, trying to stream a 26GB random file without KVM TMEM:
> real 7m36.046s
> user 0m17.113s
> sys 5m23.809s
>
> And with KVM TMEM:
> real 7m36.018s
> user 0m17.124s
> sys 5m28.391s
These results give about 47 usec per page system time (seems quite
high), whereas the difference is 0.7 user per page (seems quite low, for
1 or 2 syscalls per page). Can you post a snapshot of kvm_stat while
this is running?
>
> - No significant difference.
>
> Now, trying to stream a 16gb file that compresses nicely, first without KVM TMEM:
> real 5m10.299s
> user 0m11.311s
> sys 3m40.139s
>
> And a second run without dropping cache:
> real 4m33.951s
> user 0m10.869s
> sys 3m13.789s
>
> Now, with KVM TMEM:
> real 4m55.528s
> user 0m11.119s
> sys 3m33.243s
How is the first run faster? Is it not doing extra work, pushing pages
to the host?
>
> And a second run:
> real 2m53.713s
> user 0m7.971s
> sys 2m29.807s
A nice result, yes.
>
> So KVM TMEM shows a nice performance increase once it can store pages on the host.
How was caching set up? cache=none (in qemu terms) is most
representative, but cache=writeback also allows the host to cache guest
pages, while cache=writeback with cleancache enabled in the host should
give the same effect, but with the extra hypercalls, but with an extra
copy to manage the host pagecache. It would be good to see results for
all three settings.
--
error compiling committee.c: too many arguments to function
next prev parent reply other threads:[~2012-06-06 13:24 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-06 13:07 [RFC 00/10] KVM: Add TMEM host/guest support Sasha Levin
2012-06-06 13:24 ` Avi Kivity [this message]
2012-06-08 13:20 ` Sasha Levin
2012-06-08 16:06 ` Dan Magenheimer
2012-06-11 11:17 ` Avi Kivity
2012-06-11 8:09 ` Avi Kivity
2012-06-11 10:26 ` Sasha Levin
2012-06-11 11:45 ` Avi Kivity
2012-06-11 15:44 ` Dan Magenheimer
2012-06-11 17:06 ` Avi Kivity
2012-06-11 19:25 ` Sasha Levin
2012-06-11 19:56 ` Sasha Levin
2012-06-12 11:46 ` Avi Kivity
2012-06-12 11:58 ` Gleb Natapov
2012-06-12 12:01 ` Avi Kivity
2012-06-12 10:12 ` Avi Kivity
2012-06-12 1:18 ` Dan Magenheimer
2012-06-12 10:09 ` Avi Kivity
2012-06-12 16:40 ` Dan Magenheimer
2012-06-12 17:54 ` Avi Kivity
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=4FCF5A08.7080306@redhat.com \
--to=avi@redhat.com \
--cc=dan.magenheimer@oracle.com \
--cc=gregkh@linuxfoundation.org \
--cc=konrad.wilk@oracle.com \
--cc=kvm@vger.kernel.org \
--cc=levinsasha928@gmail.com \
--cc=mtosatti@redhat.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