qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: "Li, Liang Z" <liang.z.li@intel.com>
Cc: "rkagan@virtuozzo.com" <rkagan@virtuozzo.com>,
	"linux-kernel@vger.kenel.org" <linux-kernel@vger.kenel.org>,
	"ehabkost@redhat.com" <ehabkost@redhat.com>,
	"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
	"quintela@redhat.com" <quintela@redhat.com>,
	"simhan@hpe.com" <simhan@hpe.com>,
	"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
	"dgilbert@redhat.com" <dgilbert@redhat.com>,
	"jitendra.kolhe@hpe.com" <jitendra.kolhe@hpe.com>,
	"mohan_parthasarathy@hpe.com" <mohan_parthasarathy@hpe.com>,
	"amit.shah@redhat.com" <amit.shah@redhat.com>,
	"pbonzini@redhat.com" <pbonzini@redhat.com>,
	"rth@twiddle.net" <rth@twiddle.net>
Subject: Re: [Qemu-devel] [RFC Design Doc]Speed up live migration by skipping free pages
Date: Thu, 24 Mar 2016 11:48:46 +0200	[thread overview]
Message-ID: <20160324094846.GA17006@redhat.com> (raw)
In-Reply-To: <F2CBF3009FA73547804AE4C663CAB28E0415B056@shsmsx102.ccr.corp.intel.com>

On Thu, Mar 24, 2016 at 01:19:40AM +0000, Li, Liang Z wrote:
> > > > > 2. Why not use virtio-balloon
> > > > > Actually, the virtio-balloon can do the similar thing by inflating
> > > > > the balloon before live migration, but its performance is no good,
> > > > > for an 8GB idle guest just boots, it takes about 5.7 Sec to
> > > > > inflate the balloon to 7GB, but it only takes 25ms to get a valid
> > > > > free page bitmap from the guest.  There are some of reasons for
> > > > > the bad performance of
> > > > > vitio-balloon:
> > > > > a. allocating pages (5%, 304ms)
> > > >
> > > > Interesting. This is definitely worth improving in guest kernel.
> > > > Also, will it be faster if we allocate and pass to guest huge pages instead?
> > > > Might speed up madvise as well.
> > >
> > > Maybe.
> > >
> > > > > b. sending PFNs to host (71%, 4194ms)
> > > >
> > > > OK, so we probably should teach balloon to pass huge lists in bitmaps.
> > > > Will be benefitial for regular balloon operation, as well.
> > > >
> > >
> > > Agree. Current balloon just send 256 PFNs a time, that's too few and
> > > lead to too many times of virtio transmission, that's the main reason for the
> > bad performance.
> > > Change the VIRTIO_BALLOON_ARRAY_PFNS_MAX to a large value can
> > improve
> > > the performance significant. Maybe we should increase it before doing
> > > the further optimization, do you think so ?
> > 
> > We could push it up a bit higher: 256 is 1kbyte in size, so we can make it 3x
> > bigger and still fit struct virtio_balloon is a single page. But if we are going to
> > add the bitmap variant anyway, we probably shouldn't bother.
> > 
> > > > > c. address translation and madvise() operation (24%, 1423ms)
> > > >
> > > > How is this split between translation and madvise?  I suspect it's
> > > > mostly madvise since you need translation when using bitmap as well.
> > > > Correct? Could you measure this please?  Also, what if we use the
> > > > new MADV_FREE instead?  By how much would this help?
> > > >
> > > For the current balloon, address translation is needed.
> > > But for live migration, there is no need to do address translation.
> > 
> > Well you need ram address in order to clear the dirty bit.
> > How would you get it without translation?
> > 
> 
> If you means that kind of address translation, yes, it need.
> What I want to say is, filter out the free page can be done by bitmap operation.
> 
> Liang

OK so I see that your patches use block->offset in struct RAMBlock
to look up bits in guest-supplied bitmap.
I don't think that's guaranteed to work.

-- 
MST

  reply	other threads:[~2016-03-24  9:49 UTC|newest]

Thread overview: 56+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-22  7:43 [Qemu-devel] [RFC Design Doc]Speed up live migration by skipping free pages Liang Li
2016-03-22 10:11 ` Michael S. Tsirkin
2016-03-23  6:05   ` Li, Liang Z
2016-03-23 14:08     ` Michael S. Tsirkin
2016-03-24  1:19       ` Li, Liang Z
2016-03-24  9:48         ` Michael S. Tsirkin [this message]
2016-03-24 10:16           ` Li, Liang Z
2016-03-24 10:29             ` Michael S. Tsirkin
2016-03-24 14:33               ` Li, Liang Z
2016-03-24 14:44                 ` Michael S. Tsirkin
2016-03-24 15:16                   ` Li, Liang Z
2016-03-24 15:18                     ` Paolo Bonzini
2016-03-24 15:25                       ` Li, Liang Z
2016-03-24 15:27                     ` Michael S. Tsirkin
2016-03-24 15:39                       ` Li, Liang Z
2016-03-24 15:47                         ` Paolo Bonzini
2016-03-24 15:59                           ` Li, Liang Z
2016-03-22 19:05 ` Dr. David Alan Gilbert
2016-03-23  6:48   ` Li, Liang Z
2016-03-24  1:24     ` Wei Yang
2016-03-24  9:00       ` Dr. David Alan Gilbert
2016-03-24 10:09         ` Li, Liang Z
2016-03-24 10:23           ` Dr. David Alan Gilbert
2016-03-24 14:50             ` Li, Liang Z
2016-03-24 15:11               ` Michael S. Tsirkin
2016-03-24 15:53                 ` Li, Liang Z
2016-03-24 15:56                   ` Michael S. Tsirkin
2016-03-24 16:05                     ` Li, Liang Z
2016-03-24 16:25                       ` Michael S. Tsirkin
2016-03-24 17:49                         ` Dr. David Alan Gilbert
2016-03-24 22:16                           ` Michael S. Tsirkin
2016-03-25  1:59                             ` Li, Liang Z
2016-03-25  1:32                           ` Li, Liang Z
2016-04-18 11:08                           ` Li, Liang Z
2016-04-18 11:29                             ` Michael S. Tsirkin
2016-04-18 14:36                               ` Li, Liang Z
2016-04-18 15:38                                 ` Michael S. Tsirkin
2016-04-19  2:20                                   ` Li, Liang Z
2016-04-19 19:12                               ` Dr. David Alan Gilbert
2016-04-25 10:56                                 ` Michael S. Tsirkin
2016-04-19 19:05                             ` Dr. David Alan Gilbert
2016-04-20  3:22                               ` Li, Liang Z
2016-04-20  8:10                                 ` Dr. David Alan Gilbert
2016-03-25  1:32                         ` Li, Liang Z
2016-04-01 10:54   ` Amit Shah
2016-04-05  1:49     ` Li, Liang Z
2016-03-23  1:37 ` Wei Yang
2016-03-23  7:18   ` Li, Liang Z
2016-03-23  9:46     ` Wei Yang
2016-03-23 14:35       ` Li, Liang Z
2016-03-24  0:52         ` Wei Yang
2016-03-24  1:32           ` Li, Liang Z
2016-03-24  1:56             ` Wei Yang
2016-03-23 16:53     ` Eric Blake
2016-03-23 21:41       ` Wei Yang
2016-03-24  1:23       ` Li, Liang Z

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=20160324094846.GA17006@redhat.com \
    --to=mst@redhat.com \
    --cc=amit.shah@redhat.com \
    --cc=dgilbert@redhat.com \
    --cc=ehabkost@redhat.com \
    --cc=jitendra.kolhe@hpe.com \
    --cc=kvm@vger.kernel.org \
    --cc=liang.z.li@intel.com \
    --cc=linux-kernel@vger.kenel.org \
    --cc=mohan_parthasarathy@hpe.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    --cc=rkagan@virtuozzo.com \
    --cc=rth@twiddle.net \
    --cc=simhan@hpe.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).