From: Markus Armbruster <armbru@redhat.com>
To: Samuel Zhang <guoqing.zhang@amd.com>
Cc: <qemu-devel@nongnu.org>, <peterx@redhat.com>, <farosas@suse.de>,
<lizhijian@fujitsu.com>, <eblake@redhat.com>,
<Emily.Deng@amd.com>, <Victor.Zhao@amd.com>,
<PengJu.Zhou@amd.com>, <Qing.Ma@amd.com>
Subject: Re: [PATCH v3] migration/rdma: add x-rdma-chunk-size parameter
Date: Fri, 27 Mar 2026 10:45:55 +0100 [thread overview]
Message-ID: <87h5q17gh8.fsf@pond.sub.org> (raw)
In-Reply-To: <20260327065006.2567463-1-guoqing.zhang@amd.com> (Samuel Zhang's message of "Fri, 27 Mar 2026 14:50:06 +0800")
Samuel Zhang <guoqing.zhang@amd.com> writes:
> The default 1MB RDMA chunk size causes slow live migration because
> each chunk triggers a write_flush (ibv_post_send). For 8GB RAM,
> 1MB chunk size produces ~15000 flushes vs ~3700 with 1024MB chunk size.
>
> Add x-rdma-chunk-size parameter to configure the RDMA chunk size for
> faster migration.
> Usage: `migrate_set_parameter x-rdma-chunk-size 1024M`
>
> Performance with RDMA live migration of 8GB RAM VM:
>
> | x-rdma-chunk-size (B) | time (s) | throughput (MB/s) |
> |-----------------------|----------|-------------------|
> | 1M (default) | 37.915 | 1,007 |
> | 32M | 17.880 | 2,260 |
> | 1024M | 4.368 | 17,529 |
>
> Signed-off-by: Samuel Zhang <guoqing.zhang@amd.com>
[...]
> diff --git a/migration/options.c b/migration/options.c
> index f33b297929..bc61c8665d 100644
> --- a/migration/options.c
> +++ b/migration/options.c
> @@ -13,6 +13,7 @@
>
> #include "qemu/osdep.h"
> #include "qemu/error-report.h"
> +#include "qemu/units.h"
> #include "exec/target_page.h"
> #include "qapi/clone-visitor.h"
> #include "qapi/error.h"
> @@ -90,6 +91,7 @@ const PropertyInfo qdev_prop_StrOrNull;
>
> #define DEFAULT_MIGRATE_VCPU_DIRTY_LIMIT_PERIOD 1000 /* milliseconds */
> #define DEFAULT_MIGRATE_VCPU_DIRTY_LIMIT 1 /* MB/s */
> +#define DEFAULT_MIGRATE_X_RDMA_CHUNK_SIZE MiB /* 1MB */
The comment is now superfluous.
>
> const Property migration_properties[] = {
> DEFINE_PROP_BOOL("store-global-state", MigrationState,
[...]
> diff --git a/qapi/migration.json b/qapi/migration.json
> index 7134d4ce47..292d96c95a 100644
> --- a/qapi/migration.json
> +++ b/qapi/migration.json
> @@ -806,7 +806,7 @@
> #
> # Features:
> #
> -# @unstable: Members @x-checkpoint-delay and
> +# @unstable: Members @x-checkpoint-delay, @x-rdma-chunk-size, and
> # @x-vcpu-dirty-limit-period are experimental.
> #
> # Since: 2.4
> @@ -831,6 +831,7 @@
> 'mode',
> 'zero-page-detection',
> 'direct-io',
> + { 'name': 'x-rdma-chunk-size', 'features': [ 'unstable' ] },
> 'cpr-exec-command'] }
>
> ##
> @@ -1007,9 +1008,14 @@
> # is @cpr-exec. The first list element is the program's filename,
> # the remainder its arguments. (Since 10.2)
> #
> +# @x-rdma-chunk-size: RDMA memory registration chunk size in bytes.
> +# Default is 1MiB. Must be a power of 2 in the range
> +# [1MiB, 1024MiB]. Only takes effect for RDMA migration.
I believe it applies to channels whose migration address type is is
"rdma". In MigrationChannel syntax
{"channel-type": ..., "addr": {"transport": "rdma", ...}}
Correct?
> +# (Since 11.1)
> +#
> # Features:
> #
> -# @unstable: Members @x-checkpoint-delay and
> +# @unstable: Members @x-checkpoint-delay, @x-rdma-chunk-size, and
> # @x-vcpu-dirty-limit-period are experimental.
> #
> # Since: 2.4
> @@ -1046,6 +1052,8 @@
> '*mode': 'MigMode',
> '*zero-page-detection': 'ZeroPageDetection',
> '*direct-io': 'bool',
> + '*x-rdma-chunk-size': { 'type': 'uint64',
> + 'features': [ 'unstable' ] },
> '*cpr-exec-command': [ 'str' ]} }
>
> ##
next prev parent reply other threads:[~2026-03-27 9:46 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-27 6:50 [PATCH v3] migration/rdma: add x-rdma-chunk-size parameter Samuel Zhang
2026-03-27 9:45 ` Markus Armbruster [this message]
2026-03-27 10:27 ` Zhang, GuoQing (Sam)
2026-03-27 11:24 ` Markus Armbruster
2026-03-30 16:10 ` Peter Xu
2026-03-31 3:30 ` Zhijian Li (Fujitsu)
2026-03-31 10:33 ` Zhang, GuoQing (Sam)
2026-03-31 11:29 ` Zhijian Li (Fujitsu)
2026-04-01 15:56 ` Peter Xu
2026-04-03 6:15 ` Zhang, GuoQing (Sam)
2026-04-03 9:39 ` Zhijian Li (Fujitsu)
2026-04-03 9:59 ` Zhang, GuoQing (Sam)
2026-04-07 6:15 ` Zhijian Li (Fujitsu)
2026-03-31 11:06 ` Markus Armbruster
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=87h5q17gh8.fsf@pond.sub.org \
--to=armbru@redhat.com \
--cc=Emily.Deng@amd.com \
--cc=PengJu.Zhou@amd.com \
--cc=Qing.Ma@amd.com \
--cc=Victor.Zhao@amd.com \
--cc=eblake@redhat.com \
--cc=farosas@suse.de \
--cc=guoqing.zhang@amd.com \
--cc=lizhijian@fujitsu.com \
--cc=peterx@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.