Skip to contentSkip to conversation

rdma: migration support

PATCH Chegu Vinod 3 participants 8 messages May 3, 2013 – Jun 7, 2013

lore
Share & tools
lore
#0 lore raw

Hi Michael,

I picked up the qemu bits from your github branch and gave it a try. (BTW the setup I was given temporary access to has a pair of MLX's IB QDR cards connected back to back via QSFP cables)

Observed a couple of things and wanted to share..perhaps you may be aware of them already or perhaps these are unrelated to your specific changes ? (Note: Still haven't finished the review of your changes ).

a) x-rdma-pin-all off case

Seem to only work sometimes but fails at other times. Here is an example...

(qemu) rdma: Accepting rdma connection...
rdma: Memory pin all: disabled
rdma: verbs context after listen: 0x555556757d50
rdma: dest_connect Source GID: fe80::2:c903:9:53a5, Dest GID: fe80::2:c903:9:5855
rdma: Accepted migration
qemu-system-x86_64: VQ 1 size 0x100 Guest index 0x4d2 inconsistent with Host ind ex 0x4ec: delta 0xffe6
qemu: warning: error while loading state for instance 0x0 of device 'virtio-net' load of migration failed

b) x-rdma-pin-all on case :

The guest is not resuming on the target host. i.e. the source host's qemu states that migration is complete but the guest is not responsive anymore... (doesn't seem to have crashed but its stuck somewhere). Have you seen this behavior before ? Any tips on how I could extract additional info ?

Besides the list of noted restrictions/issues around having to pin all of guest memory....if the pinning is done as part of starting of the migration it ends up taking noticeably long time for larger guests. Wonder whether that should be counted as part of the total migration time ?.

Also the act of pinning all the memory seems to "freeze" the guest. e.g. : For larger enterprise sized guests (say 128GB and higher) the guest is "frozen" is anywhere from nearly a minute (~50seconds) to multiple minutes as the guest size increases...which imo kind of defeats the purpose of live guest migration.

Would like to hear if you have already thought about any other alternatives to address this issue ? for e.g. would it be better to pin all of the guest's memory as part of starting the guest itself ? Yes there are restrictions when we do pinning...but it can help with performance.
---
BTW, a different (yet sort of related) topic... recently a patch went into upstream that provided an option to qemu to mlock all of guest memory :

https://lists.gnu.org/archive/html/qemu-devel/2013-04/msg03947.html .

but when attempting to do the mlock for larger guests a lot of time is spent bringing each page into cache and clearing/zeron'g it etc.etc.

https://lists.gnu.org/archive/html/qemu-devel/2013-04/msg04161.html

----

Note: The basic tcp based live guest migration in the same qemu version still works fine on the same hosts over a pair of non-RDMA cards 10Gb NICs connected back-to-back.

Thanks
Vinod

#1 lore raw

Comments inline. FYI: please CC [email protected],
because it helps me know when to scroll threw the bazillion qemu-devel emails.

I have things separated out into folders and rules, but a direct CC is better =)

Quoted 11 lines · Chegu Vinod

Hi Michael,

I picked up the qemu bits from your github branch and gave it a try. (BTW the setup I was given temporary access to has a pair of MLX's IB QDR cards connected back to back via QSFP cables)

Observed a couple of things and wanted to share..perhaps you may be aware of them already or perhaps these are unrelated to your specific changes ? (Note: Still haven't finished the review of your changes ).

a) x-rdma-pin-all off case

Seem to only work sometimes but fails at other times. Here is an example...

Quoted 10 lines

(qemu) rdma: Accepting rdma connection...
rdma: Memory pin all: disabled
rdma: verbs context after listen: 0x555556757d50
rdma: dest_connect Source GID: fe80::2:c903:9:53a5, Dest GID: fe80::2:c903:9:5855
rdma: Accepted migration
qemu-system-x86_64: VQ 1 size 0x100 Guest index 0x4d2 inconsistent with Host ind ex 0x4ec: delta 0xffe6
qemu: warning: error while loading state for instance 0x0 of device 'virtio-net' load of migration failed

Can you give me more details about the configuration of your VM?

Quoted 4 lines

b) x-rdma-pin-all on case :

The guest is not resuming on the target host. i.e. the source host's qemu states that migration is complete but the guest is not responsive anymore... (doesn't seem to have crashed but its stuck somewhere). Have you seen this behavior before ? Any tips on how I could extract additional info ?

Is the QEMU monitor still responsive?
Can you capture a screenshot of the guest's console to see if there is a panic? What kind of storage is attached to the VM?

Quoted 3 lines

Besides the list of noted restrictions/issues around having to pin all of guest memory....if the pinning is done as part of starting of the migration it ends up taking noticeably long time for larger guests. Wonder whether that should be counted as part of the total migration time ?.

That's a good question: The pin-all option should not be slowing down your VM to much as the VM should still be running before the migration_thread() actually kicks in and starts the migration. I need more information on the configuration of your VM, guest operating system, architecture and so forth.......
And similarly as before whether or not QEMU is not responsive or whether or not it's the guest that's panicked.......

Quoted 1 line

Also the act of pinning all the memory seems to "freeze" the guest. e.g. : For larger enterprise sized guests (say 128GB and higher) the guest is "frozen" is anywhere from nearly a minute (~50seconds) to multiple minutes as the guest size increases...which imo kind of defeats the purpose of live guest migration.

That's bad =) There must be a bug somewhere........ the largest VM I can create on my hardware is ~16GB - so let me give that a try and try to track down the problem.

Quoted 2 lines

Would like to hear if you have already thought about any other alternatives to address this issue ? for e.g. would it be better to pin all of the guest's memory as part of starting the guest itself ? Yes there are restrictions when we do pinning...but it can help with performance.

For such a large VM, I would definitely recommend pinning because I'm assuming you have enough processors or a large enough application to actually *use* that much memory, which would suggest that even after the bulk phase round of the migration has already completed that your VM is probably going to remain to be pretty busy.

It's just a matter of me tracking down what's causing the freeze and fixing it........ I'll look into it right now on my machine.

Quoted 4 lines

---
BTW, a different (yet sort of related) topic... recently a patch went into upstream that provided an option to qemu to mlock all of guest memory :

https://lists.gnu.org/archive/html/qemu-devel/2013-04/msg03947.html .

I had no idea.......very interesting.

Quoted 5 lines

but when attempting to do the mlock for larger guests a lot of time is spent bringing each page into cache and clearing/zeron'g it etc.etc.

https://lists.gnu.org/archive/html/qemu-devel/2013-04/msg04161.html

Wow, I didn't know that either. Perhaps this must be causing the entire QEMU process and its threads to seize up.

It may be necessary to run the pinning command *outside* of QEMU's I/O lock in a separate thread if it's really that much overhead.

Thanks a lot for pointing this out.........

Quoted 5 lines

----

Note: The basic tcp based live guest migration in the same qemu version still works fine on the same hosts over a pair of non-RDMA cards 10Gb NICs connected back-to-back.

Acknowledged.

#2 lore raw
Quoted 5 lines · Michael R. Hines

Comments inline. FYI: please CC [email protected],
because it helps me know when to scroll threw the bazillion qemu-devel emails.

I have things separated out into folders and rules, but a direct CC is better =)

Sure will do.

Quoted 24 lines · Chegu Vinod
Quoted 11 lines

Hi Michael,

I picked up the qemu bits from your github branch and gave it a try. (BTW the setup I was given temporary access to has a pair of MLX's IB QDR cards connected back to back via QSFP cables)

Observed a couple of things and wanted to share..perhaps you may be aware of them already or perhaps these are unrelated to your specific changes ? (Note: Still haven't finished the review of your changes ).

a) x-rdma-pin-all off case

Seem to only work sometimes but fails at other times. Here is an example...

Quoted 10 lines

(qemu) rdma: Accepting rdma connection...
rdma: Memory pin all: disabled
rdma: verbs context after listen: 0x555556757d50
rdma: dest_connect Source GID: fe80::2:c903:9:53a5, Dest GID: fe80::2:c903:9:5855
rdma: Accepted migration
qemu-system-x86_64: VQ 1 size 0x100 Guest index 0x4d2 inconsistent with Host ind ex 0x4ec: delta 0xffe6
qemu: warning: error while loading state for instance 0x0 of device 'virtio-net' load of migration failed

Quoted 1 line

Can you give me more details about the configuration of your VM?

The guest is a 10-VCPU/128GB ...and nothing really that fancy with respect to storage or networking.

Hosted on a large Westmere-EX box (target is a similarly configured Westmere-X system). There is a shared SAN disk between the two hosts. Both hosts have 3.9-rc7 kernel that I got at that time from kvm.git tree. The guest was also running the same kernel.

Since I was just trying it out I was not running any workload either.

On the source host the qemu command line :

/usr/local/bin/qemu-system-x86_64 \
-enable-kvm \
-cpu host \
-name vm1 \
-m 131072 -smp 10,sockets=1,cores=10,threads=1 \
-mem-path /dev/hugepages \
-chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/vm1.monitor,server,nowait \
-drive file=/dev/libvirt_lvm3/vm1,if=none,id=drive-virtio-disk0,format=raw,cache=none,aio=native \
-device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x5,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 \
-monitor stdio \
-net nic,model=virtio,macaddr=52:54:00:71:01:01,netdev=nic-0 \
-netdev tap,id=nic-0,ifname=tap0,script=no,downscript=no,vhost=on \
-vnc :4

On the destination host the command line was same as the above with the following additional arg...

-incoming x-rdma:<static private ipaddr of the IB>:<port #>

Quoted 7 lines
Quoted 5 lines

b) x-rdma-pin-all on case :

The guest is not resuming on the target host. i.e. the source host's qemu states that migration is complete but the guest is not responsive anymore... (doesn't seem to have crashed but its stuck somewhere). Have you seen this behavior before ? Any tips on how I could extract additional info ?

Is the QEMU monitor still responsive?

They were responsive.

Quoted 1 line

Can you capture a screenshot of the guest's console to see if there is a panic?

No panic on the guest's console :(

Quoted 2 lines

What kind of storage is attached to the VM?

Simple virtio disk hosted on a SAN disk (see the qemu command line).

Quoted 6 lines
Quoted 4 lines

Besides the list of noted restrictions/issues around having to pin all of guest memory....if the pinning is done as part of starting of the migration it ends up taking noticeably long time for larger guests. Wonder whether that should be counted as part of the total migration time ?.

That's a good question: The pin-all option should not be slowing down your VM to much as the VM should still be running before the migration_thread() actually kicks in and starts the migration.

Well I had hoped that it would not have any serious impacts but it ended up freezing the guest...

Quoted 1 line

I need more information on the configuration of your VM, guest operating system, architecture and so forth.......

Pl. see above.

Quoted 1 line

And similarly as before whether or not QEMU is not responsive or whether or not it's the guest that's panicked.......

Guest just freezes...doesn't panic when this pinning is in progress (i.e. after I set the capability and start the migration) . After the pin'ng completes the guest continues to run and the migration continues...till it "completes" (as per the source host's qemu)...but I never see it resume on the target host.

Quoted 4 lines
Quoted 2 lines

Also the act of pinning all the memory seems to "freeze" the guest. e.g. : For larger enterprise sized guests (say 128GB and higher) the guest is "frozen" is anywhere from nearly a minute (~50seconds) to multiple minutes as the guest size increases...which imo kind of defeats the purpose of live guest migration.

That's bad =) There must be a bug somewhere........ the largest VM I can create on my hardware is ~16GB - so let me give that a try and try to track down the problem.

Ok. Perhaps run a simple test run inside the guest can help observe any scheduling delays even when you are attempting to pin a 16GB guest ?

Quoted 8 lines
Quoted 3 lines

Would like to hear if you have already thought about any other alternatives to address this issue ? for e.g. would it be better to pin all of the guest's memory as part of starting the guest itself ? Yes there are restrictions when we do pinning...but it can help with performance.

For such a large VM, I would definitely recommend pinning because I'm assuming you have enough processors or a large enough application to actually *use* that much memory, which would suggest that even after the bulk phase round of the migration has already completed that your VM is probably going to remain to be pretty busy.

It's just a matter of me tracking down what's causing the freeze and fixing it........ I'll look into it right now on my machine.

Ok

Quoted 8 lines
Quoted 4 lines

---
BTW, a different (yet sort of related) topic... recently a patch went into upstream that provided an option to qemu to mlock all of guest memory :

https://lists.gnu.org/archive/html/qemu-devel/2013-04/msg03947.html .

I had no idea.......very interesting.

Quoted 1 line
Quoted 8 lines
Quoted 4 lines

but when attempting to do the mlock for larger guests a lot of time is spent bringing each page into cache and clearing/zeron'g it etc.etc.

https://lists.gnu.org/archive/html/qemu-devel/2013-04/msg04161.html

Wow, I didn't know that either. Perhaps this must be causing the entire QEMU process and its threads to seize up.

It may be necessary to run the pinning command *outside* of QEMU's I/O lock in a separate thread if it's really that much overhead.

Not really sure if the BQL is causing the freeze...but in general pinning of all memory when the guest is run is perhaps not the best choice for large enterprise class guests...i.e. its better to do it as part of the start of the guest.

Quoted 4 lines

Thanks a lot for pointing this out.........

BTW, A good thing to try out is to see if we can mlock memory of a large guest (i.e. on the source and target qemu's) and migrate the guest using basic TCP over a regular 10Gig NIC.

Thanks,
Vinod

Quoted 9 lines
Quoted 6 lines

----

Note: The basic tcp based live guest migration in the same qemu version still works fine on the same hosts over a pair of non-RDMA cards 10Gb NICs connected back-to-back.

Acknowledged.

#3 lore raw

Some more followup questions below to help me debug before I start digging in.......

On 05/09/2013 06:20 PM, Chegu Vinod wrote:

Setting aside the mlock() freezes for the moment, let's first fix your crashing problem on the destination-side. Let's make that a priority before we fix the mlock problem.

When the migration "completes", can you provide me with more detailed information about the state of QEMU on the destination?

Is it responding?
What's on the VNC console?
Is QEMU responding?
Is the network responding?
Was the VM idle? Or running an application?
Can you attach GDB to QEMU after the migration?

Review

Quoted 6 lines

/usr/local/bin/qemu-system-x86_64 \

(quoted diff) +0 -5
-enable-kvm \
-cpu host \
-name vm1 \
-m 131072 -smp 10,sockets=1,cores=10,threads=1 \
-mem-path /dev/hugepages \

Can you disable hugepages and re-test?

I'll get back to the other mlock() issues later after we at least first make sure the migration itself is working.....

#7 lore raw
In reply to Chegu Vinod

Il 10/05/2013 00:20, Chegu Vinod ha scritto:

Quoted 11 lines
Quoted 6 lines

Wow, I didn't know that either. Perhaps this must be causing the entire QEMU process and its threads to seize up.

It may be necessary to run the pinning command *outside* of QEMU's I/O lock in a separate thread if it's really that much overhead.

Not really sure if the BQL is causing the freeze...but in general pinning of all memory when the guest is run is perhaps not the best choice for large enterprise class guests...i.e. its better to do it as part of the start of the guest.

If pinning is done in the setup phase, it should run outside the BQL.

Paolo

#4 lore raw
In reply to Michael R. Hines

All,

I have successfully performed over 1000+ back-to-back RDMA migrations automatically looped *in a row* using a heavy-weight memory-stress benchmark here at IBM.
Migration success is done by capturing the actual serial console output of the virtual machine while the benchmark is running and redirecting each migration output to a file to verify that the output matches the expected output of a successful migration. For half of the 1000 migrations, I used a 14GB virtual machine size (largest VM I can create) and the remaining 500 migrations I used a 2GB virtual machine (to make sure I was testing both 32-bit and 64-bit address boundaries). The benchmark is configured to have 75% stores and 25% loads and is configured to use 80% of the allocatable free memory of the VM (i.e. no swapping allowed).

I have defined a successful migration per the output file as follows:

1. The memory benchmark is still running and active (CPU near 100% and memory usage is high)
2. There are no kernel panics in the console output (regex keywords "panic", "BUG", "oom", etc...)
3. The VM is still responding to network activity (pings)
4. The console is still responsive by printing periodic messages throughout the life of the VM to the console from inside the VM using the 'write' command in infinite loop.

With this method in a loop, I believe I've ironed out all the regression-testing bugs that I can find. You all may find the following bugs interesting. The original version of this patch was written in 2010 (Before my time @ IBM).

Bug #1: In the original 2010 patch, each write operation uses the same "identifier". (A "Work Request ID" in infiniband terminology).
This is not typical (but allowed by the hardware) - and instead each operation should have its own unique identifier so that the write operation can be tracked properly as it completes.

Bug #2: Also in the original 2010 patch, write operations were grouped into separate "signaled" and "unsignaled" work requests, which is also not typical (but allowed by the hardware). "Signalling" is infiniband terminology which means to activate/deactivate notifying the sender whether or not the RDMA operation has already completed. (Note: the receiver is never notified - which is what a DMA is supposed to be). In normal operation per infiniband specifications, "unsignaled" operations (which indicate to the hardware *not* to notify the sender of completion) are *supposed* to be paired simultaneously with a signaled operation using the *same* work request identifier. Instead, the original patch was using *different* work requests for signaled/unsignaled writes, which means that most of the writes would be transmitted without ever being tracked for completion whatsoever. (Per infinband specifications, signaled and unsignaled writes must be grouped together because the hardware ensures that completion notification is not given until *all* of the writes of the same request have actually completed).

Bug #3: Finally, in the original 2010 patch, ordering was not being handled. Per infiniband specifications, writes can happen completely out of order. Not only that, but PCI-express itself can change the order of the writes as well. It was only until after the first 2 bugs were fixed that I could actually manifest this bug *in code*: What was happening was that a very large group of requests would "burst" from the QEMU migration thread. At which point, not all of the requests would finish. Then a short time later, the next iteration would start and the virtual machine's writable working set was still "hovering" somewhere in the same vicinity of the address space as the previous burst of writes that had not yet completed. When this happens, the new writes were much smaller (not a part of a larger "chunk" per our algorithms). Since the new writes were smaller they would complete faster than the larger, older writes in the same address range. Since they complete out of order, the newer writes would then get clobbered by the older writes - resulting in an inconsistent virtual machine. So, to solve this: during each new write, we now do a "search" to see if the address of the next requested write matches or overlaps with the address range of any of the previous "outstanding" writes that were still in transit, and I found several hits. This was easily solved by blocking until the conflicting write has completed before proceeding to issue a new write to the hardware.

- Michael

Quoted 30 lines · Michael R. Hines

Some more followup questions below to help me debug before I start digging in.......

On 05/09/2013 06:20 PM, Chegu Vinod wrote:

Setting aside the mlock() freezes for the moment, let's first fix your crashing problem on the destination-side. Let's make that a priority before we fix the mlock problem.

When the migration "completes", can you provide me with more detailed information about the state of QEMU on the destination?

Is it responding?
What's on the VNC console?
Is QEMU responding?
Is the network responding?
Was the VM idle? Or running an application?
Can you attach GDB to QEMU after the migration?

Review

Quoted 6 lines

/usr/local/bin/qemu-system-x86_64 \

(quoted diff) +0 -5
-enable-kvm \
-cpu host \
-name vm1 \
-m 131072 -smp 10,sockets=1,cores=10,threads=1 \
-mem-path /dev/hugepages \

Can you disable hugepages and re-test?

I'll get back to the other mlock() issues later after we at least first make sure the migration itself is working.....

#5 lore raw
Quoted 14 lines · Michael R. Hines

All,

I have successfully performed over 1000+ back-to-back RDMA migrations automatically looped *in a row* using a heavy-weight memory-stress benchmark here at IBM.
Migration success is done by capturing the actual serial console output of the virtual machine while the benchmark is running and redirecting each migration output to a file to verify that the output matches the expected output of a successful migration. For half of the 1000 migrations, I used a 14GB virtual machine size (largest VM I can create) and the remaining 500 migrations I used a 2GB virtual machine (to make sure I was testing both 32-bit and 64-bit address boundaries). The benchmark is configured to have 75% stores and 25% loads and is configured to use 80% of the allocatable free memory of the VM (i.e. no swapping allowed).

I have defined a successful migration per the output file as follows:

1. The memory benchmark is still running and active (CPU near 100% and memory usage is high)
2. There are no kernel panics in the console output (regex keywords "panic", "BUG", "oom", etc...)
3. The VM is still responding to network activity (pings)
4. The console is still responsive by printing periodic messages throughout the life of the VM to the console from inside the VM using the 'write' command in infinite loop.

With this method in a loop, I believe I've ironed out all the regression-testing bugs that I can find. You all may find the following bugs interesting. The original version of this patch was written in 2010 (Before my time @ IBM).

Quoted 10 lines

Bug #1: In the original 2010 patch, each write operation uses the same "identifier". (A "Work Request ID" in infiniband terminology).
This is not typical (but allowed by the hardware) - and instead each operation should have its own unique identifier so that the write operation can be tracked properly as it completes.

Bug #2: Also in the original 2010 patch, write operations were grouped into separate "signaled" and "unsignaled" work requests, which is also not typical (but allowed by the hardware). "Signalling" is infiniband terminology which means to activate/deactivate notifying the sender whether or not the RDMA operation has already completed. (Note: the receiver is never notified - which is what a DMA is supposed to be). In normal operation per infiniband specifications, "unsignaled" operations (which indicate to the hardware *not* to notify the sender of completion) are *supposed* to be paired simultaneously with a signaled operation using the *same* work request identifier. Instead, the original patch was using *different* work requests for signaled/unsignaled writes, which means that most of the writes would be transmitted without ever being tracked for completion whatsoever. (Per infinband specifications, signaled and unsignaled writes must be grouped together because the hardware ensures that completion notification is not given until *all* of the writes of the same request have actually completed).

Bug #3: Finally, in the original 2010 patch, ordering was not being handled. Per infiniband specifications, writes can happen completely out of order. Not only that, but PCI-express itself can change the order of the writes as well. It was only until after the first 2 bugs were fixed that I could actually manifest this bug *in code*: What was happening was that a very large group of requests would "burst" from the QEMU migration thread. At which point, not all of the requests would finish. Then a short time later, the next iteration would start and the virtual machine's writable working set was still "hovering" somewhere in the same vicinity of the address space as the previous burst of writes that had not yet completed. When this happens, the new writes were much smaller (not a part of a larger "chunk" per our algorithms). Since the new writes were smaller they would complete faster than the larger, older writes in the same address range. Since they complete out of order, the newer writes would then get clobbered by the older writes - resulting in an inconsistent virtual machine. So, to solve this: during each new write, we now do a "search" to see if the address of the next requested write matches or overlaps with the address range of any of the previous "outstanding" writes that were still in transit, and I found several hits. This was easily solved by blocking until the conflicting write has completed before proceeding to issue a new write to the hardware.

- Michael

Hi Michael,

Got some limited time on the systems so gave your latest bits a quick try today (with the default no pinning) and it seems to be better than before.

Ran a Java warehouse workload where the guest was 85-90% busy...

For both cases
(qemu) migrate_set_speed 40G
(qemu) migrate_set_downtime 2
(qemu) migrate -d x-rdma:<ip>:<port>

...

20VCPU/256G guest

(qemu) info migrate
capabilities: xbzrle: off x-rdma-pin-all: off
Migration status: completed
total time: 106994 milliseconds
downtime: 3795 milliseconds
transferred ram: 15425453 kbytes
throughput: 20418.27 mbps
remaining ram: 0 kbytes
total ram: 268444224 kbytes
duplicate: 64707112 pages
skipped: 0 pages
normal: 3839625 pages
normal bytes: 15358500 kbytes

----

40VCPU/512G guest <- I had more warehouse threads with higher heap size etc. to make the guest busy...and hence it seems to have taken a while to converge.

(qemu) info migrate
capabilities: xbzrle: off x-rdma-pin-all: off
Migration status: completed
total time: 2470056 milliseconds
downtime: 6254 milliseconds
transferred ram: 3230142002 kbytes
throughput: 22118.67 mbps
remaining ram: 0 kbytes
total ram: 536879680 kbytes
duplicate: 127436402 pages
skipped: 0 pages
normal: 807307274 pages
normal bytes: 3229229096 kbytes

<..>

#6 lore raw

OK, this looks excellent. I think we're ready for a PULL request now - I will submit to Juan - I've already got a signed-off from Paolo & Eric. I think we've got sufficient testing now.

I'm expecting to get access to a big machine in the next week or two (256G machine) - and I should be able to reproduce your mlock() delay issue at that time. With such a big VM - I think pinning will help you significantly.

Stay tuned,

- Michael

Quoted 52 lines · Chegu Vinod
Quoted 2 lines

Hi Michael,

Got some limited time on the systems so gave your latest bits a quick try today (with the default no pinning) and it seems to be better than before.

Ran a Java warehouse workload where the guest was 85-90% busy...

For both cases
(qemu) migrate_set_speed 40G
(qemu) migrate_set_downtime 2
(qemu) migrate -d x-rdma:<ip>:<port>

...

20VCPU/256G guest

(qemu) info migrate
capabilities: xbzrle: off x-rdma-pin-all: off
Migration status: completed
total time: 106994 milliseconds
downtime: 3795 milliseconds
transferred ram: 15425453 kbytes
throughput: 20418.27 mbps
remaining ram: 0 kbytes
total ram: 268444224 kbytes
duplicate: 64707112 pages
skipped: 0 pages
normal: 3839625 pages
normal bytes: 15358500 kbytes

----

40VCPU/512G guest <- I had more warehouse threads with higher heap size etc. to make the guest busy...and hence it seems to have taken a while to converge.

(qemu) info migrate
capabilities: xbzrle: off x-rdma-pin-all: off
Migration status: completed
total time: 2470056 milliseconds
downtime: 6254 milliseconds
transferred ram: 3230142002 kbytes
throughput: 22118.67 mbps
remaining ram: 0 kbytes
total ram: 536879680 kbytes
duplicate: 127436402 pages
skipped: 0 pages
normal: 807307274 pages
normal bytes: 3229229096 kbytes

<..>