diff options
author | David Gibson <david@gibson.dropbear.id.au> | 2023-11-06 18:08:33 +1100 |
---|---|---|
committer | Stefano Brivio <sbrivio@redhat.com> | 2023-11-07 09:56:24 +0100 |
commit | 53ff387156380bee9acb5fe2ca62af97b9ccce36 (patch) | |
tree | b448f18823b5ee00f81d396db60a66d607d32508 /test/perf/pasta_tcp | |
parent | aa0bb9f471627c10b3c71fc9dacd06c642d88ad6 (diff) | |
download | passt-53ff387156380bee9acb5fe2ca62af97b9ccce36.tar passt-53ff387156380bee9acb5fe2ca62af97b9ccce36.tar.gz passt-53ff387156380bee9acb5fe2ca62af97b9ccce36.tar.bz2 passt-53ff387156380bee9acb5fe2ca62af97b9ccce36.tar.lz passt-53ff387156380bee9acb5fe2ca62af97b9ccce36.tar.xz passt-53ff387156380bee9acb5fe2ca62af97b9ccce36.tar.zst passt-53ff387156380bee9acb5fe2ca62af97b9ccce36.zip |
test/perf: Simplify calculation of "omit" time for TCP throughput
For the TCP throughput tests, we use iperf3's -O "omit" option which
ignores results for the given time at the beginning of the test. Currently
we calculate this as 1/6th of the test measurement time. The purpose of
-O, however, is to skip over the TCP slow start period, which in no way
depends on the overall length of the test.
The slow start time is roughly speaking
log_2 ( max_window_size / MSS ) * round_trip_time
These factors all vary between tests and machines we're running on, but we
can estimate some reasonable bounds for them:
* The maximum window size is bounded by the buffer sizes at each end,
which shouldn't exceed 16MiB
* The mss varies with the MTU we use, but the smallest we use in tests is
~256 bytes
* Round trip time will vary with the system, but with these essentially
local transfers it will typically be well under 1ms (on my laptop it is
closer to 0.03ms)
That gives a worst case slow start time of about 16ms. Setting an omit
time of 0.1s uniformly is therefore more than enough, and substantially
smaller than what we calculate now for the default case (10s / 6 ~= 1.7s).
This reduces total time for the standard benchmark run by around 30s.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'test/perf/pasta_tcp')
-rw-r--r-- | test/perf/pasta_tcp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/perf/pasta_tcp b/test/perf/pasta_tcp index 11c73f8..7777532 100644 --- a/test/perf/pasta_tcp +++ b/test/perf/pasta_tcp @@ -24,7 +24,7 @@ ns /sbin/sysctl -w net.ipv4.tcp_timestamps=0 set THREADS 2 set STREAMS 2 set TIME 10 -hout OMIT echo __TIME__ / 6 | bc -l +set OMIT 0.1 set OPTS -Z -w 4M -l 1M -P __STREAMS__ -O__OMIT__ hout FREQ_PROCFS (echo "scale=1"; sed -n 's/cpu MHz.*: \([0-9]*\)\..*$/(\1+10^2\/2)\/10^3/p' /proc/cpuinfo) | bc -l | head -n1 |