## -*- mode: python; coding: utf-8 -*- # [***NOTICE: TEST STILL UNDER DEVELOPMENT MIGHT CHANGE***] include("netperf_definitions.inc") DESCRIPTION="Qdisc prio testing Head-of-Line latency" # # This is an extention to tcp_upload_prio, that uses TCP_RR and UDP_RR # for measuring the latency. # # Special care need to be take for using this on the default # qdisc MQ which have pfifo_fast assigned to every HW queue. # # Setup requirements # 1. IRQ align CPUs to NIC HW queues # E.g. via: set_irq_affinity ethX # From: https://github.com/netoptimizer/network-testing/ # # 2. Force netperf-wrapper subcommands to run the same CPU # E.g: taskset -c 2 ./netperf-wrapper -H IP qdisc_prio_hol # # This will force all measurements to go through the same qdisc. This # is needed so the ping/latency tests measures the real property of # the qdisc and Head-of-Line blocking effect. DEFAULTS={'PLOT': 'totals'} DATA_SETS = o([ ('TCP upload1', {'command': find_netperf("TCP_STREAM", LENGTH, HOST), 'delay': DELAY, 'units': 'Mbits/s', 'runner': 'netperf_demo',}), # ('TCP upload2', # {'command': find_netperf("TCP_STREAM", LENGTH, HOST), # 'delay': DELAY, # 'units': 'Mbits/s', # 'runner': 'netperf_demo',}), # 0x08 => TOS-"throughput" (Kernel: TC_PRIO_BULK qdisc prio band:2 ) ('UDP upload1', {'command': find_netperf("UDP_STREAM", LENGTH, HOST, marking="0x08,0x08", # Avoid sending IP fragments 1500 bytes - 28 bytes (IP+UDP hdr) extra_args="-- -m 1472"), 'delay': DELAY, 'units': 'Mbits/s', 'runner': 'netperf_demo',}), # With disabled GSO and TSO, it is difficult to saturate # 10Gbit/s link bandwidth, but a UDP_STREAM (which default # uses) IP fragments it helps. Problem is this will be # saturated in case GSO or TSO is enabled, resulting in a # empty dataset and possibly an error on command line. # ('UDP upload2', {'command': find_netperf("UDP_STREAM", LENGTH, HOST, marking="0x08,0x08", # Avoid sending IP fragments 1500 bytes - 28 bytes (IP+UDP hdr) # extra_args="-- -m 1472" ), 'delay': DELAY, 'units': 'Mbits/s', 'runner': 'netperf_demo',}), ('Upload total', {'apply_to': [glob("* upload*")], 'units': 'Mbits/s', 'runner': 'sum',}), ('Ping (ms) ICMP', {'command': find_ping(IP_VERSION, STEP_SIZE, TOTAL_LENGTH, HOST), 'units': 'ms', 'runner': 'ping',}), ('Ping (ms) ICMP PRIO', {'command': find_ping(IP_VERSION, STEP_SIZE, TOTAL_LENGTH, HOST, marking="0x10"), 'units': 'ms', 'runner': 'ping',}), ('Ping (ms) UDP PRIO', {'command': find_netperf("UDP_RR", TOTAL_LENGTH, HOST, marking="0x10,0x10"), 'data_transform': 'rr_to_ms', 'units': 'ms', 'runner': 'netperf_demo',}), # 0x10 => TOS-"lowdelay" (Kernel: TC_PRIO_INTERACTIVE qdisc prio band:0 ) ('Ping (ms) TCP PRIO', {'command': find_netperf("TCP_RR", TOTAL_LENGTH, HOST, marking="0x10,0x10"), 'data_transform': 'rr_to_ms', 'units': 'ms', 'runner': 'netperf_demo',}), ('Ping (ms) avg', {'apply_to': [glob("Ping (ms)*")], 'units': 'ms', 'runner': 'average',}), ]) PLOTS = o([ ('totals', {'description': 'Bandwidth and ping plot', 'type': 'timeseries', 'dual_axes': True, 'axis_labels': ['Bandwidth (Mbit/s)','Latency (ms)'], 'series': [{'data' : 'TCP upload1', 'label': 'TCP upload1 (MBit/s)'}, # {'data' : 'TCP upload2', # 'label': 'TCP upload2 (MBit/s)'}, {'data' : 'UDP upload1', 'label': 'UDP upload1 (MBit/s)'}, {'data' : 'UDP upload2', 'label': 'UDP upload2 (MBit/s)'}, {'data': 'Upload total', 'label': 'Total Upload (Mbit/s)', 'smoothing': 10, 'color': 'green', 'linewidth': 3}, {'data': 'Ping (ms) ICMP', 'label': 'Ping (ms)', 'axis': 2}, {'data': 'Ping (ms) ICMP PRIO', 'label': 'Ping hi-prio (ms)', 'axis': 2}, {'data': 'Ping (ms) UDP PRIO', 'label': 'UDP-latency (ms) hi-prio', 'axis': 2}, {'data': 'Ping (ms) TCP PRIO', 'label': 'TCP-latency (ms) hi-prio', 'axis': 2}, {'data': 'Ping (ms) avg', 'label': 'Avg Ping (ms)', 'smoothing': 10, 'color': 'black', 'linewidth': 2, 'axis': 2}, ] } ), ('ping', {'description': 'Ping plot', 'type': 'timeseries', 'legend_title': 'Ping (ms)', 'axis_labels': ['Latency (ms)'], 'series': [{'data': 'Ping (ms) ICMP', 'label': 'ICMP'}, {'data': 'Ping (ms) ICMP PRIO', 'label': 'Ping hi-prio'}, {'data': 'Ping (ms) avg', 'label': 'Avg', 'smoothing': 10, 'color': 'black', 'linewidth': 2}, {'data': 'Ping (ms) UDP PRIO', 'label': 'UDP-latency (ms) hi-prio'}, {'data': 'Ping (ms) TCP PRIO', 'label': 'TCP-latency (ms) hi-prio'}, ]}), ('ping_hiprio', {'description': 'Ping plot hi-prio', 'type': 'timeseries', 'legend_title': 'Ping (ms)', 'axis_labels': ['Latency (ms)'], 'series': [ {'data': 'Ping (ms) ICMP PRIO', 'label': 'Ping hi-prio'}, {'data': 'Ping (ms) ICMP PRIO', 'label': 'Ping hi-prio (smoothed)', 'smoothing': 10, 'linewidth': 2}, {'data': 'Ping (ms) UDP PRIO', 'label': 'UDP-latency (ms) hi-prio'}, {'data': 'Ping (ms) TCP PRIO', 'label': 'TCP-latency (ms) hi-prio'}, ]}), ('ping_cdf', {'description': 'Ping CDF plot', 'type': 'cdf', 'axis_labels': ['Latency (ms)'], 'parent': 'ping', 'cutoff': (DELAY,DELAY)}), ('rr_latency', {'description': 'Latency derived from TCP_RR and UDP_RR', 'type': 'timeseries', 'legend_title': 'Latency (ms)', 'axis_labels': ['Latency (ms)'], 'series': [ {'data': 'Ping (ms) UDP PRIO', 'label': 'UDP-latency (ms) hi-prio'}, {'data': 'Ping (ms) TCP PRIO', 'label': 'TCP-latency (ms) hi-prio'}, ]}), ('box_totals', {'description': 'Box plot of totals', 'parent': 'totals', 'type': 'box',}), ])