From: Peter Xu <peterx@redhat.com>
To: Mario Casquero <mcasquer@redhat.com>
Cc: qemu-devel@nongnu.org, Juraj Marcin <jmarcin@redhat.com>,
"Dr . David Alan Gilbert" <dave@treblig.org>,
Fabiano Rosas <farosas@suse.de>
Subject: Re: [PATCH v2 00/11] migration: Some enhancements and cleanups for 10.1
Date: Thu, 12 Jun 2025 07:43:48 -0400 [thread overview]
Message-ID: <aEq9dPYunkapeByP@x1.local> (raw)
In-Reply-To: <CAMXpfWuAkKoVJFvD_YFLzTpUZ_a-25jK_y1y-EA_Sk+LUC0B6A@mail.gmail.com>
On Thu, Jun 12, 2025 at 12:35:46PM +0200, Mario Casquero wrote:
> Hello Peter,
Hi, Mario,
>
> Thanks for pointing this out! I retested it with the series you
> mentioned and everything works fine.
>
> Booted up 2 VMs as usual, one in source and one in destination with
> -incoming defer. Set the postcopy-blocktime and postcopy-ram
> capabilities and query them to verify that they are enabled.
>
> (qemu) migrate_set_capability postcopy-ram on
> (qemu) migrate_set_capability postcopy-blocktime on
> (qemu) info migrate_capabilities
>
> ...
> postcopy-ram: on
> ...
> postcopy-blocktime: on
> ...
>
> Do migration with postcopy, this time check the full info migrate in source.
> (qemu) info migrate -a
> Status: postcopy-active
> Time (ms): total=6522, setup=33, down=16
> RAM info:
> Throughput (Mbps): 949.60
> Sizes: pagesize=4 KiB, total=16 GiB
> Transfers: transferred=703 MiB, remain=5.4 GiB
> Channels: precopy=111 MiB, multifd=0 B, postcopy=592 MiB
> Page Types: normal=178447, zero=508031
> Page Rates (pps): transfer=167581
> Others: dirty_syncs=2, postcopy_req=1652
> Globals:
> store-global-state: on
> only-migratable: off
> send-configuration: on
> send-section-footer: on
> send-switchover-start: on
> clear-bitmap-shift: 18
>
> Once migration is completed compare the differences in destination
> about the postcopy blocktime.
>
> (qemu) info migrate -a
> Status: completed
> Globals:
> ...
> Postcopy Blocktime (ms): 712
> Postcopy vCPU Blocktime (ms):
> [1633, 1635, 1710, 2097, 2595, 1993, 1958, 1214]
>
> With all the series applied and same VM:
>
> (qemu) info migrate -a
> Status: completed
> Globals:
> ...
> Postcopy Blocktime (ms): 134
> Postcopy vCPU Blocktime (ms):
> [1310, 1064, 1112, 1400, 1334, 756, 1216, 1420]
> Postcopy Latency (us): 16075
Here the latency is 16ms, my fault here - I forgot to let you enable
postcopy-preempt as well, sorry.
The optimization won't help much without preempt, because the optimization
is in tens of microseconds level. So logically the optimization might be
buried in the noise if without preempt mode. It's suggested to enable
preempt mode always for a postcopy migration whenever available.
> Postcopy non-vCPU Latencies (us): 14743
> Postcopy vCPU Latencies (us):
> [24730, 25350, 27125, 25930, 23825, 29110, 22960, 26304]
>
> Indeed the Postcopy Blocktime has been reduced a lot :)
I haven't compared with blocktime before, I'm surprised it changed that
much. Though maybe you didn't really run any workload inside? In that
case the results can be unpredictable. The perf test would make more sense
if you run some loads so the majority of the faults triggered will not be
adhoc system probes but more predictable. I normally use mig_mon [1] with
something like this:
[1] https://github.com/xzpeter/mig_mon
$ ./mig_mon mm_dirty -m 13G -p random
This first write pre-fault the whole memory using all the CPUs, then
dirties the 13G memory single threaded as fast as possible in random
fashion.
What I did with the test was applying both series then revert the last
patch of 1st series, as "postcopy-latency' metrics wasn't around before
applying the 2nd series, or you'll need to use some kernel tracepoints.
This is definitely an awkward series to test when having the two mangled.
Again, feel free to skip that, just FYI!
Thanks,
--
Peter Xu
next prev parent reply other threads:[~2025-06-12 11:45 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-09 16:18 [PATCH v2 00/11] migration: Some enhancements and cleanups for 10.1 Peter Xu
2025-06-09 16:18 ` [PATCH v2 01/11] migration/hmp: Reorg "info migrate" once more Peter Xu
2025-06-09 16:18 ` [PATCH v2 02/11] migration/hmp: Fix postcopy-blocktime per-vCPU results Peter Xu
2025-07-01 14:38 ` Fabiano Rosas
2025-06-09 16:18 ` [PATCH v2 03/11] migration/docs: Move docs for postcopy blocktime feature Peter Xu
2025-06-09 16:18 ` [PATCH v2 04/11] migration/bg-snapshot: Do not check for SKIP in iterator Peter Xu
2025-06-09 16:18 ` [PATCH v2 05/11] migration: Drop save_live_complete_postcopy hook Peter Xu
2025-07-01 14:40 ` Fabiano Rosas
2025-06-09 16:18 ` [PATCH v2 06/11] migration: Rename save_live_complete_precopy to save_complete Peter Xu
2025-07-01 14:41 ` Fabiano Rosas
2025-06-09 16:18 ` [PATCH v2 07/11] migration: qemu_savevm_complete*() helpers Peter Xu
2025-07-01 14:53 ` Fabiano Rosas
2025-06-09 16:18 ` [PATCH v2 08/11] migration/ram: One less indent for ram_find_and_save_block() Peter Xu
2025-06-09 16:18 ` [PATCH v2 09/11] migration/ram: Add tracepoints for ram_save_complete() Peter Xu
2025-06-09 16:18 ` [PATCH v2 10/11] migration: Rewrite the migration complete detect logic Peter Xu
2025-07-01 17:35 ` Fabiano Rosas
2025-06-09 16:18 ` [PATCH v2 11/11] migration/postcopy: Avoid clearing dirty bitmap for postcopy too Peter Xu
2025-06-11 6:15 ` [PATCH v2 00/11] migration: Some enhancements and cleanups for 10.1 Mario Casquero
2025-06-11 13:06 ` Peter Xu
2025-06-12 10:35 ` Mario Casquero
2025-06-12 11:43 ` Peter Xu [this message]
2025-06-11 21:35 ` 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=aEq9dPYunkapeByP@x1.local \
--to=peterx@redhat.com \
--cc=dave@treblig.org \
--cc=farosas@suse.de \
--cc=jmarcin@redhat.com \
--cc=mcasquer@redhat.com \
--cc=qemu-devel@nongnu.org \
/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.