1 | From: Hyman Huang <yong.huang@smartx.com> | 1 | From: Hyman Huang <yong.huang@smartx.com> |
---|---|---|---|
2 | 2 | ||
3 | Please review, thanks | ||
4 | Yong | ||
5 | |||
6 | v3: | ||
7 | 1. Remove the two redundant assignments in [PATCH v2 2/5] suggested by Daniel | ||
8 | |||
9 | v2: | ||
10 | 1. Update the MAINTAINERS section suggested by Fabiano Rosas | ||
11 | 2. Ensure the dependencies when build the initrd-stress.img suggested by Daniel | ||
12 | 3. Fix some bugs | ||
13 | |||
14 | v1: | ||
3 | The previous patchset: | 15 | The previous patchset: |
4 | https://lore.kernel.org/qemu-devel/cover.1722957352.git.yong.huang@smartx.com/ | 16 | https://lore.kernel.org/qemu-devel/cover.1722957352.git.yong.huang@smartx.com/ |
5 | does not made the necessary changes and tests for the upstream version. | 17 | does not made the necessary changes and tests for the upstream version. |
6 | 18 | ||
7 | This patchset works for that: | 19 | This patchset works for that: |
8 | 1. Move the guestperf to scripts directory suggested by Fabiano Rosas | 20 | 1. Move the guestperf to scripts directory suggested by Fabiano Rosas |
9 | 2. Make initrd-stress.img built by default suggested by Fabiano Rosas | 21 | 2. Make initrd-stress.img built by default suggested by Fabiano Rosas |
10 | 3. Make the necessary changes to adapt the latest multifd behavior | 22 | 3. Make the necessary changes to adapt the latest multifd behavior |
11 | 4. A nitpick for multifd migration | 23 | 4. A nitpick for multifd migration |
12 | 5. Support multifd compression option | 24 | 5. Support multifd compression option |
13 | 25 | ||
14 | Please review, | 26 | Hyman Huang (4): |
15 | |||
16 | Thanks | ||
17 | |||
18 | Yong | ||
19 | |||
20 | Hyman Huang (5): | ||
21 | tests/migration: Move the guestperf tool to scripts directory | ||
22 | tests/migration: Make initrd-stress.img built by default | ||
23 | guestperf: Support deferred migration for multifd | 27 | guestperf: Support deferred migration for multifd |
24 | guestperf: Nitpick the inconsistent parameters | 28 | guestperf: Nitpick the inconsistent parameters |
25 | guestperf: Introduce multifd compression option | 29 | guestperf: Introduce multifd compression option |
30 | guestperf: Add test result data into report | ||
26 | 31 | ||
27 | MAINTAINERS | 5 ++++ | 32 | .../migration-stress/guestperf/comparison.py | 15 ++++++- |
28 | {tests => scripts}/migration/guestperf-batch.py | 0 | 33 | tests/migration-stress/guestperf/engine.py | 43 ++++++++++++++++--- |
29 | {tests => scripts}/migration/guestperf-plot.py | 0 | 34 | tests/migration-stress/guestperf/report.py | 20 +++++++++ |
30 | {tests => scripts}/migration/guestperf.py | 0 | 35 | tests/migration-stress/guestperf/scenario.py | 7 ++- |
31 | {tests => scripts}/migration/guestperf/__init__.py | 0 | 36 | tests/migration-stress/guestperf/shell.py | 3 ++ |
32 | .../migration/guestperf/comparison.py | 15 +++++++++- | 37 | 5 files changed, 79 insertions(+), 9 deletions(-) |
33 | {tests => scripts}/migration/guestperf/engine.py | 32 +++++++++++++++++++--- | ||
34 | {tests => scripts}/migration/guestperf/hardware.py | 0 | ||
35 | {tests => scripts}/migration/guestperf/plot.py | 0 | ||
36 | {tests => scripts}/migration/guestperf/progress.py | 0 | ||
37 | {tests => scripts}/migration/guestperf/report.py | 0 | ||
38 | {tests => scripts}/migration/guestperf/scenario.py | 7 +++-- | ||
39 | {tests => scripts}/migration/guestperf/shell.py | 3 ++ | ||
40 | {tests => scripts}/migration/guestperf/timings.py | 0 | ||
41 | tests/migration/meson.build | 5 ++-- | ||
42 | 15 files changed, 58 insertions(+), 9 deletions(-) | ||
43 | rename {tests => scripts}/migration/guestperf-batch.py (100%) | ||
44 | rename {tests => scripts}/migration/guestperf-plot.py (100%) | ||
45 | rename {tests => scripts}/migration/guestperf.py (100%) | ||
46 | rename {tests => scripts}/migration/guestperf/__init__.py (100%) | ||
47 | rename {tests => scripts}/migration/guestperf/comparison.py (89%) | ||
48 | rename {tests => scripts}/migration/guestperf/engine.py (93%) | ||
49 | rename {tests => scripts}/migration/guestperf/hardware.py (100%) | ||
50 | rename {tests => scripts}/migration/guestperf/plot.py (100%) | ||
51 | rename {tests => scripts}/migration/guestperf/progress.py (100%) | ||
52 | rename {tests => scripts}/migration/guestperf/report.py (100%) | ||
53 | rename {tests => scripts}/migration/guestperf/scenario.py (93%) | ||
54 | rename {tests => scripts}/migration/guestperf/shell.py (98%) | ||
55 | rename {tests => scripts}/migration/guestperf/timings.py (100%) | ||
56 | 38 | ||
57 | -- | 39 | -- |
58 | 2.11.0 | 40 | 2.27.0 | diff view generated by jsdifflib |
Deleted patch | |||
---|---|---|---|
1 | From: Hyman Huang <yong.huang@smartx.com> | ||
2 | 1 | ||
3 | Guestperf was designed to test the performance of migration, | ||
4 | with a loose connection to the fundamental test cases of QEMU. | ||
5 | |||
6 | To improve the repository's structure, move it to the scripts | ||
7 | directory. | ||
8 | |||
9 | Signed-off-by: Hyman Huang <yong.huang@smartx.com> | ||
10 | --- | ||
11 | MAINTAINERS | 5 +++++ | ||
12 | {tests => scripts}/migration/guestperf-batch.py | 0 | ||
13 | {tests => scripts}/migration/guestperf-plot.py | 0 | ||
14 | {tests => scripts}/migration/guestperf.py | 0 | ||
15 | {tests => scripts}/migration/guestperf/__init__.py | 0 | ||
16 | {tests => scripts}/migration/guestperf/comparison.py | 0 | ||
17 | {tests => scripts}/migration/guestperf/engine.py | 0 | ||
18 | {tests => scripts}/migration/guestperf/hardware.py | 0 | ||
19 | {tests => scripts}/migration/guestperf/plot.py | 0 | ||
20 | {tests => scripts}/migration/guestperf/progress.py | 0 | ||
21 | {tests => scripts}/migration/guestperf/report.py | 0 | ||
22 | {tests => scripts}/migration/guestperf/scenario.py | 0 | ||
23 | {tests => scripts}/migration/guestperf/shell.py | 0 | ||
24 | {tests => scripts}/migration/guestperf/timings.py | 0 | ||
25 | 14 files changed, 5 insertions(+) | ||
26 | rename {tests => scripts}/migration/guestperf-batch.py (100%) | ||
27 | rename {tests => scripts}/migration/guestperf-plot.py (100%) | ||
28 | rename {tests => scripts}/migration/guestperf.py (100%) | ||
29 | rename {tests => scripts}/migration/guestperf/__init__.py (100%) | ||
30 | rename {tests => scripts}/migration/guestperf/comparison.py (100%) | ||
31 | rename {tests => scripts}/migration/guestperf/engine.py (100%) | ||
32 | rename {tests => scripts}/migration/guestperf/hardware.py (100%) | ||
33 | rename {tests => scripts}/migration/guestperf/plot.py (100%) | ||
34 | rename {tests => scripts}/migration/guestperf/progress.py (100%) | ||
35 | rename {tests => scripts}/migration/guestperf/report.py (100%) | ||
36 | rename {tests => scripts}/migration/guestperf/scenario.py (100%) | ||
37 | rename {tests => scripts}/migration/guestperf/shell.py (100%) | ||
38 | rename {tests => scripts}/migration/guestperf/timings.py (100%) | ||
39 | |||
40 | diff --git a/MAINTAINERS b/MAINTAINERS | ||
41 | index XXXXXXX..XXXXXXX 100644 | ||
42 | --- a/MAINTAINERS | ||
43 | +++ b/MAINTAINERS | ||
44 | @@ -XXX,XX +XXX,XX @@ F: migration/dirtyrate.h | ||
45 | F: include/sysemu/dirtyrate.h | ||
46 | F: docs/devel/migration/dirty-limit.rst | ||
47 | |||
48 | +Migration performance test tool | ||
49 | +M: Hyman Huang <yong.huang@smartx.com> | ||
50 | +S: Maintained | ||
51 | +F: scripts/migration/ | ||
52 | + | ||
53 | Detached LUKS header | ||
54 | M: Hyman Huang <yong.huang@smartx.com> | ||
55 | S: Maintained | ||
56 | diff --git a/tests/migration/guestperf-batch.py b/scripts/migration/guestperf-batch.py | ||
57 | similarity index 100% | ||
58 | rename from tests/migration/guestperf-batch.py | ||
59 | rename to scripts/migration/guestperf-batch.py | ||
60 | diff --git a/tests/migration/guestperf-plot.py b/scripts/migration/guestperf-plot.py | ||
61 | similarity index 100% | ||
62 | rename from tests/migration/guestperf-plot.py | ||
63 | rename to scripts/migration/guestperf-plot.py | ||
64 | diff --git a/tests/migration/guestperf.py b/scripts/migration/guestperf.py | ||
65 | similarity index 100% | ||
66 | rename from tests/migration/guestperf.py | ||
67 | rename to scripts/migration/guestperf.py | ||
68 | diff --git a/tests/migration/guestperf/__init__.py b/scripts/migration/guestperf/__init__.py | ||
69 | similarity index 100% | ||
70 | rename from tests/migration/guestperf/__init__.py | ||
71 | rename to scripts/migration/guestperf/__init__.py | ||
72 | diff --git a/tests/migration/guestperf/comparison.py b/scripts/migration/guestperf/comparison.py | ||
73 | similarity index 100% | ||
74 | rename from tests/migration/guestperf/comparison.py | ||
75 | rename to scripts/migration/guestperf/comparison.py | ||
76 | diff --git a/tests/migration/guestperf/engine.py b/scripts/migration/guestperf/engine.py | ||
77 | similarity index 100% | ||
78 | rename from tests/migration/guestperf/engine.py | ||
79 | rename to scripts/migration/guestperf/engine.py | ||
80 | diff --git a/tests/migration/guestperf/hardware.py b/scripts/migration/guestperf/hardware.py | ||
81 | similarity index 100% | ||
82 | rename from tests/migration/guestperf/hardware.py | ||
83 | rename to scripts/migration/guestperf/hardware.py | ||
84 | diff --git a/tests/migration/guestperf/plot.py b/scripts/migration/guestperf/plot.py | ||
85 | similarity index 100% | ||
86 | rename from tests/migration/guestperf/plot.py | ||
87 | rename to scripts/migration/guestperf/plot.py | ||
88 | diff --git a/tests/migration/guestperf/progress.py b/scripts/migration/guestperf/progress.py | ||
89 | similarity index 100% | ||
90 | rename from tests/migration/guestperf/progress.py | ||
91 | rename to scripts/migration/guestperf/progress.py | ||
92 | diff --git a/tests/migration/guestperf/report.py b/scripts/migration/guestperf/report.py | ||
93 | similarity index 100% | ||
94 | rename from tests/migration/guestperf/report.py | ||
95 | rename to scripts/migration/guestperf/report.py | ||
96 | diff --git a/tests/migration/guestperf/scenario.py b/scripts/migration/guestperf/scenario.py | ||
97 | similarity index 100% | ||
98 | rename from tests/migration/guestperf/scenario.py | ||
99 | rename to scripts/migration/guestperf/scenario.py | ||
100 | diff --git a/tests/migration/guestperf/shell.py b/scripts/migration/guestperf/shell.py | ||
101 | similarity index 100% | ||
102 | rename from tests/migration/guestperf/shell.py | ||
103 | rename to scripts/migration/guestperf/shell.py | ||
104 | diff --git a/tests/migration/guestperf/timings.py b/scripts/migration/guestperf/timings.py | ||
105 | similarity index 100% | ||
106 | rename from tests/migration/guestperf/timings.py | ||
107 | rename to scripts/migration/guestperf/timings.py | ||
108 | -- | ||
109 | 2.11.0 | diff view generated by jsdifflib |
... | ... | ||
---|---|---|---|
8 | Multifd must be set before incoming starts | 8 | Multifd must be set before incoming starts |
9 | 9 | ||
10 | Supporting deferred migration will fix it. | 10 | Supporting deferred migration will fix it. |
11 | 11 | ||
12 | Signed-off-by: Hyman Huang <yong.huang@smartx.com> | 12 | Signed-off-by: Hyman Huang <yong.huang@smartx.com> |
13 | Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> | ||
13 | --- | 14 | --- |
14 | scripts/migration/guestperf/engine.py | 18 ++++++++++++++---- | 15 | tests/migration-stress/guestperf/engine.py | 19 +++++++++++++++---- |
15 | 1 file changed, 14 insertions(+), 4 deletions(-) | 16 | 1 file changed, 15 insertions(+), 4 deletions(-) |
16 | 17 | ||
17 | diff --git a/scripts/migration/guestperf/engine.py b/scripts/migration/guestperf/engine.py | 18 | diff --git a/tests/migration-stress/guestperf/engine.py b/tests/migration-stress/guestperf/engine.py |
18 | index XXXXXXX..XXXXXXX 100644 | 19 | index XXXXXXX..XXXXXXX 100644 |
19 | --- a/scripts/migration/guestperf/engine.py | 20 | --- a/tests/migration-stress/guestperf/engine.py |
20 | +++ b/scripts/migration/guestperf/engine.py | 21 | +++ b/tests/migration-stress/guestperf/engine.py |
21 | @@ -XXX,XX +XXX,XX @@ def _migrate_progress(self, vm): | 22 | @@ -XXX,XX +XXX,XX @@ def _migrate_progress(self, vm): |
22 | info.get("dirty-limit-ring-full-time", 0), | 23 | info.get("dirty-limit-ring-full-time", 0), |
23 | ) | 24 | ) |
24 | 25 | ||
25 | - def _migrate(self, hardware, scenario, src, dst, connect_uri): | 26 | - def _migrate(self, hardware, scenario, src, dst, connect_uri): |
... | ... | ||
51 | + if defer_migrate: | 52 | + if defer_migrate: |
52 | + return argv + ["-incoming", "defer"] | 53 | + return argv + ["-incoming", "defer"] |
53 | return argv + ["-incoming", uri] | 54 | return argv + ["-incoming", uri] |
54 | 55 | ||
55 | @staticmethod | 56 | @staticmethod |
57 | @@ -XXX,XX +XXX,XX @@ def _get_timings(self, vm): | ||
58 | |||
59 | def run(self, hardware, scenario, result_dir=os.getcwd()): | ||
60 | abs_result_dir = os.path.join(result_dir, scenario._name) | ||
61 | + defer_migrate = False | ||
62 | |||
63 | if self._transport == "tcp": | ||
64 | uri = "tcp:%s:9000" % self._dst_host | ||
56 | @@ -XXX,XX +XXX,XX @@ def run(self, hardware, scenario, result_dir=os.getcwd()): | 65 | @@ -XXX,XX +XXX,XX @@ def run(self, hardware, scenario, result_dir=os.getcwd()): |
57 | except: | 66 | except: |
58 | pass | 67 | pass |
59 | 68 | ||
60 | + if scenario._multifd: | 69 | + if scenario._multifd: |
... | ... | ||
81 | + dst, uri, defer_migrate) | 90 | + dst, uri, defer_migrate) |
82 | progress_history = ret[0] | 91 | progress_history = ret[0] |
83 | qemu_timings = ret[1] | 92 | qemu_timings = ret[1] |
84 | vcpu_timings = ret[2] | 93 | vcpu_timings = ret[2] |
85 | -- | 94 | -- |
86 | 2.11.0 | 95 | 2.27.0 |
96 | |||
97 | diff view generated by jsdifflib |
1 | From: Hyman Huang <yong.huang@smartx.com> | 1 | From: Hyman Huang <yong.huang@smartx.com> |
---|---|---|---|
2 | 2 | ||
3 | Signed-off-by: Hyman Huang <yong.huang@smartx.com> | 3 | Signed-off-by: Hyman Huang <yong.huang@smartx.com> |
4 | Reviewed-by: Fabiano Rosas <farosas@suse.de> | 4 | Reviewed-by: Fabiano Rosas <farosas@suse.de> |
5 | Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> | ||
5 | --- | 6 | --- |
6 | scripts/migration/guestperf/comparison.py | 2 +- | 7 | tests/migration-stress/guestperf/comparison.py | 2 +- |
7 | 1 file changed, 1 insertion(+), 1 deletion(-) | 8 | 1 file changed, 1 insertion(+), 1 deletion(-) |
8 | 9 | ||
9 | diff --git a/scripts/migration/guestperf/comparison.py b/scripts/migration/guestperf/comparison.py | 10 | diff --git a/tests/migration-stress/guestperf/comparison.py b/tests/migration-stress/guestperf/comparison.py |
10 | index XXXXXXX..XXXXXXX 100644 | 11 | index XXXXXXX..XXXXXXX 100644 |
11 | --- a/scripts/migration/guestperf/comparison.py | 12 | --- a/tests/migration-stress/guestperf/comparison.py |
12 | +++ b/scripts/migration/guestperf/comparison.py | 13 | +++ b/tests/migration-stress/guestperf/comparison.py |
13 | @@ -XXX,XX +XXX,XX @@ def __init__(self, name, scenarios): | 14 | @@ -XXX,XX +XXX,XX @@ def __init__(self, name, scenarios): |
14 | # varying numbers of channels | 15 | # varying numbers of channels |
15 | Comparison("compr-multifd", scenarios = [ | 16 | Comparison("compr-multifd", scenarios = [ |
16 | Scenario("compr-multifd-channels-4", | 17 | Scenario("compr-multifd-channels-4", |
17 | - multifd=True, multifd_channels=2), | 18 | - multifd=True, multifd_channels=2), |
18 | + multifd=True, multifd_channels=4), | 19 | + multifd=True, multifd_channels=4), |
19 | Scenario("compr-multifd-channels-8", | 20 | Scenario("compr-multifd-channels-8", |
20 | multifd=True, multifd_channels=8), | 21 | multifd=True, multifd_channels=8), |
21 | Scenario("compr-multifd-channels-32", | 22 | Scenario("compr-multifd-channels-32", |
22 | -- | 23 | -- |
23 | 2.11.0 | 24 | 2.27.0 |
25 | |||
26 | diff view generated by jsdifflib |
... | ... | ||
---|---|---|---|
8 | Multifd support 4 compression algorithms currently: | 8 | Multifd support 4 compression algorithms currently: |
9 | zlib, zstd, qpl, uadk | 9 | zlib, zstd, qpl, uadk |
10 | 10 | ||
11 | To request that multifd with the specified compression | 11 | To request that multifd with the specified compression |
12 | algorithm such as zlib: | 12 | algorithm such as zlib: |
13 | $ ./scripts/migration/guestperf.py \ | 13 | $ ./tests/migration-stress/guestperf.py \ |
14 | --multifd --multifd-channels 4 --multifd-compression zlib \ | 14 | --multifd --multifd-channels 4 --multifd-compression zlib \ |
15 | --output output.json | 15 | --output output.json |
16 | 16 | ||
17 | To run the entire standardized set of multifd compression | 17 | To run the entire standardized set of multifd compression |
18 | comparisons, with unix migration: | 18 | comparisons, with unix migration: |
19 | $ ./scripts/migration/guestperf-batch.py \ | 19 | $ ./tests/migration-stress/guestperf-batch.py \ |
20 | --dst-host localhost --transport unix \ | 20 | --dst-host localhost --transport unix \ |
21 | --filter compr-multifd-compression* --output outputdir | 21 | --filter compr-multifd-compression* --output outputdir |
22 | 22 | ||
23 | Signed-off-by: Hyman Huang <yong.huang@smartx.com> | 23 | Signed-off-by: Hyman Huang <yong.huang@smartx.com> |
24 | Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> | ||
24 | --- | 25 | --- |
25 | scripts/migration/guestperf/comparison.py | 13 +++++++++++++ | 26 | tests/migration-stress/guestperf/comparison.py | 13 +++++++++++++ |
26 | scripts/migration/guestperf/engine.py | 14 ++++++++++++++ | 27 | tests/migration-stress/guestperf/engine.py | 14 ++++++++++++++ |
27 | scripts/migration/guestperf/scenario.py | 7 +++++-- | 28 | tests/migration-stress/guestperf/scenario.py | 7 +++++-- |
28 | scripts/migration/guestperf/shell.py | 3 +++ | 29 | tests/migration-stress/guestperf/shell.py | 3 +++ |
29 | 4 files changed, 35 insertions(+), 2 deletions(-) | 30 | 4 files changed, 35 insertions(+), 2 deletions(-) |
30 | 31 | ||
31 | diff --git a/scripts/migration/guestperf/comparison.py b/scripts/migration/guestperf/comparison.py | 32 | diff --git a/tests/migration-stress/guestperf/comparison.py b/tests/migration-stress/guestperf/comparison.py |
32 | index XXXXXXX..XXXXXXX 100644 | 33 | index XXXXXXX..XXXXXXX 100644 |
33 | --- a/scripts/migration/guestperf/comparison.py | 34 | --- a/tests/migration-stress/guestperf/comparison.py |
34 | +++ b/scripts/migration/guestperf/comparison.py | 35 | +++ b/tests/migration-stress/guestperf/comparison.py |
35 | @@ -XXX,XX +XXX,XX @@ def __init__(self, name, scenarios): | 36 | @@ -XXX,XX +XXX,XX @@ def __init__(self, name, scenarios): |
36 | Scenario("compr-dirty-limit-50MB", | 37 | Scenario("compr-dirty-limit-50MB", |
37 | dirty_limit=True, vcpu_dirty_limit=50), | 38 | dirty_limit=True, vcpu_dirty_limit=50), |
38 | ]), | 39 | ]), |
39 | + | 40 | + |
40 | + # Looking at effect of multifd with | 41 | + # Looking at effect of multifd with |
41 | + # different compression algorithms | 42 | + # different compression algorithms |
42 | + Comparison("compr-multifd-compression", scenarios = [ | 43 | + Comparison("compr-multifd-compression", scenarios = [ |
43 | + Scenario("compr-multifd-compression-zlib", | 44 | + Scenario("compr-multifd-compression-zlib", |
44 | + multifd=True, multifd_channels=4, multifd_compression="zlib"), | 45 | + multifd=True, multifd_channels=2, multifd_compression="zlib"), |
45 | + Scenario("compr-multifd-compression-zstd", | 46 | + Scenario("compr-multifd-compression-zstd", |
46 | + multifd=True, multifd_channels=4, multifd_compression="zstd"), | 47 | + multifd=True, multifd_channels=2, multifd_compression="zstd"), |
47 | + Scenario("compr-multifd-compression-qpl", | 48 | + Scenario("compr-multifd-compression-qpl", |
48 | + multifd=True, multifd_channels=4, multifd_compression="qpl"), | 49 | + multifd=True, multifd_channels=2, multifd_compression="qpl"), |
49 | + Scenario("compr-multifd-compression-uadk", | 50 | + Scenario("compr-multifd-compression-uadk", |
50 | + multifd=True, multifd_channels=4, multifd_compression="uadk"), | 51 | + multifd=True, multifd_channels=2, multifd_compression="uadk"), |
51 | + ]), | 52 | + ]), |
52 | ] | 53 | ] |
53 | diff --git a/scripts/migration/guestperf/engine.py b/scripts/migration/guestperf/engine.py | 54 | diff --git a/tests/migration-stress/guestperf/engine.py b/tests/migration-stress/guestperf/engine.py |
54 | index XXXXXXX..XXXXXXX 100644 | 55 | index XXXXXXX..XXXXXXX 100644 |
55 | --- a/scripts/migration/guestperf/engine.py | 56 | --- a/tests/migration-stress/guestperf/engine.py |
56 | +++ b/scripts/migration/guestperf/engine.py | 57 | +++ b/tests/migration-stress/guestperf/engine.py |
57 | @@ -XXX,XX +XXX,XX @@ | 58 | @@ -XXX,XX +XXX,XX @@ |
58 | '..', '..', '..', 'python')) | 59 | '..', '..', '..', 'python')) |
59 | from qemu.machine import QEMUMachine | 60 | from qemu.machine import QEMUMachine |
60 | 61 | ||
61 | +# multifd supported compression algorithms | 62 | +# multifd supported compression algorithms |
... | ... | ||
87 | + multifd_compression=scenario._multifd_compression) | 88 | + multifd_compression=scenario._multifd_compression) |
88 | + | 89 | + |
89 | if scenario._dirty_limit: | 90 | if scenario._dirty_limit: |
90 | if not hardware._dirty_ring_size: | 91 | if not hardware._dirty_ring_size: |
91 | raise Exception("dirty ring size must be configured when " | 92 | raise Exception("dirty ring size must be configured when " |
92 | diff --git a/scripts/migration/guestperf/scenario.py b/scripts/migration/guestperf/scenario.py | 93 | diff --git a/tests/migration-stress/guestperf/scenario.py b/tests/migration-stress/guestperf/scenario.py |
93 | index XXXXXXX..XXXXXXX 100644 | 94 | index XXXXXXX..XXXXXXX 100644 |
94 | --- a/scripts/migration/guestperf/scenario.py | 95 | --- a/tests/migration-stress/guestperf/scenario.py |
95 | +++ b/scripts/migration/guestperf/scenario.py | 96 | +++ b/tests/migration-stress/guestperf/scenario.py |
96 | @@ -XXX,XX +XXX,XX @@ def __init__(self, name, | 97 | @@ -XXX,XX +XXX,XX @@ def __init__(self, name, |
97 | auto_converge=False, auto_converge_step=10, | 98 | auto_converge=False, auto_converge_step=10, |
98 | compression_mt=False, compression_mt_threads=1, | 99 | compression_mt=False, compression_mt_threads=1, |
99 | compression_xbzrle=False, compression_xbzrle_cache=10, | 100 | compression_xbzrle=False, compression_xbzrle_cache=10, |
100 | - multifd=False, multifd_channels=2, | 101 | - multifd=False, multifd_channels=2, |
... | ... | ||
123 | data["compression_xbzrle_cache"], | 124 | data["compression_xbzrle_cache"], |
124 | data["multifd"], | 125 | data["multifd"], |
125 | - data["multifd_channels"]) | 126 | - data["multifd_channels"]) |
126 | + data["multifd_channels"], | 127 | + data["multifd_channels"], |
127 | + data["multifd_compression"]) | 128 | + data["multifd_compression"]) |
128 | diff --git a/scripts/migration/guestperf/shell.py b/scripts/migration/guestperf/shell.py | 129 | diff --git a/tests/migration-stress/guestperf/shell.py b/tests/migration-stress/guestperf/shell.py |
129 | index XXXXXXX..XXXXXXX 100644 | 130 | index XXXXXXX..XXXXXXX 100644 |
130 | --- a/scripts/migration/guestperf/shell.py | 131 | --- a/tests/migration-stress/guestperf/shell.py |
131 | +++ b/scripts/migration/guestperf/shell.py | 132 | +++ b/tests/migration-stress/guestperf/shell.py |
132 | @@ -XXX,XX +XXX,XX @@ def __init__(self): | 133 | @@ -XXX,XX +XXX,XX @@ def __init__(self): |
133 | action="store_true") | 134 | action="store_true") |
134 | parser.add_argument("--multifd-channels", dest="multifd_channels", | 135 | parser.add_argument("--multifd-channels", dest="multifd_channels", |
135 | default=2, type=int) | 136 | default=2, type=int) |
136 | + parser.add_argument("--multifd-compression", dest="multifd_compression", | 137 | + parser.add_argument("--multifd-compression", dest="multifd_compression", |
... | ... | ||
145 | + multifd_compression=args.multifd_compression, | 146 | + multifd_compression=args.multifd_compression, |
146 | 147 | ||
147 | dirty_limit=args.dirty_limit, | 148 | dirty_limit=args.dirty_limit, |
148 | x_vcpu_dirty_limit_period=\ | 149 | x_vcpu_dirty_limit_period=\ |
149 | -- | 150 | -- |
150 | 2.11.0 | 151 | 2.27.0 |
152 | |||
153 | diff view generated by jsdifflib |
1 | From: Hyman Huang <yong.huang@smartx.com> | 1 | From: Hyman Huang <yong.huang@smartx.com> |
---|---|---|---|
2 | 2 | ||
3 | The initrd-stress.img was compiled by specifying the | 3 | The migration result data is not included in the guestperf |
4 | target, to make it easier for developers to play the | 4 | report information; include the result as a report entry |
5 | guestperf tool, make it built by default. | 5 | so the developer can check whether the migration was successful |
6 | after running guestperf. | ||
6 | 7 | ||
7 | Signed-off-by: Hyman Huang <yong.huang@smartx.com> | 8 | Signed-off-by: Hyman Huang <yong.huang@smartx.com> |
8 | --- | 9 | --- |
9 | tests/migration/meson.build | 5 +++-- | 10 | tests/migration-stress/guestperf/engine.py | 10 ++++++++-- |
10 | 1 file changed, 3 insertions(+), 2 deletions(-) | 11 | tests/migration-stress/guestperf/report.py | 20 ++++++++++++++++++++ |
12 | 2 files changed, 28 insertions(+), 2 deletions(-) | ||
11 | 13 | ||
12 | diff --git a/tests/migration/meson.build b/tests/migration/meson.build | 14 | diff --git a/tests/migration-stress/guestperf/engine.py b/tests/migration-stress/guestperf/engine.py |
13 | index XXXXXXX..XXXXXXX 100644 | 15 | index XXXXXXX..XXXXXXX 100644 |
14 | --- a/tests/migration/meson.build | 16 | --- a/tests/migration-stress/guestperf/engine.py |
15 | +++ b/tests/migration/meson.build | 17 | +++ b/tests/migration-stress/guestperf/engine.py |
16 | @@ -XXX,XX +XXX,XX @@ stress = executable( | 18 | @@ -XXX,XX +XXX,XX @@ |
17 | files('stress.c'), | 19 | import time |
18 | dependencies: [glib_static, sysprof], | 20 | |
19 | link_args: ['-static'], | 21 | from guestperf.progress import Progress, ProgressStats |
20 | - build_by_default: false, | 22 | -from guestperf.report import Report |
21 | + build_by_default: true, | 23 | +from guestperf.report import Report, ReportResult |
22 | ) | 24 | from guestperf.timings import TimingRecord, Timings |
23 | 25 | ||
24 | custom_target( | 26 | sys.path.append(os.path.join(os.path.dirname(__file__), |
25 | 'initrd-stress.img', | 27 | @@ -XXX,XX +XXX,XX @@ def _migrate(self, hardware, scenario, src, |
26 | output: 'initrd-stress.img', | 28 | src_vcpu_time.extend(self._vcpu_timing(src_pid, src_threads)) |
27 | input: stress, | 29 | sleep_secs -= 1 |
28 | - command: [find_program('initrd-stress.sh'), '@OUTPUT@', '@INPUT@'] | 30 | |
29 | + command: [find_program('initrd-stress.sh'), '@OUTPUT@', '@INPUT@'], | 31 | - return [progress_history, src_qemu_time, src_vcpu_time] |
30 | + build_by_default: true, | 32 | + result = ReportResult() |
31 | ) | 33 | + if progress._status == "completed" and not paused: |
34 | + result = ReportResult(True) | ||
35 | + | ||
36 | + return [progress_history, src_qemu_time, src_vcpu_time, result] | ||
37 | |||
38 | if self._verbose and (loop % 20) == 0: | ||
39 | print("Iter %d: remain %5dMB of %5dMB (total %5dMB @ %5dMb/sec)" % ( | ||
40 | @@ -XXX,XX +XXX,XX @@ def run(self, hardware, scenario, result_dir=os.getcwd()): | ||
41 | progress_history = ret[0] | ||
42 | qemu_timings = ret[1] | ||
43 | vcpu_timings = ret[2] | ||
44 | + result = ret[3] | ||
45 | if uri[0:5] == "unix:" and os.path.exists(uri[5:]): | ||
46 | os.remove(uri[5:]) | ||
47 | |||
48 | @@ -XXX,XX +XXX,XX @@ def run(self, hardware, scenario, result_dir=os.getcwd()): | ||
49 | Timings(self._get_timings(src) + self._get_timings(dst)), | ||
50 | Timings(qemu_timings), | ||
51 | Timings(vcpu_timings), | ||
52 | + result, | ||
53 | self._binary, self._dst_host, self._kernel, | ||
54 | self._initrd, self._transport, self._sleep) | ||
55 | except Exception as e: | ||
56 | diff --git a/tests/migration-stress/guestperf/report.py b/tests/migration-stress/guestperf/report.py | ||
57 | index XXXXXXX..XXXXXXX 100644 | ||
58 | --- a/tests/migration-stress/guestperf/report.py | ||
59 | +++ b/tests/migration-stress/guestperf/report.py | ||
60 | @@ -XXX,XX +XXX,XX @@ | ||
61 | from guestperf.progress import Progress | ||
62 | from guestperf.timings import Timings | ||
63 | |||
64 | +class ReportResult(object): | ||
65 | + | ||
66 | + def __init__(self, success=False): | ||
67 | + self._success = success | ||
68 | + | ||
69 | + def serialize(self): | ||
70 | + return { | ||
71 | + "success": self._success, | ||
72 | + } | ||
73 | + | ||
74 | + @classmethod | ||
75 | + def deserialize(cls, data): | ||
76 | + return cls( | ||
77 | + data["success"]) | ||
78 | + | ||
79 | + | ||
80 | class Report(object): | ||
81 | |||
82 | def __init__(self, | ||
83 | @@ -XXX,XX +XXX,XX @@ def __init__(self, | ||
84 | guest_timings, | ||
85 | qemu_timings, | ||
86 | vcpu_timings, | ||
87 | + result, | ||
88 | binary, | ||
89 | dst_host, | ||
90 | kernel, | ||
91 | @@ -XXX,XX +XXX,XX @@ def __init__(self, | ||
92 | self._guest_timings = guest_timings | ||
93 | self._qemu_timings = qemu_timings | ||
94 | self._vcpu_timings = vcpu_timings | ||
95 | + self._result = result | ||
96 | self._binary = binary | ||
97 | self._dst_host = dst_host | ||
98 | self._kernel = kernel | ||
99 | @@ -XXX,XX +XXX,XX @@ def serialize(self): | ||
100 | "guest_timings": self._guest_timings.serialize(), | ||
101 | "qemu_timings": self._qemu_timings.serialize(), | ||
102 | "vcpu_timings": self._vcpu_timings.serialize(), | ||
103 | + "result": self._result.serialize(), | ||
104 | "binary": self._binary, | ||
105 | "dst_host": self._dst_host, | ||
106 | "kernel": self._kernel, | ||
107 | @@ -XXX,XX +XXX,XX @@ def deserialize(cls, data): | ||
108 | Timings.deserialize(data["guest_timings"]), | ||
109 | Timings.deserialize(data["qemu_timings"]), | ||
110 | Timings.deserialize(data["vcpu_timings"]), | ||
111 | + ReportResult.deserialize(data["result"]), | ||
112 | data["binary"], | ||
113 | data["dst_host"], | ||
114 | data["kernel"], | ||
32 | -- | 115 | -- |
33 | 2.11.0 | 116 | 2.27.0 | diff view generated by jsdifflib |