Browse Source

Kafka scenario for omsimulator

Change-Id: I024be7212b196fdc305ce0107adc4e99a7debdf9
Ilya Shakhat 3 years ago
parent
commit
40e3a6f41c
2 changed files with 125 additions and 0 deletions
  1. 73
    0
      performa/scenarios/mq/kafka.rst
  2. 52
    0
      performa/scenarios/mq/kafka.yaml

+ 73
- 0
performa/scenarios/mq/kafka.rst View File

@@ -0,0 +1,73 @@
1
+Oslo.messaging simulator report
2
+-------------------------------
3
+
4
+This report contains results of `message_queue_performance`_ execution
5
+with `Oslo.messaging Simulator`_ with Kafka driver.
6
+
7
+
8
+Test Case: Notification Throughput Test
9
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
10
+
11
+Message processing
12
+~~~~~~~~~~~~~~~~~~
13
+
14
+Messages are collected at 2 points: ``sent`` - messages sent by the client
15
+and ``received`` - messages received by the server. Also the number of lost
16
+messages is calculated. Sizes of messages is based on the distribution of
17
+messages collected on the 100-node cloud.
18
+
19
+{{'''
20
+    title: NOTIFY Message count
21
+    axes:
22
+      x: threads
23
+      y: sent, msg
24
+      y2: received, msg
25
+      y3: lost, msg
26
+    chart: line
27
+    pipeline:
28
+    - { $match: { task: omsimulator, mode: notify }}
29
+    - { $group: { _id: { threads: { $multiply: [ "$threads", "$host_count", "$processes" ] } },
30
+                  sent: { $sum: "$client.count" },
31
+                  received: { $sum: "$server.count" },
32
+                  lost: { $sum: { $subtract: ["$client.count", "$server.count"] }}
33
+                }}
34
+    - { $project: { x: "$_id.threads",
35
+                    y: "$sent",
36
+                    y2: "$received",
37
+                    y3: "$lost"
38
+                  }}
39
+    - { $sort: { x: 1 }}
40
+''' | chart_and_table
41
+}}
42
+
43
+
44
+The throughput and latency
45
+~~~~~~~~~~~~~~~~~~~~~~~~~~
46
+
47
+The chart shows the throughput and latency depending on number of concurrent threads.
48
+
49
+{{'''
50
+    title: NOTIFY throughput and latency depending on thread count
51
+    axes:
52
+      x: threads
53
+      y: throughput, msg/sec
54
+      y3: latency, ms
55
+    chart: line
56
+    pipeline:
57
+    - $match: { task: omsimulator, mode: notify }
58
+    - $group:
59
+        _id: { threads: { $multiply: [ "$threads", "$host_count", "$processes" ] } }
60
+        throughput: { $sum: { $divide: ["$client.count", "$client.duration"] }}
61
+        latency: { $avg: "$server.latency" }
62
+    - $project:
63
+        x: "$_id.threads"
64
+        y: "$throughput"
65
+        y3: { $multiply: [ "$latency", 1000 ] }
66
+''' | chart_and_table
67
+}}
68
+
69
+
70
+.. references:
71
+
72
+.. _message_queue_performance: http://docs.openstack.org/developer/performance-docs/test_plans/mq/plan.html
73
+.. _Oslo.messaging Simulator: https://github.com/openstack/oslo.messaging/blob/master/tools/simulator.py

+ 52
- 0
performa/scenarios/mq/kafka.yaml View File

@@ -0,0 +1,52 @@
1
+title: Oslo.messaging notifications with Kafka driver
2
+
3
+description:
4
+  This scenario oslo.messaging is tested with Kafka driver
5
+
6
+parameters:
7
+  tester_hosts: List of hosts were omsimulator will be executed
8
+  kafka_url: Kafka address
9
+  client_url: Override Kafka address for the client
10
+  server_url: Override Kafka address for the server
11
+
12
+setup:
13
+  -
14
+    hosts: {{ tester_hosts }}
15
+    tasks:
16
+    - apt: name=git
17
+      become: yes
18
+    - name: installing omsimulator
19
+      git: repo=git://git.openstack.org/openstack/oslo.messaging
20
+           dest=/tmp/performa/oslo.messaging
21
+    - apt: name=python-dev
22
+      become: yes
23
+    - apt: name=python-pip
24
+      become: yes
25
+    - pip: name=virtualenv
26
+      become: yes
27
+    - pip: requirements=/tmp/performa/oslo.messaging/requirements.txt virtualenv=/tmp/performa/oslo.messaging/.venv
28
+    - pip: name=eventlet virtualenv=/tmp/performa/oslo.messaging/.venv
29
+    - pip: name="kafka-python<1.0.0,>=0.9.5" 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
+
35
+execution:
36
+  -
37
+    hosts: {{ tester_hosts }}
38
+    matrix:
39
+      processes: [ 1, 2, 3, 4, 5, 6 ]
40
+    tasks:
41
+    - omsimulator:
42
+        mode: notify
43
+        duration: 100
44
+        threads: 10
45
+        url: {{ kafka_url }}
46
+        client_url: {{ client_url }}
47
+        server_url: {{ server_url }}
48
+        unique_topic_per_pair: yes
49
+
50
+
51
+report:
52
+  template: kafka.rst

Loading…
Cancel
Save