xref: /openbmc/qemu/tests/migration/guestperf/comparison.py (revision f3604191e296da90feb1b0bb24e986bc016809a8)
1409437e1SDaniel P. Berrange#
2409437e1SDaniel P. Berrange# Migration test scenario comparison mapping
3409437e1SDaniel P. Berrange#
4409437e1SDaniel P. Berrange# Copyright (c) 2016 Red Hat, Inc.
5409437e1SDaniel P. Berrange#
6409437e1SDaniel P. Berrange# This library is free software; you can redistribute it and/or
7409437e1SDaniel P. Berrange# modify it under the terms of the GNU Lesser General Public
8409437e1SDaniel P. Berrange# License as published by the Free Software Foundation; either
93a645d36SGan Qixin# version 2.1 of the License, or (at your option) any later version.
10409437e1SDaniel P. Berrange#
11409437e1SDaniel P. Berrange# This library is distributed in the hope that it will be useful,
12409437e1SDaniel P. Berrange# but WITHOUT ANY WARRANTY; without even the implied warranty of
13409437e1SDaniel P. Berrange# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14409437e1SDaniel P. Berrange# Lesser General Public License for more details.
15409437e1SDaniel P. Berrange#
16409437e1SDaniel P. Berrange# You should have received a copy of the GNU Lesser General Public
17409437e1SDaniel P. Berrange# License along with this library; if not, see <http://www.gnu.org/licenses/>.
18409437e1SDaniel P. Berrange#
19409437e1SDaniel P. Berrange
20409437e1SDaniel P. Berrangefrom guestperf.scenario import Scenario
21409437e1SDaniel P. Berrange
22409437e1SDaniel P. Berrangeclass Comparison(object):
23409437e1SDaniel P. Berrange    def __init__(self, name, scenarios):
24409437e1SDaniel P. Berrange        self._name = name
25409437e1SDaniel P. Berrange        self._scenarios = scenarios
26409437e1SDaniel P. Berrange
27409437e1SDaniel P. BerrangeCOMPARISONS = [
28409437e1SDaniel P. Berrange    # Looking at effect of pausing guest during migration
29409437e1SDaniel P. Berrange    # at various stages of iteration over RAM
30409437e1SDaniel P. Berrange    Comparison("pause-iters", scenarios = [
31409437e1SDaniel P. Berrange        Scenario("pause-iters-0",
32409437e1SDaniel P. Berrange                 pause=True, pause_iters=0),
33409437e1SDaniel P. Berrange        Scenario("pause-iters-1",
34409437e1SDaniel P. Berrange                 pause=True, pause_iters=1),
35409437e1SDaniel P. Berrange        Scenario("pause-iters-5",
36409437e1SDaniel P. Berrange                 pause=True, pause_iters=5),
37409437e1SDaniel P. Berrange        Scenario("pause-iters-20",
38409437e1SDaniel P. Berrange                 pause=True, pause_iters=20),
39409437e1SDaniel P. Berrange    ]),
40409437e1SDaniel P. Berrange
41409437e1SDaniel P. Berrange
42409437e1SDaniel P. Berrange    # Looking at use of post-copy in relation to bandwidth
43409437e1SDaniel P. Berrange    # available for migration
44409437e1SDaniel P. Berrange    Comparison("post-copy-bandwidth", scenarios = [
45409437e1SDaniel P. Berrange        Scenario("post-copy-bw-100mbs",
46409437e1SDaniel P. Berrange                 post_copy=True, bandwidth=12),
47409437e1SDaniel P. Berrange        Scenario("post-copy-bw-300mbs",
48409437e1SDaniel P. Berrange                 post_copy=True, bandwidth=37),
49409437e1SDaniel P. Berrange        Scenario("post-copy-bw-1gbs",
50409437e1SDaniel P. Berrange                 post_copy=True, bandwidth=125),
51409437e1SDaniel P. Berrange        Scenario("post-copy-bw-10gbs",
52409437e1SDaniel P. Berrange                 post_copy=True, bandwidth=1250),
53409437e1SDaniel P. Berrange        Scenario("post-copy-bw-100gbs",
54409437e1SDaniel P. Berrange                 post_copy=True, bandwidth=12500),
55409437e1SDaniel P. Berrange    ]),
56409437e1SDaniel P. Berrange
57409437e1SDaniel P. Berrange
58409437e1SDaniel P. Berrange    # Looking at effect of starting post-copy at different
59409437e1SDaniel P. Berrange    # stages of the migration
60409437e1SDaniel P. Berrange    Comparison("post-copy-iters", scenarios = [
61409437e1SDaniel P. Berrange        Scenario("post-copy-iters-0",
62409437e1SDaniel P. Berrange                 post_copy=True, post_copy_iters=0),
63409437e1SDaniel P. Berrange        Scenario("post-copy-iters-1",
64409437e1SDaniel P. Berrange                 post_copy=True, post_copy_iters=1),
65409437e1SDaniel P. Berrange        Scenario("post-copy-iters-5",
66409437e1SDaniel P. Berrange                 post_copy=True, post_copy_iters=5),
67409437e1SDaniel P. Berrange        Scenario("post-copy-iters-20",
68409437e1SDaniel P. Berrange                 post_copy=True, post_copy_iters=20),
69409437e1SDaniel P. Berrange    ]),
70409437e1SDaniel P. Berrange
71409437e1SDaniel P. Berrange
72409437e1SDaniel P. Berrange    # Looking at effect of auto-converge with different
73409437e1SDaniel P. Berrange    # throttling percentage step rates
74409437e1SDaniel P. Berrange    Comparison("auto-converge-iters", scenarios = [
75409437e1SDaniel P. Berrange        Scenario("auto-converge-step-5",
76409437e1SDaniel P. Berrange                 auto_converge=True, auto_converge_step=5),
77409437e1SDaniel P. Berrange        Scenario("auto-converge-step-10",
78409437e1SDaniel P. Berrange                 auto_converge=True, auto_converge_step=10),
79409437e1SDaniel P. Berrange        Scenario("auto-converge-step-20",
80409437e1SDaniel P. Berrange                 auto_converge=True, auto_converge_step=20),
81409437e1SDaniel P. Berrange    ]),
82409437e1SDaniel P. Berrange
83409437e1SDaniel P. Berrange
84409437e1SDaniel P. Berrange    # Looking at use of auto-converge in relation to bandwidth
85409437e1SDaniel P. Berrange    # available for migration
86409437e1SDaniel P. Berrange    Comparison("auto-converge-bandwidth", scenarios = [
87409437e1SDaniel P. Berrange        Scenario("auto-converge-bw-100mbs",
88409437e1SDaniel P. Berrange                 auto_converge=True, bandwidth=12),
89409437e1SDaniel P. Berrange        Scenario("auto-converge-bw-300mbs",
90409437e1SDaniel P. Berrange                 auto_converge=True, bandwidth=37),
91409437e1SDaniel P. Berrange        Scenario("auto-converge-bw-1gbs",
92409437e1SDaniel P. Berrange                 auto_converge=True, bandwidth=125),
93409437e1SDaniel P. Berrange        Scenario("auto-converge-bw-10gbs",
94409437e1SDaniel P. Berrange                 auto_converge=True, bandwidth=1250),
95409437e1SDaniel P. Berrange        Scenario("auto-converge-bw-100gbs",
96409437e1SDaniel P. Berrange                 auto_converge=True, bandwidth=12500),
97409437e1SDaniel P. Berrange    ]),
98409437e1SDaniel P. Berrange
99409437e1SDaniel P. Berrange
100409437e1SDaniel P. Berrange    # Looking at effect of multi-thread compression with
101409437e1SDaniel P. Berrange    # varying numbers of threads
102409437e1SDaniel P. Berrange    Comparison("compr-mt", scenarios = [
103409437e1SDaniel P. Berrange        Scenario("compr-mt-threads-1",
104409437e1SDaniel P. Berrange                 compression_mt=True, compression_mt_threads=1),
105409437e1SDaniel P. Berrange        Scenario("compr-mt-threads-2",
106409437e1SDaniel P. Berrange                 compression_mt=True, compression_mt_threads=2),
107409437e1SDaniel P. Berrange        Scenario("compr-mt-threads-4",
108409437e1SDaniel P. Berrange                 compression_mt=True, compression_mt_threads=4),
109409437e1SDaniel P. Berrange    ]),
110409437e1SDaniel P. Berrange
111409437e1SDaniel P. Berrange
112409437e1SDaniel P. Berrange    # Looking at effect of xbzrle compression with varying
113409437e1SDaniel P. Berrange    # cache sizes
114409437e1SDaniel P. Berrange    Comparison("compr-xbzrle", scenarios = [
115409437e1SDaniel P. Berrange        Scenario("compr-xbzrle-cache-5",
116409437e1SDaniel P. Berrange                 compression_xbzrle=True, compression_xbzrle_cache=5),
117409437e1SDaniel P. Berrange        Scenario("compr-xbzrle-cache-10",
118409437e1SDaniel P. Berrange                 compression_xbzrle=True, compression_xbzrle_cache=10),
119409437e1SDaniel P. Berrange        Scenario("compr-xbzrle-cache-20",
120409437e1SDaniel P. Berrange                 compression_xbzrle=True, compression_xbzrle_cache=10),
121409437e1SDaniel P. Berrange        Scenario("compr-xbzrle-cache-50",
122409437e1SDaniel P. Berrange                 compression_xbzrle=True, compression_xbzrle_cache=50),
123409437e1SDaniel P. Berrange    ]),
1241c3baa1aSHyman
1251c3baa1aSHyman
1261c3baa1aSHyman    # Looking at effect of multifd with
1271c3baa1aSHyman    # varying numbers of channels
1281c3baa1aSHyman    Comparison("compr-multifd", scenarios = [
1291c3baa1aSHyman        Scenario("compr-multifd-channels-4",
1301c3baa1aSHyman                 multifd=True, multifd_channels=2),
1311c3baa1aSHyman        Scenario("compr-multifd-channels-8",
1321c3baa1aSHyman                 multifd=True, multifd_channels=8),
1331c3baa1aSHyman        Scenario("compr-multifd-channels-32",
1341c3baa1aSHyman                 multifd=True, multifd_channels=32),
1351c3baa1aSHyman        Scenario("compr-multifd-channels-64",
1361c3baa1aSHyman                 multifd=True, multifd_channels=64),
1371c3baa1aSHyman    ]),
138*22b7cb2cSHyman Huang
139*22b7cb2cSHyman Huang    # Looking at effect of dirty-limit with
140*22b7cb2cSHyman Huang    # varying x_vcpu_dirty_limit_period
141*22b7cb2cSHyman Huang    Comparison("compr-dirty-limit-period", scenarios = [
142*22b7cb2cSHyman Huang        Scenario("compr-dirty-limit-period-500",
143*22b7cb2cSHyman Huang                 dirty_limit=True, x_vcpu_dirty_limit_period=500),
144*22b7cb2cSHyman Huang        Scenario("compr-dirty-limit-period-800",
145*22b7cb2cSHyman Huang                 dirty_limit=True, x_vcpu_dirty_limit_period=800),
146*22b7cb2cSHyman Huang        Scenario("compr-dirty-limit-period-1000",
147*22b7cb2cSHyman Huang                 dirty_limit=True, x_vcpu_dirty_limit_period=1000),
148*22b7cb2cSHyman Huang    ]),
149*22b7cb2cSHyman Huang
150*22b7cb2cSHyman Huang
151*22b7cb2cSHyman Huang    # Looking at effect of dirty-limit with
152*22b7cb2cSHyman Huang    # varying vcpu_dirty_limit
153*22b7cb2cSHyman Huang    Comparison("compr-dirty-limit", scenarios = [
154*22b7cb2cSHyman Huang        Scenario("compr-dirty-limit-10MB",
155*22b7cb2cSHyman Huang                 dirty_limit=True, vcpu_dirty_limit=10),
156*22b7cb2cSHyman Huang        Scenario("compr-dirty-limit-20MB",
157*22b7cb2cSHyman Huang                 dirty_limit=True, vcpu_dirty_limit=20),
158*22b7cb2cSHyman Huang        Scenario("compr-dirty-limit-50MB",
159*22b7cb2cSHyman Huang                 dirty_limit=True, vcpu_dirty_limit=50),
160*22b7cb2cSHyman Huang    ]),
161409437e1SDaniel P. Berrange]
162