[docs] Fix docs {un,}indent warnings in Testcase definitions
[yardstick.git] / docs / testing / user / userguide / opnfv_yardstick_tc010.rst
1 .. This work is licensed under a Creative Commons Attribution 4.0 International
2 .. License.
3 .. http://creativecommons.org/licenses/by/4.0
4 .. (c) OPNFV, Ericsson AB and others.
5
6 *************************************
7 Yardstick Test Case Description TC010
8 *************************************
9
10 .. _lat_mem_rd: http://manpages.ubuntu.com/manpages/trusty/lat_mem_rd.8.html
11
12 +-----------------------------------------------------------------------------+
13 |Memory Latency                                                               |
14 |                                                                             |
15 +--------------+--------------------------------------------------------------+
16 |test case id  | OPNFV_YARDSTICK_TC010_MEMORY LATENCY                         |
17 |              |                                                              |
18 +--------------+--------------------------------------------------------------+
19 |metric        | Memory read latency (nanoseconds)                            |
20 |              |                                                              |
21 +--------------+--------------------------------------------------------------+
22 |test purpose  | The purpose of TC010 is to evaluate the IaaS compute         |
23 |              | performance with regards to memory read latency.             |
24 |              | It measures the memory read latency for varying memory sizes |
25 |              | and strides. Whole memory hierarchy is measured.             |
26 |              |                                                              |
27 |              | The purpose is also to be able to spot the trends.           |
28 |              | Test results, graphs and similar shall be stored for         |
29 |              | comparison reasons and product evolution understanding       |
30 |              | between different OPNFV versions and/or configurations.      |
31 |              |                                                              |
32 +--------------+--------------------------------------------------------------+
33 |test tool     | Lmbench                                                      |
34 |              |                                                              |
35 |              | Lmbench is a suite of operating system microbenchmarks. This |
36 |              | test uses lat_mem_rd tool from that suite including:         |
37 |              |                                                              |
38 |              |  * Context switching                                         |
39 |              |  * Networking: connection establishment, pipe, TCP, UDP, and |
40 |              |    RPC hot potato                                            |
41 |              |  * File system creates and deletes                           |
42 |              |  * Process creation                                          |
43 |              |  * Signal handling                                           |
44 |              |  * System call overhead                                      |
45 |              |  * Memory read latency                                       |
46 |              |                                                              |
47 |              | (LMbench is not always part of a Linux distribution, hence   |
48 |              | it needs to be installed. As an example see the              |
49 |              | /yardstick/tools/ directory for how to generate a Linux      |
50 |              | image with LMbench included.)                                |
51 |              |                                                              |
52 +--------------+--------------------------------------------------------------+
53 |test          | LMbench lat_mem_rd benchmark measures memory read latency    |
54 |description   | for varying memory sizes and strides.                        |
55 |              |                                                              |
56 |              | The benchmark runs as two nested loops. The outer loop is    |
57 |              | the stride size. The inner loop is the array size. For each  |
58 |              | array size, the benchmark creates a ring of pointers that    |
59 |              | point backward one stride. Traversing the array is done by:: |
60 |              |                                                              |
61 |              |         p = (char **)*p;                                     |
62 |              |                                                              |
63 |              | in a for loop (the over head of the for loop is not          |
64 |              | significant; the loop is an unrolled loop 100 loads long).   |
65 |              | The size of the array varies from 512 bytes to (typically)   |
66 |              | eight megabytes. For the small sizes, the cache will have an |
67 |              | effect, and the loads will be much faster. This becomes much |
68 |              | more apparent when the data is plotted.                      |
69 |              |                                                              |
70 |              | Only data accesses are measured; the instruction cache is    |
71 |              | not measured.                                                |
72 |              |                                                              |
73 |              | The results are reported in nanoseconds per load and have    |
74 |              | been verified accurate to within a few nanoseconds on an SGI |
75 |              | Indy.                                                        |
76 |              |                                                              |
77 +--------------+--------------------------------------------------------------+
78 |configuration | File: opnfv_yardstick_tc010.yaml                             |
79 |              |                                                              |
80 |              | * SLA (max_latency): 30 nanoseconds                          |
81 |              | * Stride - 128 bytes                                         |
82 |              | * Stop size - 64 megabytes                                   |
83 |              | * Iterations: 10 - test is run 10 times iteratively.         |
84 |              | * Interval: 1 - there is 1 second delay between each         |
85 |              |   iteration.                                                 |
86 |              |                                                              |
87 |              | SLA is optional. The SLA in this test case serves as an      |
88 |              | example. Considerably lower read latency is expected.        |
89 |              | However, to cover most configurations, both baremetal and    |
90 |              | fully virtualized  ones, this value should be possible to    |
91 |              | achieve and acceptable for black box testing.                |
92 |              | Many heavy IO applications start to suffer badly if the      |
93 |              | read latency is higher than this.                            |
94 |              |                                                              |
95 +--------------+--------------------------------------------------------------+
96 |applicability | Test can be configured with different:                       |
97 |              |                                                              |
98 |              | * strides;                                                   |
99 |              | * stop_size;                                                 |
100 |              | * iterations and intervals.                                  |
101 |              |                                                              |
102 |              | Default values exist.                                        |
103 |              |                                                              |
104 |              | SLA (optional) : max_latency: The maximum memory latency     |
105 |              | that is accepted.                                            |
106 |              |                                                              |
107 +--------------+--------------------------------------------------------------+
108 |usability     | This test case is one of Yardstick's generic test. Thus it   |
109 |              | is runnable on most of the scenarios.                        |
110 |              |                                                              |
111 +--------------+--------------------------------------------------------------+
112 |references    | LMbench lat_mem_rd_                                          |
113 |              |                                                              |
114 |              | ETSI-NFV-TST001                                              |
115 |              |                                                              |
116 +--------------+--------------------------------------------------------------+
117 |pre-test      | The test case image needs to be installed into Glance        |
118 |conditions    | with Lmbench included in the image.                          |
119 |              |                                                              |
120 |              | No POD specific requirements have been identified.           |
121 |              |                                                              |
122 +--------------+--------------------------------------------------------------+
123 |test sequence | description and expected result                              |
124 |              |                                                              |
125 +--------------+--------------------------------------------------------------+
126 |step 1        | The host is installed as client. LMbench's lat_mem_rd tool   |
127 |              | is invoked and logs are produced and stored.                 |
128 |              |                                                              |
129 |              | Result: logs are stored.                                     |
130 |              |                                                              |
131 +--------------+--------------------------------------------------------------+
132 |step 1        | A host VM with LMbench installed is booted.                  |
133 |              |                                                              |
134 +--------------+--------------------------------------------------------------+
135 |step 2        | Yardstick is connected with the host VM by using ssh.        |
136 |              | 'lmbench_latency_benchmark' bash script is copyied from Jump |
137 |              | Host to the host VM via the ssh tunnel.                      |
138 |              |                                                              |
139 +--------------+--------------------------------------------------------------+
140 |step 3        | 'lmbench_latency_benchmark' script is invoked. LMbench's     |
141 |              | lat_mem_rd benchmark starts to measures memory read latency  |
142 |              | for varying memory sizes and strides. Memory read latency    |
143 |              | are recorded and checked against the SLA. Logs are produced  |
144 |              | and stored.                                                  |
145 |              |                                                              |
146 |              | Result: Logs are stored.                                     |
147 |              |                                                              |
148 +--------------+--------------------------------------------------------------+
149 |step 4        | The host VM is deleted.                                      |
150 |              |                                                              |
151 +--------------+--------------------------------------------------------------+
152 |test verdict  | Test fails if the measured memory latency is above the SLA   |
153 |              | value or if there is a test case execution problem.          |
154 |              |                                                              |
155 +--------------+--------------------------------------------------------------+