All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Daniel P. Berrangé" <berrange@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Juan Quintela" <quintela@redhat.com>,
	"Thomas Huth" <thuth@redhat.com>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Laurent Vivier" <lvivier@redhat.com>,
	"Daniel P. Berrangé" <berrange@redhat.com>
Subject: [PATCH 0/2] tests/qtest: make migraton-test faster
Date: Tue, 18 Apr 2023 14:30:58 +0100	[thread overview]
Message-ID: <20230418133100.48799-1-berrange@redhat.com> (raw)

This makes migration-test faster by observing that most of the pre-copy
tests don't need to be doing a live migration. They get sufficient code
coverage with the guest CPUs paused.

On my machine this cuts the overall execution time of migration-test
by 50% from 15 minutes, down to 8 minutes, without sacrificing any
noticeable code coverage.

This is still quite slow though.

The following are the test timings sorted by speed:

/x86_64/migration/auto_converge  68.85
/x86_64/migration/precopy/unix/xbzrle  68.29
/x86_64/migration/postcopy/preempt/tls/psk  36.57
/x86_64/migration/dirty_ring  35.58
/x86_64/migration/precopy/unix/plain  35.56
/x86_64/migration/postcopy/preempt/plain  34.71
/x86_64/migration/postcopy/recovery/plain  34.56
/x86_64/migration/postcopy/tls/psk  34.45
/x86_64/migration/postcopy/preempt/recovery/tls/psk  33.99
/x86_64/migration/postcopy/preempt/recovery/plain  33.99
/x86_64/migration/postcopy/plain  33.78
/x86_64/migration/postcopy/recovery/tls/psk  33.30
/x86_64/migration/multifd/tcp/plain/none  21.12
/x86_64/migration/vcpu_dirty_limit  12.28
/x86_64/migration/multifd/tcp/tls/x509/default-host  2.95
/x86_64/migration/multifd/tcp/tls/x509/allow-anon-client  2.68
/x86_64/migration/multifd/tcp/tls/x509/override-host  2.51
/x86_64/migration/precopy/tcp/tls/x509/default-host  1.52
/x86_64/migration/precopy/unix/tls/x509/override-host  1.49
/x86_64/migration/precopy/unix/tls/psk  1.48
/x86_64/migration/precopy/tcp/tls/psk/match  1.47
/x86_64/migration/multifd/tcp/tls/psk/match  1.35
/x86_64/migration/precopy/tcp/tls/x509/allow-anon-client  1.32
/x86_64/migration/precopy/tcp/tls/x509/override-host  1.27
/x86_64/migration/precopy/tcp/tls/x509/friendly-client  1.27
/x86_64/migration/multifd/tcp/plain/zlib  1.08
/x86_64/migration/precopy/tcp/plain  1.05
/x86_64/migration/fd_proto  1.04
/x86_64/migration/multifd/tcp/tls/psk/mismatch  1.00
/x86_64/migration/multifd/tcp/plain/zstd  0.98
/x86_64/migration/precopy/tcp/tls/x509/hostile-client  0.85
/x86_64/migration/multifd/tcp/tls/x509/mismatch-host  0.79
/x86_64/migration/precopy/tcp/tls/x509/mismatch-host  0.75
/x86_64/migration/precopy/unix/tls/x509/default-host  0.74
/x86_64/migration/precopy/tcp/tls/x509/reject-anon-client  0.71
/x86_64/migration/multifd/tcp/tls/x509/reject-anon-client  0.68
/x86_64/migration/precopy/tcp/tls/psk/mismatch  0.63
/x86_64/migration/validate_uuid_src_not_set  0.59
/x86_64/migration/validate_uuid  0.54
/x86_64/migration/validate_uuid_dst_not_set  0.53
/x86_64/migration/bad_dest  0.41
/x86_64/migration/validate_uuid_error  0.31

The auto-converge and xbzrle tests are top because they both inherantly
*need* todo multiple interations in order to exercise the desired
code paths.

The post-copy tests are all up there because we always do one iteration
of pre-copy before switching to post-copy and we need to ensure that we
don't complete before getting to the post-copy bit.

I think we can optimize the post-copy bit though. Only 1 of the
post-copy tests really needs to go through a full pre-copy iteration
to get good code coverage.  For the other post-copy tests we can change
to let it copy 10 MBs of data in pre-copy mode and then switch to
post-copy.

Also in

  commit 1bfc8dde505f1e6a92697c52aa9b09e81b54c78f
  Author: Dr. David Alan Gilbert <dgilbert@redhat.com>
  Date:   Mon Mar 6 15:26:12 2023 +0000

    tests/migration: Tweek auto converge limits check

we cut the bandwidth by factor of x10 to ensure reliability. I think
that was perhaps too aggressive. If we bump it back up to say 10 MB/sec
that's still better than the original 30 MB/sec, perhaps enough to give
us reliability, while cutting time of other tests by 70%

Daniel P. Berrangé (2):
  tests/qtest: capture RESUME events during migration
  tests/qtest: make more migration pre-copy scenarios run non-live

 tests/qtest/migration-helpers.c | 12 +++++++++---
 tests/qtest/migration-helpers.h |  1 +
 tests/qtest/migration-test.c    | 34 ++++++++++++++++++++++++++-------
 3 files changed, 37 insertions(+), 10 deletions(-)

-- 
2.40.0



             reply	other threads:[~2023-04-18 13:32 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-18 13:30 Daniel P. Berrangé [this message]
2023-04-18 13:30 ` [PATCH 1/2] tests/qtest: capture RESUME events during migration Daniel P. Berrangé
2023-04-20 11:32   ` Juan Quintela
2023-04-20 11:37     ` Daniel P. Berrangé
2023-04-18 13:31 ` [PATCH 2/2] tests/qtest: make more migration pre-copy scenarios run non-live Daniel P. Berrangé
2023-04-18 19:52   ` Fabiano Rosas
2023-04-19 17:14     ` Daniel P. Berrangé
2023-04-21 17:20     ` Daniel P. Berrangé
2023-04-20 12:59   ` Juan Quintela
2023-04-20 15:58     ` Daniel P. Berrangé

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=20230418133100.48799-1-berrange@redhat.com \
    --to=berrange@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.