Refactor perf test cases
[csit.git] / tests / vpp / perf / tcp / 10ge2p1x520-ethip4tcphttp-httpserver.robot
1 # Copyright (c) 2018 Cisco and/or its affiliates.
2 # Licensed under the Apache License, Version 2.0 (the "License");
3 # you may not use this file except in compliance with the License.
4 # You may obtain a copy of the License at:
5 #
6 #     http://www.apache.org/licenses/LICENSE-2.0
7 #
8 # Unless required by applicable law or agreed to in writing, software
9 # distributed under the License is distributed on an "AS IS" BASIS,
10 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 # See the License for the specific language governing permissions and
12 # limitations under the License.
13
14 *** Settings ***
15
16 | Library  | resources.tools.wrk.wrk
17 | Resource | resources/libraries/robot/wrk/wrk_utils.robot
18 | Resource | resources/libraries/robot/performance/performance_setup.robot
19 | Resource | resources/libraries/robot/tcp/tcp_setup.robot
20 | ...
21 | Force Tags | 3_NODE_SINGLE_LINK_TOPO | PERFTEST | HW_ENV | HTTP | TCP
22 | ...
23 | Suite Setup | Set up 3-node performance topology with wrk and DUT's NIC model
24 | ... | Intel-XL710
25 | ...
26 | Test Setup | Set up tcp performance test
27 | Test Teardown | Tear down performance test with wrk
28 | ...
29 | Test Template | Local template
30 | ...
31 | Documentation | *HTTP requests per seconds, connections per seconds and
32 | ... | throughput measurement.*
33 | ...
34 | ... | *[Top] Network Topologies:* TG-DUT-TG 2-node topology
35 | ... | with single link between nodes.
36 | ... | *[Enc] Packet Encapsulations:* Eth-IPv4 for IPv4 routing.
37 | ... | *[Cfg] DUT configuration:*
38 | ... | *[Ver] TG verification:*
39 | ... | *[Ref] Applicable standard specifications:*
40
41 *** Keywords ***
42 | Local template
43 | | [Arguments] | ${traffic_profile} | ${phy_cores} | ${test_type}
44 | | ... | ${rxq}=${None}
45 | | ...
46 | | Add worker threads and rxqueues to all DUTs | ${phy_cores} | ${rxq}
47 | | Add PCI devices to all DUTs
48 | | ${duts}= | Get Matches | ${nodes} | DUT*
49 | | :FOR | ${dut} | IN | @{duts}
50 | | | Import Library | resources.libraries.python.VppConfigGenerator
51 | | | ... | WITH NAME | ${dut}
52 | | | Run keyword | ${dut}.Add api segment global size | 2G
53 | | | Run keyword | ${dut}.Add api segment api size | 1G
54 | | | Run keyword | ${dut}.Add TCP preallocated connections | 1000000
55 | | | Run keyword | ${dut}.Add TCP preallocated half open connections | 1000000
56 | | | Run keyword | ${dut}.Add session event queue length | 1000000
57 | | | Run keyword | ${dut}.Add session preallocated sessions | 1000000
58 | | | Run keyword | ${dut}.Add session v4 session table buckets | 500000
59 | | | Run keyword | ${dut}.Add session v4 session table memory | 1g
60 | | | Run keyword | ${dut}.Add session v4 halfopen table buckets | 2500000
61 | | | Run keyword | ${dut}.Add session v4 halfopen table memory | 3g
62 | | | Run keyword | ${dut}.Add session local endpoints table buckets | 2500000
63 | | | Run keyword | ${dut}.Add session local endpoints table memory | 3g
64 | | Apply startup configuration on all VPP DUTs
65 | | Run Keyword If | '${test_type}' == 'bw'
66 | | ... | Run keywords
67 | | ... | Set up HTTP server with paramters on the VPP node
68 | | ... | 500000 | 4 | 4000m | AND
69 | | ... | Measure throughput | ${traffic_profile}
70 | | ... | ELSE IF | '${test_type}' == 'rps'
71 | | ... | Run keywords
72 | | ... | Set up HTTP server with paramters on the VPP node
73 | | ... | 500000 | 4 | 4000m | AND
74 | | ... | Measure requests per second | ${traffic_profile}
75 | | ... | ELSE IF | '${test_type}' == 'cps'
76 | | ... | Run keywords
77 | | ... | Set up HTTP server with paramters on the VPP node
78 | | ... | 31000 | 64 | 4000m | AND
79 | | ... | Measure connections per second | ${traffic_profile}
80
81 *** Test Cases ***
82 | tc01-1t1c-ethip4tcphttp-httpserver-cps
83 | | [Documentation]
84 | | ... | Measure number of connections per second using wrk.
85 | | ...
86 | | [Tags] | 1C | TCP_CPS
87 | | traffic_profile=wrk-sf-2n-ethip4tcphttp-8u8c50con-cps | phy_cores=${1}
88 | | ... | test_type=cps
89
90 | tc02-2t2c-ethip4tcphttp-httpserver-cps
91 | | [Documentation]
92 | | ... | Measure number of connections per second using wrk.
93 | | ...
94 | | [Tags] | 2C | TCP_CPS
95 | | traffic_profile=wrk-sf-2n-ethip4tcphttp-8u8c50con-cps | phy_cores=${2}
96 | | ... | test_type=cps
97
98 | tc03-4t4c-ethip4tcphttp-httpserver-cps
99 | | [Documentation]
100 | | ... | Measure number of connections per second using wrk.
101 | | ...
102 | | [Tags] | 4C | TCP_CPS
103 | | traffic_profile=wrk-sf-2n-ethip4tcphttp-8u8c50con-cps | phy_cores=${4}
104 | | ... | test_type=cps
105
106 | tc04-1t1c-ethip4tcphttp-httpserver-rps
107 | | [Documentation]
108 | | ... | Measure and report number of requests per second using wrk.
109 | | ...
110 | | [Tags] | 1C | TCP_RPS
111 | | traffic_profile=wrk-sf-2n-ethip4tcphttp-8u8c50con-rps | phy_cores=${1}
112 | | ... | test_type=rps
113
114 | tc05-2t2c-ethip4tcphttp-httpserver-rps
115 | | [Documentation]
116 | | ... | Measure and report number of requests per second using wrk.
117 | | ...
118 | | [Tags] | 2C | TCP_RPS
119 | | traffic_profile=wrk-sf-2n-ethip4tcphttp-8u8c50con-rps | phy_cores=${2}
120 | | ... | test_type=rps
121
122 | tc06-4t4c-ethip4tcphttp-httpserver-rps
123 | | [Documentation]
124 | | ... | Measure and report number of requests per second using wrk.
125 | | ...
126 | | [Tags] | 4C | TCP_RPS
127 | | traffic_profile=wrk-sf-2n-ethip4tcphttp-8u8c50con-rps | phy_cores=${4}
128 | | ... | test_type=rps