-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
108 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/bin/sh | ||
|
||
PSIZES="64 128 256 512 1024 1500 65507" | ||
TESTNAMES="TCP_STREAM TCP_MAERTS" | ||
DEST_ADDR=${1:-"192.168.122.1"} | ||
NETPERF=${2:-/root/netperf} | ||
|
||
/sbin/sysctl -w net.ipv4.tcp_wmem="40960 873800 1677721600" | ||
|
||
for size in $PSIZES | ||
do | ||
for test in $TESTNAMES | ||
do | ||
echo "== netperf ($size-$test) ==" | ||
$NETPERF -H $DEST_ADDR -t $test -- -o THROUGHPUT,THROUGHPUT_UNITS,LOCAL_SEND_SIZE,COMMAND_LINE -m "$size,$size" | ||
|
||
done | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
#!/bin/bash | ||
|
||
SCRIPT_DIR="$(dirname "${BASH_SOURCE[0]}")" | ||
OUTPUT="$1" | ||
|
||
mkdir -p "$OUTPUT/out/" | ||
|
||
# parse outputs | ||
# TCP_STREAM | ||
for f in `ls $OUTPUT/*-iperf3.dat` | ||
do | ||
cat $f | grep bits |grep STREAM | awk -F',' '{print $3" " $1}' \ | ||
> $OUTPUT/out/`basename $f .dat|sed "s/iperf3/netperf/g"`-fwd-out.dat | ||
cat $f | grep bits |grep MAERTS | awk -F',' '{print $3" " $1}' \ | ||
> $OUTPUT/out/`basename $f .dat|sed "s/iperf3/netperf/g"`-rev-out.dat | ||
done # end of ${DIR} | ||
|
||
|
||
PSIZE_XTICS="('64' 0, '128' 2, '256' 4, '512' 6, '1024' 8, '1500' 10, '65507' 12)" | ||
PAT_NATIVE='fill patter 2 lc rgb "red"' | ||
PAT_MMU='fill patter 2 lc rgb "green"' | ||
PAT_NOMMU_S='fill patter 2 lc rgb "royalblue"' | ||
PAT_NOMMU_Z='fill patter 2 lc rgb "blue"' | ||
|
||
gnuplot << EndGNUPLOT | ||
set terminal postscript color eps lw 3 "Helvetica" 24 | ||
set output "${OUTPUT}/out/tcp-stream.eps" | ||
#set xtics font "Helvetica,14" | ||
set pointsize 2 | ||
set xzeroaxis | ||
set grid ytics | ||
set boxwidth 0.4 | ||
set style fill pattern | ||
set size 1.0,0.9 | ||
set key font ",18" | ||
set key top left Left reverse | ||
#set key above vertical maxrows 2 | ||
set xrange [-1:13] | ||
set xtics ${PSIZE_XTICS} | ||
set xlabel "Payload size (bytes)" | ||
set yrange [-20:20] | ||
#set ytics ('0' -10, '5' -5, '0' 0, '5' 5, '10' 10) | ||
set ylabel "Goodput (Gbps)" offset +0.8 | ||
plot \ | ||
'${OUTPUT}/out/native-netperf-fwd-out.dat' usin (\$0*2-0.6):(\$2/1000) w boxes $PAT_NATIVE title "native" ,\ | ||
'${OUTPUT}/out/um-mmu-netperf-fwd-out.dat' usin (\$0*2-0.2):(\$2/1000) w boxes $PAT_MMU title "um(mmu)" ,\ | ||
'${OUTPUT}/out/um-nommu-seccomp-netperf-fwd-out.dat' usin (\$0*2+0.2):(\$2/1000) w boxes $PAT_NOMMU_S title "um(nommu(s))" ,\ | ||
'${OUTPUT}/out/um-nommu-zpoline-netperf-fwd-out.dat' usin (\$0*2+0.6):(\$2/1000) w boxes $PAT_NOMMU_Z title "um(nommu(z))" ,\ | ||
'${OUTPUT}/out/native-netperf-rev-out.dat' usin (\$0*2-0.6):(\$2*-1/1000) w boxes $PAT_NATIVE notitle ,\ | ||
'${OUTPUT}/out/um-mmu-netperf-rev-out.dat' usin (\$0*2-0.2):(\$2*-1/1000) w boxes $PAT_MMU notitle ,\ | ||
'${OUTPUT}/out/um-nommu-seccomp-netperf-rev-out.dat' usin (\$0*2+0.2):(\$2*-1/1000) w boxes $PAT_NOMMU_S notitle ,\ | ||
'${OUTPUT}/out/um-nommu-zpoline-netperf-rev-out.dat' usin (\$0*2+0.6):(\$2*-1/1000) w boxes $PAT_NOMMU_Z notitle | ||
set terminal png lw 3 14 crop | ||
set key font ",12" | ||
set size 1.0,1.0 | ||
set ylabel "Goodput (Gbps)" offset +0.5 | ||
set output "${OUTPUT}/out/tcp-stream.png" | ||
replot | ||
#set terminal dumb | ||
#unset key | ||
#unset output | ||
#replot | ||
quit | ||
EndGNUPLOT | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters