All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC 0/6] migration: introduce dirtylimit capability
@ 2022-05-17  6:35 huangy81
  2022-05-17  6:35 ` [RFC 1/6] qapi/migration: Introduce vcpu-dirtylimit-period parameters huangy81
                   ` (5 more replies)
  0 siblings, 6 replies; 11+ messages in thread
From: huangy81 @ 2022-05-17  6:35 UTC (permalink / raw)
  To: qemu-devel
  Cc: Dr. David Alan Gilbert, Juan Quintela, Eric Blake,
	Markus Armbruster, Thomas Huth, Laurent Vivier, Paolo Bonzini,
	Hyman Huang

From: Hyman Huang(黄勇) <huangy81@chinatelecom.cn>

Abstract
========

This series added a new migration capability called "dirtylimit".  It can
be enabled when dirty ring is enabled, and it'll improve the vCPU performance
during the process of migration. It is based on the previous patchset:
https://lore.kernel.org/qemu-devel/cover.1648748793.git.huangy81@chinatelecom.cn/

As mentioned in patchset "support dirty restraint on vCPU", dirtylimit way of
migration can make the read-process not be penalized. This series wires up the
vcpu dirty limit and wrappers as dirtylimit capability of migration. I introduce
two parameters vcpu-dirtylimit-period and vcpu-dirtylimit to implement the setup 
of dirtylimit during live migration.

To validate the implementation, i tested a 32 vCPU vm live migration with such 
model:
Only dirty vcpu0, vcpu1 with heavy memory workoad and leave the rest vcpus
untouched, running unixbench on the vpcu8-vcpu15 by setup the cpu affinity as
the following command:
taskset -c 8-15 ./Run -i 2 -c 8 {unixbench test item}

The following are results:

host cpu: Intel(R) Xeon(R) Platinum 8378A
host interface speed: 1000Mb/s
  |---------------------+--------+------------+---------------|
  | UnixBench test item | Normal | Dirtylimit | Auto-converge |
  |---------------------+--------+------------+---------------|
  | dhry2reg            | 32800  | 32786      | 25292         |
  | whetstone-double    | 10326  | 10315      | 9847          |
  | pipe                | 15442  | 15271      | 14506         |
  | context1            | 7260   | 6235       | 4514          |
  | spawn               | 3663   | 3317       | 3249          |
  | syscall             | 4669   | 4667       | 3841          |
  |---------------------+--------+------------+---------------|
From the data above we can draw a conclusion that vcpus that do not dirty memory
in vm are almost unaffected during the dirtylimit migration, but the auto converge
way does. 

I also tested the total time of dirtylimit migration with variable dirty memory
size in vm.

senario 1:
host cpu: Intel(R) Xeon(R) Platinum 8378A
host interface speed: 1000Mb/s
  |-----------------------+----------------+-------------------|
  | dirty memory size(MB) | Dirtylimit(ms) | Auto-converge(ms) |
  |-----------------------+----------------+-------------------|
  | 60                    | 2014           | 2131              |
  | 70                    | 5381           | 12590             |
  | 90                    | 6037           | 33545             |
  | 110                   | 7660           | [*]               |
  |-----------------------+----------------+-------------------|
  [*]: This case means migration is not convergent. 

senario 2:
host cpu: Intel(R) Xeon(R) CPU E5-2650
host interface speed: 10000Mb/s
  |-----------------------+----------------+-------------------|
  | dirty memory size(MB) | Dirtylimit(ms) | Auto-converge(ms) |
  |-----------------------+----------------+-------------------|
  | 1600                  | 15842          | 27548             |
  | 2000                  | 19026          | 38447             |
  | 2400                  | 19897          | 46381             |
  | 2800                  | 22338          | 57149             |
  |-----------------------+----------------+-------------------|
Above data shows that dirtylimit way of migration can also reduce the total
time of migration and it achieves convergence more easily in some case.

Since the dependent patchset has not been merged yet, i post the series in the
the following link if anyone want to have a try, once the depenent patchset is
ready and merged, the dirtylimit can be availiable by patching series:
https://github.com/newfriday/qemu/tree/dirtylimit_cap_v1

This series is for RFC, comments and reviews about the API, code logic,
algo implementation or anything else are welcomed and appreciated

Please review, thanks !

Yong 

Hyman Huang (6):
  qapi/migration: Introduce vcpu-dirtylimit-period parameters
  qapi/migration: Introduce vcpu-dirtylimit parameters
  migration: Implement dirtylimit convergence algo
  migration: Introduce dirtylimit capability
  migration: Add dirtylimit data into migration info
  tests: Add migration dirtylimit capability test

 include/sysemu/dirtylimit.h  |  2 +
 migration/migration.c        | 48 ++++++++++++++++++++++++
 migration/migration.h        |  1 +
 migration/ram.c              | 53 +++++++++++++++++++-------
 migration/trace-events       |  1 +
 monitor/hmp-cmds.c           | 15 ++++++++
 qapi/migration.json          | 47 ++++++++++++++++++++---
 softmmu/dirtylimit.c         | 33 +++++++++++++++-
 tests/qtest/migration-test.c | 89 ++++++++++++++++++++++++++++++++++++++++++++
 9 files changed, 269 insertions(+), 20 deletions(-)

-- 
1.8.3.1



^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2022-05-19  3:07 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-17  6:35 [RFC 0/6] migration: introduce dirtylimit capability huangy81
2022-05-17  6:35 ` [RFC 1/6] qapi/migration: Introduce vcpu-dirtylimit-period parameters huangy81
2022-05-18 15:05   ` Eric Blake
2022-05-19  3:05     ` Hyman Huang
2022-05-17  6:35 ` [RFC 2/6] qapi/migration: Introduce vcpu-dirtylimit parameters huangy81
2022-05-18 15:06   ` Eric Blake
2022-05-17  6:35 ` [RFC 3/6] migration: Implement dirtylimit convergence algo huangy81
2022-05-17  6:35 ` [RFC 4/6] migration: Introduce dirtylimit capability huangy81
2022-05-18 15:20   ` Eric Blake
2022-05-17  6:35 ` [RFC 5/6] migration: Add dirtylimit data into migration info huangy81
2022-05-17  6:35 ` [RFC 6/6] tests: Add migration dirtylimit capability test huangy81

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.