1 .. This work is licensed under a Creative Commons Attribution 4.0 International
3 .. http://creativecommons.org/licenses/by/4.0
4 .. (c) OPNFV, Ericsson AB and others.
6 *************************************
7 Yardstick Test Case Description TC010
8 *************************************
10 .. _lat_mem_rd: http://manpages.ubuntu.com/manpages/trusty/lat_mem_rd.8.html
12 +-----------------------------------------------------------------------------+
15 +--------------+--------------------------------------------------------------+
16 |test case id | OPNFV_YARDSTICK_TC010_MEMORY LATENCY |
18 +--------------+--------------------------------------------------------------+
19 |metric | Memory read latency (nanoseconds) |
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. |
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. |
32 +--------------+--------------------------------------------------------------+
33 |test tool | Lmbench |
35 | | Lmbench is a suite of operating system microbenchmarks. This |
36 | | test uses lat_mem_rd tool from that suite including: |
38 | | * Context switching |
39 | | * Networking: connection establishment, pipe, TCP, UDP, and |
41 | | * File system creates and deletes |
42 | | * Process creation |
43 | | * Signal handling |
44 | | * System call overhead |
45 | | * Memory read latency |
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.) |
52 +--------------+--------------------------------------------------------------+
53 |test | LMbench lat_mem_rd benchmark measures memory read latency |
54 |description | for varying memory sizes and strides. |
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:: |
61 | | p = (char **)*p; |
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. |
70 | | Only data accesses are measured; the instruction cache is |
73 | | The results are reported in nanoseconds per load and have |
74 | | been verified accurate to within a few nanoseconds on an SGI |
77 +--------------+--------------------------------------------------------------+
78 |configuration | File: opnfv_yardstick_tc010.yaml |
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 |
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. |
95 +--------------+--------------------------------------------------------------+
96 |applicability | Test can be configured with different: |
100 | | * iterations and intervals. |
102 | | Default values exist. |
104 | | SLA (optional) : max_latency: The maximum memory latency |
105 | | that is accepted. |
107 +--------------+--------------------------------------------------------------+
108 |usability | This test case is one of Yardstick's generic test. Thus it |
109 | | is runnable on most of the scenarios. |
111 +--------------+--------------------------------------------------------------+
112 |references | LMbench lat_mem_rd_ |
114 | | ETSI-NFV-TST001 |
116 +--------------+--------------------------------------------------------------+
117 |pre-test | The test case image needs to be installed into Glance |
118 |conditions | with Lmbench included in the image. |
120 | | No POD specific requirements have been identified. |
122 +--------------+--------------------------------------------------------------+
123 |test sequence | description and expected result |
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. |
129 | | Result: logs are stored. |
131 +--------------+--------------------------------------------------------------+
132 |step 1 | A host VM with LMbench installed is booted. |
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. |
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 |
146 | | Result: Logs are stored. |
148 +--------------+--------------------------------------------------------------+
149 |step 4 | The host VM is deleted. |
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. |
155 +--------------+--------------------------------------------------------------+