Browse Source

Add omsimulator multihost scenario

Ilya Shakhat 3 years ago
parent
commit
b11a1eb147

+ 14
- 1
performa/engine/report.py View File

@@ -117,6 +117,8 @@ def generate_report(scenario, base_dir, mongo_url, db_name, doc_folder,
117 117
     report_definition = scenario['report']
118 118
     report_template = report_definition['template']
119 119
 
120
+    LOG.info('Using report template: %s', report_template)
121
+
120 122
     _make_dir(doc_folder)
121 123
 
122 124
     jinja_env = jinja2.Environment()
@@ -137,6 +139,15 @@ def generate_report(scenario, base_dir, mongo_url, db_name, doc_folder,
137 139
     LOG.info('The report is written to %s', doc_folder)
138 140
 
139 141
 
142
+def resolve_vars(scenario_template, vars):
143
+    jinja_env = jinja2.Environment()
144
+
145
+    compiled_template = jinja_env.from_string(scenario_template)
146
+    rendered_template = compiled_template.render(vars)
147
+
148
+    return rendered_template
149
+
150
+
140 151
 def main():
141 152
     utils.init_config_and_logging(config.MAIN_OPTS)
142 153
 
@@ -144,7 +155,9 @@ def main():
144 155
         cfg.CONF.scenario,
145 156
         alias_mapper=lambda f: config.SCENARIOS + '%s.yaml' % f)
146 157
 
147
-    scenario = utils.read_yaml_file(scenario_file_path)
158
+    scenario_raw = utils.read_file(scenario_file_path)
159
+    scenario_raw = resolve_vars(scenario_raw, cfg.CONF.vars)
160
+    scenario = yaml.safe_load(scenario_raw)
148 161
     base_dir = os.path.dirname(scenario_file_path)
149 162
 
150 163
     generate_report(scenario, base_dir, cfg.CONF.mongo_url, cfg.CONF.mongo_db,

+ 6
- 2
performa/modules/omsimulator.py View File

@@ -1,9 +1,9 @@
1 1
 #!/usr/bin/python
2 2
 import copy
3 3
 import os
4
-import tempfile
5
-
4
+import random
6 5
 import signal
6
+import tempfile
7 7
 
8 8
 SERVER_PID = os.path.join(tempfile.gettempdir(), 'performa.oms.pid')
9 9
 SERVER_FILE_NAME = os.path.join(tempfile.gettempdir(), 'performa.oms.srv')
@@ -104,16 +104,20 @@ def run(module):
104 104
         client_tool = 'rpc-client'
105 105
 
106 106
     params['python'] = PYTHON
107
+    # todo: fix topic support in omsimulator
108
+    # params['topic'] = 'performa-%d' % (random.random() * 1000000)
107 109
     params['server_tool'] = server_tool
108 110
     params['client_tool'] = client_tool
109 111
     params['server_file'] = SERVER_FILE_NAME
110 112
     params['client_file'] = CLIENT_FILE_NAME
111 113
 
112 114
     server = ('%(python)s simulator.py '
115
+              # '--topic %(topic)s '
113 116
               '--url %(url)s '
114 117
               '--json %(server_file)s '
115 118
               '%(server_tool)s ') % params
116 119
     client = ('%(python)s simulator.py '
120
+              # '--topic %(topic)s '
117 121
               '--url=%(url)s '
118 122
               '--json %(client_file)s '
119 123
               '-l %(duration)s '

+ 0
- 211
performa/scenarios/mq/omsimulator-threading.rst View File

@@ -1,211 +0,0 @@
1
-Oslo.messaging simulator report
2
--------------------------------
3
-
4
-This report shows how many concurrent threads can handle a single
5
-oslo.messaging process.
6
-
7
-Test Case 1: RPC CALL Throughput Test
8
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
9
-
10
-**Message processing**
11
-
12
-Messages are collected at 3 points: ``sent`` - messages sent by the client,
13
-``received`` - messages received by the server, ``round-trip`` - replies
14
-received by the client. Also the number of lost messages is calculated.
15
-
16
-{{'''
17
-    title: RPC CALL Message count
18
-    axes:
19
-      x: threads
20
-      y: sent, msg
21
-      y2: received, msg
22
-      y3: round-trip, msg
23
-      y4: lost, msg
24
-    chart: line
25
-    pipeline:
26
-    - { $match: { task: omsimulator, mode: call }}
27
-    - { $group: { _id: { threads: { $multiply: [ "$threads", "$host_count" ] } },
28
-                  sent: { $avg: "$client.count" },
29
-                  received: { $avg: "$server.count" },
30
-                  round_trip: { $avg: "$round_trip.count" },
31
-                  lost: { $avg: { $subtract: ["$client.count", "$round_trip.count"] }}
32
-                }}
33
-    - { $project: { x: "$_id.threads",
34
-                    y: "$sent",
35
-                    y2: "$received",
36
-                    y3: "$round_trip",
37
-                    y4: "$lost"
38
-                  }}
39
-    - { $sort: { x: 1 }}
40
-''' | chart
41
-}}
42
-
43
-
44
-**Message throughput, latency and RabbitMQ CPU utilization depending on thread count**
45
-
46
-The chart shows the throughput, latency and CPU utilization by RabbitMQ server
47
-depending on number of concurrent threads.
48
-
49
-{{'''
50
-    title: RPC CALL throughput, latency and RabbitMQ CPU utilization depending on thread count
51
-    axes:
52
-      x: threads
53
-      y: sent, msg/sec
54
-      y2: received, msg/sec
55
-      y3: round-trip, msg/sec
56
-      y4: latency, ms
57
-      y5: RabbitMQ CPU consumption, %
58
-    chart: line
59
-    pipeline:
60
-    - { $match: { task: omsimulator, mode: call }}
61
-    - { $group: { _id: { threads: { $multiply: [ "$threads", "$host_count" ] } },
62
-                  msg_sent_per_sec: { $avg: { $divide: ["$client.count", "$client.duration"] }},
63
-                  msg_received_per_sec: { $avg: { $divide: ["$server.count", "$server.duration"] }},
64
-                  msg_round_trip_per_sec: { $avg: { $divide: ["$round_trip.count", "$round_trip.duration"] }},
65
-                  latency: { $avg: "$round_trip.latency" },
66
-                  rabbit_total: { $avg: "$rabbit_total" }
67
-                }}
68
-    - { $project: { x: "$_id.threads",
69
-                    y: "$msg_sent_per_sec",
70
-                    y2: "$msg_received_per_sec",
71
-                    y3: "$msg_round_trip_per_sec",
72
-                    y4: { $multiply: [ "$latency", 1000 ] },
73
-                    y5: { $multiply: [ "$rabbit_total", 100 ] }
74
-                  }}
75
-    - { $sort: { x: 1 }}
76
-''' | chart
77
-}}
78
-
79
-
80
-Test Case 2: RPC CAST Throughput Test
81
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
82
-
83
-**Message processing**
84
-
85
-Messages are collected at 2 points: ``sent`` - messages sent by the client
86
-and ``received`` - messages received by the server. Also the number of lost
87
-messages is calculated.
88
-
89
-{{'''
90
-    title: RPC CAST Message count
91
-    axes:
92
-      x: threads
93
-      y: sent, msg
94
-      y2: received, msg
95
-      y3: lost, msg
96
-    chart: line
97
-    pipeline:
98
-    - { $match: { task: omsimulator, mode: cast }}
99
-    - { $group: { _id: { threads: { $multiply: [ "$threads", "$host_count" ] } },
100
-                  sent: { $avg: "$client.count" },
101
-                  received: { $avg: "$server.count" },
102
-                  lost: { $avg: { $subtract: ["$client.count", "$server.count"] }}
103
-                }}
104
-    - { $project: { x: "$_id.threads",
105
-                    y: "$sent",
106
-                    y2: "$received",
107
-                    y3: "$lost"
108
-                  }}
109
-    - { $sort: { x: 1 }}
110
-''' | chart
111
-}}
112
-
113
-
114
-**Message throughput, latency and RabbitMQ CPU utilization depending on thread count**
115
-
116
-The chart shows the throughput, latency and CPU utilization by RabbitMQ server
117
-depending on number of concurrent threads.
118
-
119
-{{'''
120
-    title: RPC CAST throughput, latency and RabbitMQ CPU utilization depending on thread count
121
-    axes:
122
-      x: threads
123
-      y: sent, msg/sec
124
-      y2: received, msg/sec
125
-      y3: latency, ms
126
-      y4: RabbitMQ CPU consumption, %
127
-    chart: line
128
-    pipeline:
129
-    - { $match: { task: omsimulator, mode: cast }}
130
-    - { $group: { _id: { threads: { $multiply: [ "$threads", "$host_count" ] } },
131
-                  msg_sent_per_sec: { $avg: { $divide: ["$client.count", "$client.duration"] }},
132
-                  msg_received_per_sec: { $avg: { $divide: ["$server.count", "$server.duration"] }},
133
-                  latency: { $avg: "$server.latency" },
134
-                  rabbit_total: { $avg: "$rabbit_total" }
135
-                }}
136
-    - { $project: { x: "$_id.threads",
137
-                    y: "$msg_sent_per_sec",
138
-                    y2: "$msg_received_per_sec",
139
-                    y3: { $multiply: [ "$latency", 1000 ] },
140
-                    y4: { $multiply: [ "$rabbit_total", 100 ] }
141
-                  }}
142
-    - { $sort: { x: 1 }}
143
-''' | chart
144
-}}
145
-
146
-
147
-Test Case 3: Notification Throughput Test
148
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
149
-
150
-**Message processing**
151
-
152
-Messages are collected at 2 points: ``sent`` - messages sent by the client
153
-and ``received`` - messages received by the server. Also the number of lost
154
-messages is calculated.
155
-
156
-{{'''
157
-    title: NOTIFY Message count
158
-    axes:
159
-      x: threads
160
-      y: sent, msg
161
-      y2: received, msg
162
-      l3: lost, msg
163
-    chart: line
164
-    pipeline:
165
-    - { $match: { task: omsimulator, mode: notify }}
166
-    - { $group: { _id: { threads: { $multiply: [ "$threads", "$host_count" ] } },
167
-                  sent: { $avg: "$client.count" },
168
-                  received: { $avg: "$server.count" },
169
-                  lost: { $avg: { $subtract: ["$client.count", "$server.count"] }}
170
-                }}
171
-    - { $project: { x: "$_id.threads",
172
-                    y: "$sent",
173
-                    y2: "$received",
174
-                    y3: "$lost"
175
-                  }}
176
-    - { $sort: { x: 1 }}
177
-''' | chart
178
-}}
179
-
180
-
181
-**Message throughput, latency and RabbitMQ CPU utilization depending on thread count**
182
-
183
-The chart shows the throughput, latency and CPU utilization by RabbitMQ server
184
-depending on number of concurrent threads.
185
-
186
-{{'''
187
-    title: NOTIFY throughput, latency and RabbitMQ CPU utilization depending on thread count
188
-    axes:
189
-      x: threads
190
-      y: sent, msg/sec
191
-      y2: received, msg/sec
192
-      y3: latency, ms
193
-      y4: RabbitMQ CPU consumption, %
194
-    chart: line
195
-    pipeline:
196
-    - { $match: { task: omsimulator, mode: notify }}
197
-    - { $group: { _id: { threads: { $multiply: [ "$threads", "$host_count" ] } },
198
-                  msg_sent_per_sec: { $avg: { $divide: ["$client.count", "$client.duration"] }},
199
-                  msg_received_per_sec: { $avg: { $divide: ["$server.count", "$server.duration"] }},
200
-                  latency: { $avg: "$server.latency" },
201
-                  rabbit_total: { $avg: "$rabbit_total" }
202
-                }}
203
-    - { $project: { x: "$_id.threads",
204
-                    y: "$msg_sent_per_sec",
205
-                    y2: "$msg_received_per_sec",
206
-                    y3: { $multiply: [ "$latency", 1000 ] },
207
-                    y4: { $multiply: [ "$rabbit_total", 100 ] }
208
-                  }}
209
-    - { $sort: { x: 1 }}
210
-''' | chart
211
-}}

+ 4
- 4
performa/scenarios/mq/omsimulator-threading.yaml View File

@@ -47,7 +47,7 @@ execution:
47 47
   -
48 48
     hosts: {{ tester_hosts }}
49 49
     matrix:
50
-      threads: [ 1, 2, 5, 10, 20, 50, 100 ]
50
+      threads: [ 1, 2, 5, 10, 20, 50 ]
51 51
     tasks:
52 52
     - omsimulator:
53 53
         mode: call
@@ -56,7 +56,7 @@ execution:
56 56
   -
57 57
     hosts: {{ tester_hosts }}
58 58
     matrix:
59
-      threads: [ 1, 2, 5, 10, 20, 50, 100 ]
59
+      threads: [ 1, 2, 5, 10, 20, 50 ]
60 60
     tasks:
61 61
     - omsimulator:
62 62
         mode: cast
@@ -65,7 +65,7 @@ execution:
65 65
   -
66 66
     hosts: {{ tester_hosts }}
67 67
     matrix:
68
-      threads: [ 1, 2, 5, 10, 20, 50, 100 ]
68
+      threads: [ 1, 2, 5, 10, 20, 50 ]
69 69
     tasks:
70 70
     - omsimulator:
71 71
         mode: notify
@@ -89,4 +89,4 @@ aggregation:
89 89
         - { $group: { _id: null, rabbit_sys: { $avg: "$sys" }, rabbit_user: { $avg: "$user" }, rabbit_total: { $avg: { $add: [ "$sys", "$user" ] }} }}
90 90
 
91 91
 report:
92
-  template: omsimulator-threading.rst
92
+  template: omsimulator.rst

+ 150
- 39
performa/scenarios/mq/omsimulator.rst View File

@@ -1,106 +1,217 @@
1
-OMSimulator Report
2
-------------------
1
+Oslo.messaging simulator report
2
+-------------------------------
3 3
 
4
-This is the report of execution test plan
5
-:ref:`mq_test_plan` with `OMSimulator`_ tool.
4
+This report is result of `message_queue_performance`_ execution
5
+with `Oslo.messaging Simulator`_
6 6
 
7
-Results
8
-^^^^^^^
7
+
8
+Test Case 1: RPC CALL Throughput Test
9
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
9 10
 
10 11
 **Message processing**
11 12
 
12
-The chart and table show the number of messages processed by a single process
13
-depending on number of eventlet threads inside of it. Messages are collected
14
-at 3 points: ``sent`` - messages sent by the client, ``received`` - messages
15
-received by the server, ``round-trip`` - replies received by the client.
13
+Messages are collected at 3 points: ``sent`` - messages sent by the client,
14
+``received`` - messages received by the server, ``round-trip`` - replies
15
+received by the client. Also the number of lost messages is calculated.
16 16
 
17 17
 {{'''
18
-    title: Throughput
18
+    title: RPC CALL Message count
19 19
     axes:
20 20
       x: threads
21 21
       y: sent, msg
22 22
       y2: received, msg
23 23
       y3: round-trip, msg
24
+      y4: lost, msg
24 25
     chart: line
25 26
     pipeline:
26
-    - { $match: { task: omsimulator, component: client }}
27
+    - { $match: { task: omsimulator, mode: call }}
27 28
     - { $group: { _id: { threads: { $multiply: [ "$threads", "$host_count" ] } },
28
-                  sent: { $avg: "$client.count" },
29
-                  received: { $avg: "$server.count" },
30
-                  round_trip: { $avg: "$round_trip.count" }
29
+                  sent: { $sum: "$client.count" },
30
+                  received: { $sum: "$server.count" },
31
+                  round_trip: { $sum: "$round_trip.count" },
32
+                  lost: { $sum: { $subtract: ["$client.count", "$round_trip.count"] }}
31 33
                 }}
32 34
     - { $project: { x: "$_id.threads",
33 35
                     y: "$sent",
34 36
                     y2: "$received",
35
-                    y3: "$round_trip"
37
+                    y3: "$round_trip",
38
+                    y4: "$lost"
36 39
                   }}
37 40
     - { $sort: { x: 1 }}
38 41
 ''' | chart
39 42
 }}
40 43
 
41 44
 
42
-**Message throughput, latency depending on thread count**
45
+**Message throughput, latency and RabbitMQ CPU utilization depending on thread count**
46
+
47
+The chart shows the throughput, latency and CPU utilization by RabbitMQ server
48
+depending on number of concurrent threads.
43 49
 
44 50
 {{'''
45
-    title: Throughput, latency depending on thread count
51
+    title: RPC CALL throughput, latency and RabbitMQ CPU utilization depending on thread count
46 52
     axes:
47 53
       x: threads
48
-      y: throughput, msg/sec
49
-      y2: latency, ms
54
+      y: sent, msg/sec
55
+      y2: received, msg/sec
56
+      y3: round-trip, msg/sec
57
+      y4: latency, ms
58
+      y5: RabbitMQ CPU consumption, %
50 59
     chart: line
51 60
     pipeline:
52
-    - { $match: { task: omsimulator, component: client }}
61
+    - { $match: { task: omsimulator, mode: call }}
53 62
     - { $group: { _id: { threads: { $multiply: [ "$threads", "$host_count" ] } },
54
-                  msg_sent_per_sec: { $avg: { $divide: ["$count", "$duration"] }},
55
-                  latency: { $avg: "$latency" },
63
+                  msg_sent_per_sec: { $avg: { $divide: ["$client.count", "$client.duration"] }},
64
+                  msg_received_per_sec: { $avg: { $divide: ["$server.count", "$server.duration"] }},
65
+                  msg_round_trip_per_sec: { $avg: { $divide: ["$round_trip.count", "$round_trip.duration"] }},
66
+                  latency: { $avg: "$round_trip.latency" },
67
+                  rabbit_total: { $avg: "$rabbit_total" }
56 68
                 }}
57 69
     - { $project: { x: "$_id.threads",
58 70
                     y: "$msg_sent_per_sec",
59
-                    y2: { $multiply: ["$latency", 1000] }
71
+                    y2: "$msg_received_per_sec",
72
+                    y3: "$msg_round_trip_per_sec",
73
+                    y4: { $multiply: [ "$latency", 1000 ] },
74
+                    y5: { $multiply: [ "$rabbit_total", 100 ] }
60 75
                   }}
61 76
     - { $sort: { x: 1 }}
62 77
 ''' | chart
63 78
 }}
64 79
 
65
-Messages per second and rabbit CPU consumption depending on threads count:
80
+
81
+Test Case 2: RPC CAST Throughput Test
82
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
83
+
84
+**Message processing**
85
+
86
+Messages are collected at 2 points: ``sent`` - messages sent by the client
87
+and ``received`` - messages received by the server. Also the number of lost
88
+messages is calculated.
66 89
 
67 90
 {{'''
68
-    title: Queries and and CPU util per second
91
+    title: RPC CAST Message count
69 92
     axes:
70 93
       x: threads
71
-      y: queries per sec
72
-      y2: rabbit CPU consumption, %
94
+      y: sent, msg
95
+      y2: received, msg
96
+      y3: lost, msg
73 97
     chart: line
74 98
     pipeline:
75
-    - { $match: { task: omsimulator }}
99
+    - { $match: { task: omsimulator, mode: cast }}
76 100
     - { $group: { _id: { threads: { $multiply: [ "$threads", "$host_count" ] } },
77
-                  msg_sent_per_sec: { $avg: { $divide: ["$count", "$duration"] }},
101
+                  sent: { $sum: "$client.count" },
102
+                  received: { $sum: "$server.count" },
103
+                  lost: { $sum: { $subtract: ["$client.count", "$server.count"] }}
104
+                }}
105
+    - { $project: { x: "$_id.threads",
106
+                    y: "$sent",
107
+                    y2: "$received",
108
+                    y3: "$lost"
109
+                  }}
110
+    - { $sort: { x: 1 }}
111
+''' | chart
112
+}}
113
+
114
+
115
+**Message throughput, latency and RabbitMQ CPU utilization depending on thread count**
116
+
117
+The chart shows the throughput, latency and CPU utilization by RabbitMQ server
118
+depending on number of concurrent threads.
119
+
120
+{{'''
121
+    title: RPC CAST throughput, latency and RabbitMQ CPU utilization depending on thread count
122
+    axes:
123
+      x: threads
124
+      y: sent, msg/sec
125
+      y2: received, msg/sec
126
+      y3: latency, ms
127
+      y4: RabbitMQ CPU consumption, %
128
+    chart: line
129
+    pipeline:
130
+    - { $match: { task: omsimulator, mode: cast }}
131
+    - { $group: { _id: { threads: { $multiply: [ "$threads", "$host_count" ] } },
132
+                  msg_sent_per_sec: { $avg: { $divide: ["$client.count", "$client.duration"] }},
133
+                  msg_received_per_sec: { $avg: { $divide: ["$server.count", "$server.duration"] }},
134
+                  latency: { $avg: "$server.latency" },
78 135
                   rabbit_total: { $avg: "$rabbit_total" }
79 136
                 }}
80 137
     - { $project: { x: "$_id.threads",
81 138
                     y: "$msg_sent_per_sec",
82
-                    y2: { $multiply: [ "$rabbit_total", 100 ] }
139
+                    y2: "$msg_received_per_sec",
140
+                    y3: { $multiply: [ "$latency", 1000 ] },
141
+                    y4: { $multiply: [ "$rabbit_total", 100 ] }
83 142
                   }}
84 143
     - { $sort: { x: 1 }}
85 144
 ''' | chart
86 145
 }}
87 146
 
88 147
 
148
+Test Case 3: Notification Throughput Test
149
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
150
+
151
+**Message processing**
152
+
153
+Messages are collected at 2 points: ``sent`` - messages sent by the client
154
+and ``received`` - messages received by the server. Also the number of lost
155
+messages is calculated.
156
+
157
+{{'''
158
+    title: NOTIFY Message count
159
+    axes:
160
+      x: threads
161
+      y: sent, msg
162
+      y2: received, msg
163
+      y3: lost, msg
164
+    chart: line
165
+    pipeline:
166
+    - { $match: { task: omsimulator, mode: notify }}
167
+    - { $group: { _id: { threads: { $multiply: [ "$threads", "$host_count" ] } },
168
+                  sent: { $sum: "$client.count" },
169
+                  received: { $sum: "$server.count" },
170
+                  lost: { $sum: { $subtract: ["$client.count", "$server.count"] }}
171
+                }}
172
+    - { $project: { x: "$_id.threads",
173
+                    y: "$sent",
174
+                    y2: "$received",
175
+                    y3: "$lost"
176
+                  }}
177
+    - { $sort: { x: 1 }}
178
+''' | chart
179
+}}
180
+
181
+
182
+**Message throughput, latency and RabbitMQ CPU utilization depending on thread count**
183
+
184
+The chart shows the throughput, latency and CPU utilization by RabbitMQ server
185
+depending on number of concurrent threads.
186
+
89 187
 {{'''
90
-    title: Latency depending on msg/sec
188
+    title: NOTIFY throughput, latency and RabbitMQ CPU utilization depending on thread count
91 189
     axes:
92
-      x: messages per sec
93
-      y: latency
190
+      x: threads
191
+      y: sent, msg/sec
192
+      y2: received, msg/sec
193
+      y3: latency, ms
194
+      y4: RabbitMQ CPU consumption, %
94 195
     chart: line
95 196
     pipeline:
96
-    - { $match: { task: omsimulator }}
197
+    - { $match: { task: omsimulator, mode: notify }}
97 198
     - { $group: { _id: { threads: { $multiply: [ "$threads", "$host_count" ] } },
98
-                  msg_sent_per_sec: { $avg: { $divide: ["$count", "$duration"] }},
99
-                  latency: { $avg: "$latency" }
199
+                  msg_sent_per_sec: { $avg: { $divide: ["$client.count", "$client.duration"] }},
200
+                  msg_received_per_sec: { $avg: { $divide: ["$server.count", "$server.duration"] }},
201
+                  latency: { $avg: "$server.latency" },
202
+                  rabbit_total: { $avg: "$rabbit_total" }
100 203
                 }}
101
-    - { $project: { x: "$msg_sent_per_sec",
102
-                    y: { $multiply: ["$latency", 1000] }
204
+    - { $project: { x: "$_id.threads",
205
+                    y: "$msg_sent_per_sec",
206
+                    y2: "$msg_received_per_sec",
207
+                    y3: { $multiply: [ "$latency", 1000 ] },
208
+                    y4: { $multiply: [ "$rabbit_total", 100 ] }
103 209
                   }}
104 210
     - { $sort: { x: 1 }}
105 211
 ''' | chart
106 212
 }}
213
+
214
+.. references:
215
+
216
+.. _message_queue_performance: http://docs.openstack.org/developer/performance-docs/test_plans/mq/plan.html
217
+.. _Oslo.messaging Simulator: https://github.com/openstack/oslo.messaging/blob/master/tools/simulator.py

+ 55
- 35
performa/scenarios/mq/omsimulator.yaml View File

@@ -4,62 +4,82 @@ description:
4 4
   This scenario uses oslo.messaging simulator tool to execute MQ test plan.
5 5
 
6 6
 parameters:
7
-  target: List of hosts were omsimulator will be executed
7
+  tester_hosts: List of hosts were omsimulator will be executed
8
+  rabbit_hosts: List of hosts were RabbitMQ runs
9
+  rabbit_url: RabbitMQ address
8 10
 
9 11
 setup:
10 12
   -
11
-    hosts: {{ target }}
13
+    hosts: {{ tester_hosts }}
12 14
     tasks:
13 15
     - apt: name=git
14 16
       become: yes
15
-#    - name: installing omsimulator
16
-#      git: repo=git://git.openstack.org/openstack/oslo.messaging
17
-#           dest=/tmp/performa/oslo.messaging
18
-#    - name: installing omsimulator
19
-#      git: repo=git://git.openstack.org/openstack/oslo.messaging
20
-#           dest=/tmp/performa/oslo.messaging
21
-#    - command: git fetch https://review.openstack.org/openstack/oslo.messaging refs/changes/91/291191/2
22
-#      args:
23
-#        chdir: /tmp/performa/oslo.messaging
24
-#    - command: git checkout FETCH_HEAD
25
-#      args:
26
-#        chdir: /tmp/performa/oslo.messaging
27
-#    - apt: name=atop
28
-#      become: yes
29
-#    - apt: name=daemon
30
-#      become: yes
17
+    - apt: name=daemon
18
+      become: yes
19
+    - name: installing omsimulator
20
+      git: repo=git://git.openstack.org/openstack/oslo.messaging
21
+           dest=/tmp/performa/oslo.messaging
22
+    - apt: name=python-dev
23
+      become: yes
24
+    - apt: name=python-pip
25
+      become: yes
26
+    - pip: name=virtualenv
27
+      become: yes
28
+    - pip: requirements=/tmp/performa/oslo.messaging/requirements.txt virtualenv=/tmp/performa/oslo.messaging/.venv
29
+    - pip: name=eventlet virtualenv=/tmp/performa/oslo.messaging/.venv
30
+    - command: /tmp/performa/oslo.messaging/.venv/bin/python setup.py install
31
+      args:
32
+        chdir: /tmp/performa/oslo.messaging
33
+  -
34
+    hosts: {{ rabbit_hosts }}
35
+    tasks:
36
+    - apt: name=atop
37
+      become: yes
38
+    - apt: name=daemon
39
+      become: yes
40
+
31 41
 
32 42
 execution:
33 43
   -
34
-    hosts: {{ target }}
44
+    hosts: {{ rabbit_hosts }}
35 45
     tasks:
36 46
     - atop: command=start
37
-#  -
38
-#    hosts: {{ target }}
39
-#    matrix:
40
-#      threads: [ 1, 2, 5, 10, 25, 50, 100 ]
41
-#    tasks:
42
-#    - omsimulator:
43
-#        mode: call
44
-#        duration: 10
45
-#        url: "rabbit://stackrabbit:swordfish@localhost:5672/"
46 47
   -
47
-    hosts: {{ target }}
48
+    hosts: {{ tester_hosts }}
48 49
     matrix:
49
-      host_count: [ 1 ]
50
-      threads: [ 1, 10, 100 ]
50
+      host_count: [ 1, 2, 5, 10 ]
51 51
     tasks:
52 52
     - omsimulator:
53 53
         mode: call
54
-        duration: 10
54
+        duration: 100
55
+        threads: 10
56
+        url: {{ rabbit_url }}
57
+  -
58
+    hosts: {{ tester_hosts }}
59
+    matrix:
60
+      host_count: [ 1, 2, 5, 10 ]
61
+    tasks:
62
+    - omsimulator:
63
+        mode: cast
64
+        duration: 100
65
+        threads: 10
66
+        url: {{ rabbit_url }}
67
+  -
68
+    hosts: {{ tester_hosts }}
69
+    matrix:
70
+      host_count: [ 1, 2, 5, 10 ]
71
+    tasks:
72
+    - omsimulator:
73
+        mode: notify
74
+        duration: 100
55 75
         threads: 10
56 76
         url: {{ rabbit_url }}
57 77
   -
58
-    hosts: {{ target }}
78
+    hosts: {{ rabbit_hosts }}
59 79
     tasks:
60 80
     - atop:
61 81
         command: stop
62
-        labels: [ CPU, PRC, PRM ]
82
+        labels: [ PRC ]
63 83
 
64 84
 aggregation:
65 85
   -
@@ -68,7 +88,7 @@ aggregation:
68 88
         { task: omsimulator }
69 89
       values:
70 90
         pipeline:
71
-        - { $match: { task: atop, status: OK, label: PRC, name: beam.smp }}
91
+        - { $match: { task: atop, status: OK, label: PRC, name: { $regex: beam.* } }}
72 92
         - { $group: { _id: null, rabbit_sys: { $avg: "$sys" }, rabbit_user: { $avg: "$user" }, rabbit_total: { $avg: { $add: [ "$sys", "$user" ] }} }}
73 93
 
74 94
 report:

Loading…
Cancel
Save