|
| 1 | +## -*- mode: python; coding: utf-8 -*- |
| 2 | + |
| 3 | +# [***NOTICE: TEST STILL UNDER DEVELOPMENT MIGHT CHANGE***] |
| 4 | + |
| 5 | +include("netperf_definitions.inc") |
| 6 | +DESCRIPTION="Qdisc prio testing Head-of-Line latency" |
| 7 | +# |
| 8 | +# This is an extention to tcp_upload_prio, that uses TCP_RR and UDP_RR |
| 9 | +# for measuring the latency. |
| 10 | +# |
| 11 | +# Special care need to be take for using this on the default |
| 12 | +# qdisc MQ which have pfifo_fast assigned to every HW queue. |
| 13 | +# |
| 14 | +# Setup requirements |
| 15 | +# 1. IRQ align CPUs to NIC HW queues |
| 16 | +# E.g. via: set_irq_affinity ethX |
| 17 | +# From: https://github.com/netoptimizer/network-testing/ |
| 18 | +# |
| 19 | +# 2. Force netperf-wrapper subcommands to run the same CPU |
| 20 | +# E.g: taskset -c 2 ./netperf-wrapper -H IP qdisc_prio_hol |
| 21 | +# |
| 22 | +# This will force all measurements to go through the same qdisc. This |
| 23 | +# is needed so the ping/latency tests measures the real property of |
| 24 | +# the qdisc and Head-of-Line blocking effect. |
| 25 | + |
| 26 | +DEFAULTS={'PLOT': 'totals'} |
| 27 | + |
| 28 | +DATA_SETS = o([ |
| 29 | + ('TCP upload1', |
| 30 | + {'command': find_netperf("TCP_STREAM", LENGTH, HOST), |
| 31 | + 'delay': DELAY, |
| 32 | + 'units': 'Mbits/s', |
| 33 | + 'runner': 'netperf_demo',}), |
| 34 | + |
| 35 | +# ('TCP upload2', |
| 36 | +# {'command': find_netperf("TCP_STREAM", LENGTH, HOST), |
| 37 | +# 'delay': DELAY, |
| 38 | +# 'units': 'Mbits/s', |
| 39 | +# 'runner': 'netperf_demo',}), |
| 40 | + |
| 41 | + # 0x08 => TOS-"throughput" (Kernel: TC_PRIO_BULK qdisc prio band:2 ) |
| 42 | + ('UDP upload1', |
| 43 | + {'command': find_netperf("UDP_STREAM", LENGTH, HOST, |
| 44 | + marking="0x08,0x08", |
| 45 | + # Avoid sending IP fragments 1500 bytes - 28 bytes (IP+UDP hdr) |
| 46 | + extra_args="-- -m 1472"), |
| 47 | + 'delay': DELAY, |
| 48 | + 'units': 'Mbits/s', |
| 49 | + 'runner': 'netperf_demo',}), |
| 50 | + |
| 51 | + # With disabled GSO and TSO, it is difficult to saturate |
| 52 | + # 10Gbit/s link bandwidth, but a UDP_STREAM (which default |
| 53 | + # uses) IP fragments it helps. Problem is this will be |
| 54 | + # saturated in case GSO or TSO is enabled, resulting in a |
| 55 | + # empty dataset and possibly an error on command line. |
| 56 | + # |
| 57 | + ('UDP upload2', |
| 58 | + {'command': find_netperf("UDP_STREAM", LENGTH, HOST, |
| 59 | + marking="0x08,0x08", |
| 60 | + # Avoid sending IP fragments 1500 bytes - 28 bytes (IP+UDP hdr) |
| 61 | + # extra_args="-- -m 1472" |
| 62 | + ), |
| 63 | + 'delay': DELAY, |
| 64 | + 'units': 'Mbits/s', |
| 65 | + 'runner': 'netperf_demo',}), |
| 66 | + |
| 67 | + ('Upload total', |
| 68 | + {'apply_to': [glob("* upload*")], |
| 69 | + 'units': 'Mbits/s', |
| 70 | + 'runner': 'sum',}), |
| 71 | + |
| 72 | + ('Ping (ms) ICMP', |
| 73 | + {'command': find_ping(IP_VERSION, STEP_SIZE, TOTAL_LENGTH, HOST), |
| 74 | + 'units': 'ms', |
| 75 | + 'runner': 'ping',}), |
| 76 | + |
| 77 | + ('Ping (ms) ICMP PRIO', |
| 78 | + {'command': find_ping(IP_VERSION, STEP_SIZE, TOTAL_LENGTH, HOST, marking="0x10"), |
| 79 | + 'units': 'ms', |
| 80 | + 'runner': 'ping',}), |
| 81 | + |
| 82 | + ('Ping (ms) UDP PRIO', |
| 83 | + {'command': find_netperf("UDP_RR", TOTAL_LENGTH, HOST, marking="0x10,0x10"), |
| 84 | + 'data_transform': 'rr_to_ms', |
| 85 | + 'units': 'ms', |
| 86 | + 'runner': 'netperf_demo',}), |
| 87 | + |
| 88 | + # 0x10 => TOS-"lowdelay" (Kernel: TC_PRIO_INTERACTIVE qdisc prio band:0 ) |
| 89 | + ('Ping (ms) TCP PRIO', |
| 90 | + {'command': find_netperf("TCP_RR", TOTAL_LENGTH, HOST, marking="0x10,0x10"), |
| 91 | + 'data_transform': 'rr_to_ms', |
| 92 | + 'units': 'ms', |
| 93 | + 'runner': 'netperf_demo',}), |
| 94 | + |
| 95 | + ('Ping (ms) avg', |
| 96 | + {'apply_to': [glob("Ping (ms)*")], |
| 97 | + 'units': 'ms', |
| 98 | + 'runner': 'average',}), |
| 99 | + |
| 100 | + ]) |
| 101 | + |
| 102 | +PLOTS = o([ |
| 103 | + ('totals', |
| 104 | + {'description': 'Bandwidth and ping plot', |
| 105 | + 'type': 'timeseries', |
| 106 | + 'dual_axes': True, |
| 107 | + 'axis_labels': ['Bandwidth (Mbit/s)','Latency (ms)'], |
| 108 | + 'series': [{'data' : 'TCP upload1', |
| 109 | + 'label': 'TCP upload1 (MBit/s)'}, |
| 110 | +# {'data' : 'TCP upload2', |
| 111 | +# 'label': 'TCP upload2 (MBit/s)'}, |
| 112 | + {'data' : 'UDP upload1', |
| 113 | + 'label': 'UDP upload1 (MBit/s)'}, |
| 114 | + {'data' : 'UDP upload2', |
| 115 | + 'label': 'UDP upload2 (MBit/s)'}, |
| 116 | + {'data': 'Upload total', |
| 117 | + 'label': 'Total Upload (Mbit/s)', |
| 118 | + 'smoothing': 10, |
| 119 | + 'color': 'green', |
| 120 | + 'linewidth': 3}, |
| 121 | + {'data': 'Ping (ms) ICMP', |
| 122 | + 'label': 'Ping (ms)', |
| 123 | + 'axis': 2}, |
| 124 | + {'data': 'Ping (ms) ICMP PRIO', |
| 125 | + 'label': 'Ping hi-prio (ms)', |
| 126 | + 'axis': 2}, |
| 127 | + {'data': 'Ping (ms) UDP PRIO', |
| 128 | + 'label': 'UDP-latency (ms) hi-prio', |
| 129 | + 'axis': 2}, |
| 130 | + {'data': 'Ping (ms) TCP PRIO', |
| 131 | + 'label': 'TCP-latency (ms) hi-prio', |
| 132 | + 'axis': 2}, |
| 133 | + {'data': 'Ping (ms) avg', |
| 134 | + 'label': 'Avg Ping (ms)', |
| 135 | + 'smoothing': 10, |
| 136 | + 'color': 'black', |
| 137 | + 'linewidth': 2, |
| 138 | + 'axis': 2}, |
| 139 | + ] |
| 140 | + } |
| 141 | + ), |
| 142 | + |
| 143 | + ('ping', |
| 144 | + {'description': 'Ping plot', |
| 145 | + 'type': 'timeseries', |
| 146 | + 'legend_title': 'Ping (ms)', |
| 147 | + 'axis_labels': ['Latency (ms)'], |
| 148 | + 'series': [{'data': 'Ping (ms) ICMP', |
| 149 | + 'label': 'ICMP'}, |
| 150 | + {'data': 'Ping (ms) ICMP PRIO', |
| 151 | + 'label': 'Ping hi-prio'}, |
| 152 | + {'data': 'Ping (ms) avg', |
| 153 | + 'label': 'Avg', |
| 154 | + 'smoothing': 10, |
| 155 | + 'color': 'black', |
| 156 | + 'linewidth': 2}, |
| 157 | + {'data': 'Ping (ms) UDP PRIO', |
| 158 | + 'label': 'UDP-latency (ms) hi-prio'}, |
| 159 | + {'data': 'Ping (ms) TCP PRIO', |
| 160 | + 'label': 'TCP-latency (ms) hi-prio'}, |
| 161 | + ]}), |
| 162 | + |
| 163 | + ('ping_hiprio', |
| 164 | + {'description': 'Ping plot hi-prio', |
| 165 | + 'type': 'timeseries', |
| 166 | + 'legend_title': 'Ping (ms)', |
| 167 | + 'axis_labels': ['Latency (ms)'], |
| 168 | + 'series': [ |
| 169 | + {'data': 'Ping (ms) ICMP PRIO', |
| 170 | + 'label': 'Ping hi-prio'}, |
| 171 | + {'data': 'Ping (ms) ICMP PRIO', |
| 172 | + 'label': 'Ping hi-prio (smoothed)', |
| 173 | + 'smoothing': 10, |
| 174 | + 'linewidth': 2}, |
| 175 | + {'data': 'Ping (ms) UDP PRIO', |
| 176 | + 'label': 'UDP-latency (ms) hi-prio'}, |
| 177 | + {'data': 'Ping (ms) TCP PRIO', |
| 178 | + 'label': 'TCP-latency (ms) hi-prio'}, |
| 179 | + ]}), |
| 180 | + |
| 181 | + ('ping_cdf', |
| 182 | + {'description': 'Ping CDF plot', |
| 183 | + 'type': 'cdf', |
| 184 | + 'axis_labels': ['Latency (ms)'], |
| 185 | + 'parent': 'ping', |
| 186 | + 'cutoff': (DELAY,DELAY)}), |
| 187 | + |
| 188 | + ('rr_latency', |
| 189 | + {'description': 'Latency derived from TCP_RR and UDP_RR', |
| 190 | + 'type': 'timeseries', |
| 191 | + 'legend_title': 'Latency (ms)', |
| 192 | + 'axis_labels': ['Latency (ms)'], |
| 193 | + 'series': [ |
| 194 | + {'data': 'Ping (ms) UDP PRIO', |
| 195 | + 'label': 'UDP-latency (ms) hi-prio'}, |
| 196 | + {'data': 'Ping (ms) TCP PRIO', |
| 197 | + 'label': 'TCP-latency (ms) hi-prio'}, |
| 198 | + ]}), |
| 199 | + |
| 200 | + ('box_totals', |
| 201 | + {'description': 'Box plot of totals', |
| 202 | + 'parent': 'totals', |
| 203 | + 'type': 'box',}), |
| 204 | + ]) |
0 commit comments