summaryrefslogtreecommitdiff
path: root/tests/migration/guestperf/comparison.py
blob: d0b7df97c8e69ebd9acd1ac6e5436d870f6eb645 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
#
# Migration test scenario comparison mapping
#
# Copyright (c) 2016 Red Hat, Inc.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, see <http://www.gnu.org/licenses/>.
#

from guestperf.scenario import Scenario

class Comparison(object):
    def __init__(self, name, scenarios):
        self._name = name
        self._scenarios = scenarios

COMPARISONS = [
    # Looking at effect of pausing guest during migration
    # at various stages of iteration over RAM
    Comparison("pause-iters", scenarios = [
        Scenario("pause-iters-0",
                 pause=True, pause_iters=0),
        Scenario("pause-iters-1",
                 pause=True, pause_iters=1),
        Scenario("pause-iters-5",
                 pause=True, pause_iters=5),
        Scenario("pause-iters-20",
                 pause=True, pause_iters=20),
    ]),


    # Looking at use of post-copy in relation to bandwidth
    # available for migration
    Comparison("post-copy-bandwidth", scenarios = [
        Scenario("post-copy-bw-100mbs",
                 post_copy=True, bandwidth=12),
        Scenario("post-copy-bw-300mbs",
                 post_copy=True, bandwidth=37),
        Scenario("post-copy-bw-1gbs",
                 post_copy=True, bandwidth=125),
        Scenario("post-copy-bw-10gbs",
                 post_copy=True, bandwidth=1250),
        Scenario("post-copy-bw-100gbs",
                 post_copy=True, bandwidth=12500),
    ]),


    # Looking at effect of starting post-copy at different
    # stages of the migration
    Comparison("post-copy-iters", scenarios = [
        Scenario("post-copy-iters-0",
                 post_copy=True, post_copy_iters=0),
        Scenario("post-copy-iters-1",
                 post_copy=True, post_copy_iters=1),
        Scenario("post-copy-iters-5",
                 post_copy=True, post_copy_iters=5),
        Scenario("post-copy-iters-20",
                 post_copy=True, post_copy_iters=20),
    ]),


    # Looking at effect of auto-converge with different
    # throttling percentage step rates
    Comparison("auto-converge-iters", scenarios = [
        Scenario("auto-converge-step-5",
                 auto_converge=True, auto_converge_step=5),
        Scenario("auto-converge-step-10",
                 auto_converge=True, auto_converge_step=10),
        Scenario("auto-converge-step-20",
                 auto_converge=True, auto_converge_step=20),
    ]),


    # Looking at use of auto-converge in relation to bandwidth
    # available for migration
    Comparison("auto-converge-bandwidth", scenarios = [
        Scenario("auto-converge-bw-100mbs",
                 auto_converge=True, bandwidth=12),
        Scenario("auto-converge-bw-300mbs",
                 auto_converge=True, bandwidth=37),
        Scenario("auto-converge-bw-1gbs",
                 auto_converge=True, bandwidth=125),
        Scenario("auto-converge-bw-10gbs",
                 auto_converge=True, bandwidth=1250),
        Scenario("auto-converge-bw-100gbs",
                 auto_converge=True, bandwidth=12500),
    ]),


    # Looking at effect of multi-thread compression with
    # varying numbers of threads
    Comparison("compr-mt", scenarios = [
        Scenario("compr-mt-threads-1",
                 compression_mt=True, compression_mt_threads=1),
        Scenario("compr-mt-threads-2",
                 compression_mt=True, compression_mt_threads=2),
        Scenario("compr-mt-threads-4",
                 compression_mt=True, compression_mt_threads=4),
    ]),


    # Looking at effect of xbzrle compression with varying
    # cache sizes
    Comparison("compr-xbzrle", scenarios = [
        Scenario("compr-xbzrle-cache-5",
                 compression_xbzrle=True, compression_xbzrle_cache=5),
        Scenario("compr-xbzrle-cache-10",
                 compression_xbzrle=True, compression_xbzrle_cache=10),
        Scenario("compr-xbzrle-cache-20",
                 compression_xbzrle=True, compression_xbzrle_cache=10),
        Scenario("compr-xbzrle-cache-50",
                 compression_xbzrle=True, compression_xbzrle_cache=50),
    ]),
]