aboutgitcodebugslistschat
path: root/test/lib
diff options
context:
space:
mode:
authorStefano Brivio <sbrivio@redhat.com>2021-10-21 04:54:05 +0200
committerStefano Brivio <sbrivio@redhat.com>2021-10-21 04:54:05 +0200
commitc3f8e4d2cd55e57419478ff849265d1e342e7990 (patch)
treed4e204ea27ae268f8df03557d51c72b5c47f2108 /test/lib
parent1f3d6f96b5bb1ec59fed27d4048166187fc62d41 (diff)
downloadpasst-c3f8e4d2cd55e57419478ff849265d1e342e7990.tar
passt-c3f8e4d2cd55e57419478ff849265d1e342e7990.tar.gz
passt-c3f8e4d2cd55e57419478ff849265d1e342e7990.tar.bz2
passt-c3f8e4d2cd55e57419478ff849265d1e342e7990.tar.lz
passt-c3f8e4d2cd55e57419478ff849265d1e342e7990.tar.xz
passt-c3f8e4d2cd55e57419478ff849265d1e342e7990.tar.zst
passt-c3f8e4d2cd55e57419478ff849265d1e342e7990.zip
test/perf: Actually load passt enough to test UDP performance
With recent improvements, we're not CPU-bound at all while testing UDP performance. Give the VM more memory and CPUs, forward two additional ports, start up to four threads in parallel, and give single iperf3 threads higher bandwidth targets. Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'test/lib')
-rwxr-xr-xtest/lib/setup13
1 files changed, 8 insertions, 5 deletions
diff --git a/test/lib/setup b/test/lib/setup
index a81e91f..124e35b 100755
--- a/test/lib/setup
+++ b/test/lib/setup
@@ -13,9 +13,9 @@
# Copyright (c) 2021 Red Hat GmbH
# Author: Stefano Brivio <sbrivio@redhat.com>
-VCPUS="$( [ $(nproc) -ge 8 ] && echo 4 || echo $(( $(nproc) / 2 + 1 )) )"
+VCPUS="$( [ $(nproc) -ge 8 ] && echo 6 || echo $(( $(nproc) / 2 + 1 )) )"
__mem_kib="$(sed -n 's/MemTotal:[ ]*\([0-9]*\) kB/\1/p' /proc/meminfo)"
-VMEM="$((${__mem_kib} / 1024 / 8))"
+VMEM="$((${__mem_kib} / 1024 / 4))"
# setup_build() - Set up pane layout for build tests
setup_build() {
@@ -107,6 +107,9 @@ setup_passt_in_ns() {
# 10011 as server | forwarded to guest | spliced to ns
# 10012 | as server | spliced to ns
# 10013 | spliced to init | as server
+ #
+ # 10021 as server | forwarded to guest |
+ # 10031 as server | forwarded to guest |
__opts=
[ ${PCAP} -eq 1 ] && __opts="${__opts} -p /tmp/pasta_with_passt.pcap"
@@ -138,8 +141,8 @@ setup_passt_in_ns() {
[ ${PCAP} -eq 1 ] && __opts="${__opts} -p /tmp/passt_in_pasta.pcap"
[ ${DEBUG} -eq 1 ] && __opts="${__opts} -d"
- #pane_run PASST "valgrind --max-stackframe=3000000 ./passt -f ${__opts} -t 10001,10011 -u 10001,10011"
- pane_run PASST "./passt -f ${__opts} -t 10001,10011 -u 10001,10011"
+ #pane_run PASST "valgrind --max-stackframe=3000000 ./passt -f ${__opts} -t 10001,10011,10021,10031 -u 10001,10011,10021,10031"
+ pane_run PASST "./passt -f ${__opts} -t 10001,10011,10021,10031 -u 10001,10011,10021,10031"
sleep 1
pane_run GUEST './qrap 5 kvm -m '${VMEM}' -cpu host -smp '${VCPUS} \
@@ -148,7 +151,7 @@ setup_passt_in_ns() {
'-nodefaults ' \
'-append "console=ttyS0 mitigations=off apparmor=0 ' \
'virtio-net.napi_tx=1"' \
- "-device virtio-net-pci,netdev=hostnet0,x-txburst=131072"\
+ "-device virtio-net-pci,netdev=hostnet0,x-txburst=262144"\
"-netdev socket,fd=5,id=hostnet0"
pane_wait GUEST
}