Skip to content

Commit

Permalink
Change the base test to be based on iperf3, which is multithreaded
Browse files Browse the repository at this point in the history
That provides a better showcase
  • Loading branch information
tbarbette committed Jul 20, 2023
1 parent adadbd8 commit 12fe7b9
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 8 deletions.
28 changes: 28 additions & 0 deletions tests/tcp/01-iperf-advanced.npf
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
%info
IPerf 2 Throughput Experiment

%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

%import graph-beautiful

%variables
PARALLEL=[1-8]
WINDOW=[1*32768]
CONGESTION={bbr,cubic,vegas,newreno}
NODELAY={-N:Nagle disabled,:Nagle enabled}
TIME={2,10}

fastregression:PARALLEL={1,8}
fastregression:CONGESTION=cubic
fastregression:TIME=2

%script@server
iperf -s

%script@client delay=1
result=$(iperf -w ${WINDOW}k -t $TIME -P $PARALLEL $NODELAY -Z $CONGESTION -c ${server:0:ip} | tail -n 3 | grep -ioE "[0-9.]+ [kmg]bits")
echo "RESULT-THROUGHPUT $result"
16 changes: 9 additions & 7 deletions tests/tcp/01-iperf.npf
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,25 @@ IPerf 2 Throughput Experiment

%config
n_runs=5
var_names+={PARALLEL:Number of parallel connexions,ZEROCOPY:Zero-Copy}
var_names+={PARALLEL:Number of parallel connections,WINDOW:Window size (kB),THROUGHPUT:Throughput (Gbps)}
timeout=25
default_repo=iperf2

graph_background=7

%import graph-beautiful

%variables
PARALLEL=[1-8]
ZEROCOPY={:without,-Z:with}
WINDOW={16,512}
TIME=2

fastregression:PARALLEL={1,8}

%script@server
iperf -s

%script@client delay=2
result=$(iperf -f k -t $TIME -P $PARALLEL $ZEROCOPY -c ${server:0:ip} | tail -n 3 | grep -ioE "[0-9.]+ [kmg]bits")
%script@client delay=1
//Launch the program, copy the output to a log
iperf -c ${server:0:ip} -w ${WINDOW}k -t $TIME -P $PARALLEL 2>&1 | tee iperf.log
//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"
2 changes: 1 addition & 1 deletion tests/tcp/02-iperf3.npf → tests/tcp/03-iperf3.npf
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ fastregression:PARALLEL={1,8}
iperf3 -s

%script@client delay=2
result=$(iperf3 -f k -t $TIME -P $PARALLEL $ZEROCOPY -c ${server:0:ip} | tail -n 3 | grep -ioE "[0-9.]+ [kmg]bits")
result=$(iperf3 -c ${server:0:ip} -f k -t $TIME -P $PARALLEL $ZEROCOPY | grep -ioE "[0-9.]+ [kmg]bits" | tail -n 1)
echo "RESULT-THROUGHPUT $result"

0 comments on commit 12fe7b9

Please sign in to comment.