From: "Daniel P. Berrange" <berrange@redhat.com>
To: Juan Quintela <quintela@redhat.com>
Cc: qemu-devel@nongnu.org, amit.shah@redhat.com, dgilbert@redhat.com
Subject: Re: [Qemu-devel] [PATCH 07/16] migration: Create x-multifd-group parameter
Date: Mon, 13 Mar 2017 17:12:14 +0000 [thread overview]
Message-ID: <20170313171214.GO4799@redhat.com> (raw)
In-Reply-To: <87o9x5unns.fsf@secure.mitica>
On Mon, Mar 13, 2017 at 05:49:59PM +0100, Juan Quintela wrote:
> "Daniel P. Berrange" <berrange@redhat.com> wrote:
> > On Mon, Mar 13, 2017 at 01:44:25PM +0100, Juan Quintela wrote:
> >> Indicates how many pages we are going to send in each bach to a multifd
> >> thread.
> >
> >
> >> diff --git a/qapi-schema.json b/qapi-schema.json
> >> index b7cb26d..33a6267 100644
> >> --- a/qapi-schema.json
> >> +++ b/qapi-schema.json
> >> @@ -988,6 +988,9 @@
> >> # @x-multifd-threads: Number of threads used to migrate data in parallel
> >> # The default value is 2 (since 2.9)
> >> #
> >> +# @x-multifd-group: Number of pages sent together to a thread
> >> +# The default value is 16 (since 2.9)
> >> +#
> >> # Since: 2.4
> >> ##
> >> { 'enum': 'MigrationParameter',
> >> @@ -995,7 +998,7 @@
> >> 'cpu-throttle-initial', 'cpu-throttle-increment',
> >> 'tls-creds', 'tls-hostname', 'max-bandwidth',
> >> 'downtime-limit', 'x-checkpoint-delay',
> >> - 'x-multifd-threads'] }
> >> + 'x-multifd-threads', 'x-multifd-group'] }
> >>
> >> ##
> >> # @migrate-set-parameters:
> >> @@ -1062,6 +1065,9 @@
> >> # @x-multifd-threads: Number of threads used to migrate data in parallel
> >> # The default value is 2 (since 2.9)
> >> #
> >> +# @x-multifd-group: Number of pages sent together in a bunch
> >> +# The default value is 16 (since 2.9)
> >> +#
> >
> > How is this parameter supposed to be used ? Or to put it another way,
> > what are the benefits / effects of changing it from its default
> > value and can an application usefully decide what value to set ? I'm
> > loathe to see us expose another "black magic" parameter where you can't
> > easily determine what values to set, without predicting future guest
> > workloads
>
> We have multiple threads, we can send to each thread the number of pages
> that it needs to send one by one, two by two, n x n. The bigger the
> number, the less locking to do, and then less contention. But if it is
> too big, we could probably end with too few distribution. Reason to add
> this parameter is that if we send page by page, we end spending too much
> time in locking.
The question is how is an application like OpenStack / oVirt supposed to
know what the right number of pages is to get the right tradeoff between
lock contention & distribution ? Lock contention may well change over
time as the QEMU impl is improved, so the right answer for setting this
parameter might vary depending on QEMU version. IMHO, you should just
pick a sensible default value and not expose this to applications.
Regards,
Daniel
--
|: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org -o- http://virt-manager.org :|
|: http://entangle-photo.org -o- http://search.cpan.org/~danberr/ :|
next prev parent reply other threads:[~2017-03-13 17:12 UTC|newest]
Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-13 12:44 [Qemu-devel] [PATCH 00/16] Multifd v4 Juan Quintela
2017-03-13 12:44 ` [Qemu-devel] [PATCH 01/16] qio: create new qio_channel_write_all Juan Quintela
2017-03-13 16:29 ` Daniel P. Berrange
2017-04-27 8:19 ` Juan Quintela
2017-03-13 12:44 ` [Qemu-devel] [PATCH 02/16] qio: create new qio_channel_read_all Juan Quintela
2017-03-13 16:30 ` Daniel P. Berrange
2017-03-13 12:44 ` [Qemu-devel] [PATCH 03/16] migration: Test for disabled features on reception Juan Quintela
2017-03-13 16:21 ` Dr. David Alan Gilbert
2017-03-13 12:44 ` [Qemu-devel] [PATCH 04/16] migration: Don't create decompression threads if not enabled Juan Quintela
2017-03-13 16:25 ` Dr. David Alan Gilbert
2017-03-13 12:44 ` [Qemu-devel] [PATCH 05/16] migration: Add multifd capability Juan Quintela
2017-03-13 12:44 ` [Qemu-devel] [PATCH 06/16] migration: Create x-multifd-threads parameter Juan Quintela
2017-03-13 16:37 ` Daniel P. Berrange
2017-03-13 16:50 ` Juan Quintela
2017-03-13 12:44 ` [Qemu-devel] [PATCH 07/16] migration: Create x-multifd-group parameter Juan Quintela
2017-03-13 16:34 ` Daniel P. Berrange
2017-03-13 16:49 ` Juan Quintela
2017-03-13 17:12 ` Daniel P. Berrange [this message]
2017-03-13 18:35 ` Juan Quintela
2017-03-13 12:44 ` [Qemu-devel] [PATCH 08/16] migration: Create multifd migration threads Juan Quintela
2017-03-13 12:44 ` [Qemu-devel] [PATCH 09/16] migration: Start of multiple fd work Juan Quintela
2017-03-13 16:41 ` Daniel P. Berrange
2017-03-13 16:58 ` Juan Quintela
2017-03-14 10:34 ` Daniel P. Berrange
2017-03-14 12:32 ` Juan Quintela
2017-03-13 12:44 ` [Qemu-devel] [PATCH 10/16] migration: Create ram_multifd_page Juan Quintela
2017-03-13 12:44 ` [Qemu-devel] [PATCH 11/16] migration: Really use multiple pages at a time Juan Quintela
2017-03-13 12:44 ` [Qemu-devel] [PATCH 12/16] migration: Send the fd number which we are going to use for this page Juan Quintela
2017-03-13 12:44 ` [Qemu-devel] [PATCH 13/16] migration: Create thread infrastructure for multifd recv side Juan Quintela
2017-03-14 9:23 ` Paolo Bonzini
2017-03-17 13:02 ` Dr. David Alan Gilbert
2017-03-17 16:05 ` Paolo Bonzini
2017-03-17 19:36 ` Dr. David Alan Gilbert
2017-03-20 11:15 ` Paolo Bonzini
2017-03-30 11:56 ` Juan Quintela
2017-03-13 12:44 ` [Qemu-devel] [PATCH 14/16] migration: Test new fd infrastructure Juan Quintela
2017-03-13 12:44 ` [Qemu-devel] [PATCH 15/16] migration: Transfer pages over new channels Juan Quintela
2017-03-13 12:44 ` [Qemu-devel] [PATCH 16/16] migration: Flush receive queue Juan Quintela
2017-03-14 10:21 ` [Qemu-devel] [PATCH 00/16] Multifd v4 Dr. David Alan Gilbert
2017-03-14 10:26 ` Daniel P. Berrange
2017-03-14 11:40 ` Dr. David Alan Gilbert
2017-03-14 11:45 ` Daniel P. Berrange
2017-03-14 11:47 ` Daniel P. Berrange
2017-03-14 12:22 ` Dr. David Alan Gilbert
2017-03-14 12:34 ` Daniel P. Berrange
2017-03-14 16:23 ` Dr. David Alan Gilbert
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=20170313171214.GO4799@redhat.com \
--to=berrange@redhat.com \
--cc=amit.shah@redhat.com \
--cc=dgilbert@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=quintela@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).