-
Notifications
You must be signed in to change notification settings - Fork 20
Expand file tree
/
Copy pathiperf-advanced.npf
More file actions
52 lines (42 loc) · 1.45 KB
/
Copy pathiperf-advanced.npf
File metadata and controls
52 lines (42 loc) · 1.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
%info
IPerf 2 Throughput Experiment
This is an extended version of the iperf.npf experiment. It can profile iperf while running
has a CPU and PARALLEL factors to show interactions, use jinja templating, etc.
%config
n_runs=5
var_names+={PARALLEL:Number of parallel connections,WINDOW:Window size (kB),NODELAY:No delay option,CONGESTION:Congestion control}
timeout=25
default_repo=iperf
accept_zero+={*MISSES,*LLC-LOADS}
-nostat:results_expect+={TOTAL-cycles}
%import graph-beautiful
%variables
PARALLEL=[1-8]
cpu:CPU=[1-8]
WINDOW=[1*32768]
CONGESTION={bbr,cubic,reno}
nocongestion:CONGESTION=cubic
NODELAY={-N:Nagle disabled,:Nagle enabled}
nowindow:WINDOW=1024
TIME={2,10}
fastregression:PARALLEL={1,8}
fastregression:CONGESTION=cubic
fastregression:TIME=2
%init@server
killall iperf &> /dev/null
exit 0
%script@server
iperf -s
%script@client jinja delay=1
//Launch the program, copy the output to a log
{% if CPU is not defined %}
iperf -c ${server:0:ip} -w ${WINDOW}k -t $TIME -P $PARALLEL $NODELAY -Z $CONGESTION 2>&1 | tee iperf.log
{% else %}
taskset -c 0-{{ CPU - 1 }} iperf -c ${server:0:ip} -w ${WINDOW}k -t $TIME -P $PARALLEL $NODELAY -Z $CONGESTION 2>&1 | tee iperf.log
{% endif %}
//Parse the log to find the throughput
result=$(cat iperf.log | grep -ioE "[0-9.]+ [kmg]?bits" | tail -n 1)
//Give the throughput to NPF through stdout
echo "RESULT-THROUGHPUT $result"
%-nostat:import@server perf-stat delay=2 autokill=false
%-noload:import@server cpuload