From: Peter Xu <peterx@redhat.com>
To: "Daniel P. Berrangé" <berrange@redhat.com>
Cc: qemu-devel@nongnu.org, Avihai Horon <avihaih@nvidia.com>,
Paolo Bonzini <pbonzini@redhat.com>,
Leonardo Bras Soares Passos <lsoaresp@redhat.com>,
Juan Quintela <quintela@redhat.com>,
Laurent Vivier <lvivier@redhat.com>,
Thomas Huth <thuth@redhat.com>
Subject: Re: [PATCH RFC 3/3] qtest/migration: Use switchover-hold to speedup
Date: Fri, 2 Jun 2023 09:23:59 -0400 [thread overview]
Message-ID: <ZHntby+Tl1Bf59X4@x1n> (raw)
In-Reply-To: <ZHnMaQ4NFCUQ5gmN@redhat.com>
On Fri, Jun 02, 2023 at 12:03:05PM +0100, Daniel P. Berrangé wrote:
> On Thu, Jun 01, 2023 at 09:16:26PM -0400, Peter Xu wrote:
> > Use the switchover-hold flag rather than tuning bw+downtime to guide test
> > convergence.
> >
> > This can achieve similar goal of previous patch "tests/qtest: massively
> > speed up migration-test" but without magic offset to write or monitoring.
> >
> > The initial solution can reduce migration-test time from 8min to 1min40s,
> > this patch can further reduce it from 1m40s to 1m1s per my local test.
> >
> > Signed-off-by: Peter Xu <peterx@redhat.com>
> > ---
> > tests/qtest/migration-test.c | 20 ++++++++++++++------
> > 1 file changed, 14 insertions(+), 6 deletions(-)
> >
> > diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c
> > index b0c355bbd9..62bdd67fd9 100644
> > --- a/tests/qtest/migration-test.c
> > +++ b/tests/qtest/migration-test.c
> > @@ -433,16 +433,15 @@ static void migrate_set_parameter_bool(QTestState *who, const char *parameter,
> >
> > static void migrate_ensure_non_converge(QTestState *who)
> > {
> > - /* Can't converge with 1ms downtime + 3 mbs bandwidth limit */
> > - migrate_set_parameter_int(who, "max-bandwidth", 3 * 1000 * 1000);
> > - migrate_set_parameter_int(who, "downtime-limit", 1);
> > + /* Hold off switchover for precopy only */
> > + migrate_set_parameter_bool(who, "switchover-hold", true);
> > }
> >
> > static void migrate_ensure_converge(QTestState *who)
> > {
> > - /* Should converge with 30s downtime + 1 gbs bandwidth limit */
> > - migrate_set_parameter_int(who, "max-bandwidth", 1 * 1000 * 1000 * 1000);
> > - migrate_set_parameter_int(who, "downtime-limit", 30 * 1000);
> > + /* No limitation on bandwidth so converge faster */
> > + migrate_set_parameter_int(who, "max-bandwidth", 0);
>
> You're already setting max-bandwith==0 in migrate_postcopy_prepare.
>
> If you also set it in test_precopy_common, so we don't need to
> set it here, and we'll avoid the initial phase running with
> bandwidth=32mbs.
There are more tests than test_precopy_common() that leverages this, so I
used to kept it there to still share some code:
test_migrate_auto_converge[2021] migrate_ensure_converge(from);
test_multifd_tcp_cancel[2349] migrate_ensure_converge(from);
But I think you're right - moving the bw=0 setup out should be cleaner.
I'll see whether I should just move it into all the specific tests.
Thanks,
--
Peter Xu
prev parent reply other threads:[~2023-06-02 13:24 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-02 1:16 [PATCH RFC 0/3] migration: switchover-hold flag Peter Xu
2023-06-02 1:16 ` [PATCH RFC 1/3] migration: switchover-hold parameter Peter Xu
2023-06-02 11:14 ` Daniel P. Berrangé
2023-06-02 13:20 ` Peter Xu
2023-06-02 1:16 ` [PATCH RFC 2/3] Revert "tests/qtest: massively speed up migration-test" Peter Xu
2023-06-02 1:16 ` [PATCH RFC 3/3] qtest/migration: Use switchover-hold to speedup Peter Xu
2023-06-02 11:03 ` Daniel P. Berrangé
2023-06-02 13:23 ` Peter Xu [this message]
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=ZHntby+Tl1Bf59X4@x1n \
--to=peterx@redhat.com \
--cc=avihaih@nvidia.com \
--cc=berrange@redhat.com \
--cc=lsoaresp@redhat.com \
--cc=lvivier@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.com \
--cc=thuth@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).