qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Daniel P. Berrangé" <berrange@redhat.com>
To: "Wang, Lei" <lei4.wang@intel.com>
Cc: Peter Xu <peterx@redhat.com>,
	qemu-devel@nongnu.org, Zhiyi Guo <zhguo@redhat.com>,
	Markus Armbruster <armbru@redhat.com>,
	Leonardo Bras Soares Passos <lsoaresp@redhat.com>,
	Fabiano Rosas <farosas@suse.de>,
	Juan Quintela <quintela@redhat.com>,
	Eric Blake <eblake@redhat.com>,
	Chensheng Dong <chdong@redhat.com>
Subject: Re: [PATCH for-8.2 v2 2/2] migration: Allow user to specify migration switchover bandwidth
Date: Fri, 1 Sep 2023 09:37:32 +0100	[thread overview]
Message-ID: <ZPGizMa52LF7Qek1@redhat.com> (raw)
In-Reply-To: <8bb36b56-e2f6-ece8-0d8f-90b87a3b5c40@intel.com>

On Fri, Sep 01, 2023 at 02:55:08PM +0800, Wang, Lei wrote:
> On 8/3/2023 23:53, Peter Xu wrote:
> > Migration bandwidth is a very important value to live migration.  It's
> > because it's one of the major factors that we'll make decision on when to
> > switchover to destination in a precopy process.
> > 
> > This value is currently estimated by QEMU during the whole live migration
> > process by monitoring how fast we were sending the data.  This can be the
> > most accurate bandwidth if in the ideal world, where we're always feeding
> > unlimited data to the migration channel, and then it'll be limited to the
> > bandwidth that is available.
> > 
> > However in reality it may be very different, e.g., over a 10Gbps network we
> > can see query-migrate showing migration bandwidth of only a few tens of
> > MB/s just because there are plenty of other things the migration thread
> > might be doing.  For example, the migration thread can be busy scanning
> > zero pages, or it can be fetching dirty bitmap from other external dirty
> > sources (like vhost or KVM).  It means we may not be pushing data as much
> > as possible to migration channel, so the bandwidth estimated from "how many
> > data we sent in the channel" can be dramatically inaccurate sometimes,
> > e.g., that a few tens of MB/s even if 10Gbps available, and then the
> > decision to switchover will be further affected by this.
> > 
> > The migration may not even converge at all with the downtime specified,
> > with that wrong estimation of bandwidth.
> > 
> > The issue is QEMU itself may not be able to avoid those uncertainties on
> > measuing the real "available migration bandwidth".  At least not something
> > I can think of so far.
> > 
> > One way to fix this is when the user is fully aware of the available
> > bandwidth, then we can allow the user to help providing an accurate value.
> > 
> > For example, if the user has a dedicated channel of 10Gbps for migration
> > for this specific VM, the user can specify this bandwidth so QEMU can
> > always do the calculation based on this fact, trusting the user as long as
> > specified.
> > 
> > A new parameter "max-switchover-bandwidth" is introduced just for this. So
> > when the user specified this parameter, instead of trusting the estimated
> > value from QEMU itself (based on the QEMUFile send speed), let's trust the
> > user more by using this value to decide when to switchover, assuming that
> > we'll have such bandwidth available then.
> > 
> > When the user wants to have migration only use 5Gbps out of that 10Gbps,
> > one can set max-bandwidth to 5Gbps, along with max-switchover-bandwidth to
> > 5Gbps so it'll never use over 5Gbps too (so the user can have the rest
> 
> Hi Peter. I'm curious if we specify max-switchover-bandwidth to 5Gbps over a
> 10Gbps network, in the completion stage will it send the remaining data in 5Gbps
> using downtime_limit time or in 10Gbps (saturate the network) using the
> downtime_limit / 2 time? Seems this parameter won't rate limit the final stage:)

Effectively the mgmt app is telling QEMU to assume that this
much bandwidth is available for use during switchover. If QEMU
determines that, given this available bandwidth, the remaining
data can be sent over the link within the downtime limit, it
will perform the switchover. When sending this sitchover data,
it will actually transmit the data at full line rate IIUC.


With regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|



  reply	other threads:[~2023-09-01  8:37 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-03 15:53 [PATCH for-8.2 v2 0/2] migration: Add max-switchover-bandwidth parameter Peter Xu
2023-08-03 15:53 ` [PATCH for-8.2 v2 1/2] qapi/migration: Deduplicate migration parameter field comments Peter Xu
2023-08-04 12:28   ` Markus Armbruster
2023-08-04 13:59     ` Daniel P. Berrangé
2023-08-04 16:01       ` Peter Xu
2023-08-04 16:29         ` Daniel P. Berrangé
2023-08-04 16:46           ` Peter Xu
2023-08-04 16:48             ` Daniel P. Berrangé
2023-08-04 21:02               ` Peter Xu
2023-08-05  8:12                 ` Markus Armbruster
2023-08-06 15:49                   ` Peter Xu
2023-08-08 20:03                     ` Peter Xu
2023-08-14 22:24                       ` Peter Xu
2023-08-03 15:53 ` [PATCH for-8.2 v2 2/2] migration: Allow user to specify migration switchover bandwidth Peter Xu
2023-08-31 18:14   ` Joao Martins
2023-08-31 18:34     ` Peter Xu
2023-09-01  6:55   ` Wang, Lei
2023-09-01  8:37     ` Daniel P. Berrangé [this message]
2023-09-01 14:40       ` Peter Xu
2023-09-05 16:46       ` Peter Xu
2023-09-05 17:39         ` Daniel P. Berrangé
2023-09-06  2:27         ` Wang, Lei
2023-09-01 17:59   ` Joao Martins
2023-09-01 18:39     ` Joao Martins
2023-09-05 15:31       ` Peter Xu

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=ZPGizMa52LF7Qek1@redhat.com \
    --to=berrange@redhat.com \
    --cc=armbru@redhat.com \
    --cc=chdong@redhat.com \
    --cc=eblake@redhat.com \
    --cc=farosas@suse.de \
    --cc=lei4.wang@intel.com \
    --cc=lsoaresp@redhat.com \
    --cc=peterx@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    --cc=zhguo@redhat.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).