[scripts] Add benchmarks snippets for h2load.

This commit is contained in:
Ciprian Dorin Craciun 2021-12-17 14:19:41 +02:00
parent 64df0cbc8d
commit b7c641201e
2 changed files with 81 additions and 0 deletions

View file

@ -55,6 +55,37 @@
:: benchmark / wrk / https / 1 :: exec -- "${ZRUN[@]}" ':: benchmark / wrk / https' "${@}" --threads 1 --connections 1 :: benchmark / wrk / https / 1 :: exec -- "${ZRUN[@]}" ':: benchmark / wrk / https' "${@}" --threads 1 --connections 1
:: benchmark / h2load / https / 16384 :: exec -- "${ZRUN[@]}" ':: benchmark / h2load / https' "${@}" --threads 2 --clients 16384 --h1 --connection-inactivity-timeout 6s
:: benchmark / h2load / https / 4096 :: exec -- "${ZRUN[@]}" ':: benchmark / h2load / https' "${@}" --threads 2 --clients 4096 --h1
:: benchmark / h2load / https / 2048 :: exec -- "${ZRUN[@]}" ':: benchmark / h2load / https' "${@}" --threads 2 --clients 2048 --h1
:: benchmark / h2load / https / 1024 :: exec -- "${ZRUN[@]}" ':: benchmark / h2load / https' "${@}" --threads 2 --clients 1024 --h1
:: benchmark / h2load / https / 512 :: exec -- "${ZRUN[@]}" ':: benchmark / h2load / https' "${@}" --threads 2 --clients 512 --h1
:: benchmark / h2load / https / 256 :: exec -- "${ZRUN[@]}" ':: benchmark / h2load / https' "${@}" --threads 2 --clients 256 --h1
:: benchmark / h2load / https / 128 :: exec -- "${ZRUN[@]}" ':: benchmark / h2load / https' "${@}" --threads 2 --clients 128 --h1
:: benchmark / h2load / https / 64 :: exec -- "${ZRUN[@]}" ':: benchmark / h2load / https' "${@}" --threads 2 --clients 64 --h1
:: benchmark / h2load / https / 32 :: exec -- "${ZRUN[@]}" ':: benchmark / h2load / https' "${@}" --threads 2 --clients 32 --h1
:: benchmark / h2load / https / 16 :: exec -- "${ZRUN[@]}" ':: benchmark / h2load / https' "${@}" --threads 2 --clients 16 --h1
:: benchmark / h2load / https / 8 :: exec -- "${ZRUN[@]}" ':: benchmark / h2load / https' "${@}" --threads 1 --clients 8 --h1
:: benchmark / h2load / https / 4 :: exec -- "${ZRUN[@]}" ':: benchmark / h2load / https' "${@}" --threads 1 --clients 4 --h1
:: benchmark / h2load / https / 2 :: exec -- "${ZRUN[@]}" ':: benchmark / h2load / https' "${@}" --threads 1 --clients 2 --h1
:: benchmark / h2load / https / 1 :: exec -- "${ZRUN[@]}" ':: benchmark / h2load / https' "${@}" --threads 1 --clients 1 --h1
:: benchmark / h2load / http2 / 16384 :: exec -- "${ZRUN[@]}" ':: benchmark / h2load / https' "${@}" --threads 2 --clients 16384 --npn-list=h2 --connection-inactivity-timeout 6s
:: benchmark / h2load / http2 / 4096 :: exec -- "${ZRUN[@]}" ':: benchmark / h2load / https' "${@}" --threads 2 --clients 4096 --npn-list=h2
:: benchmark / h2load / http2 / 2048 :: exec -- "${ZRUN[@]}" ':: benchmark / h2load / https' "${@}" --threads 2 --clients 2048 --npn-list=h2
:: benchmark / h2load / http2 / 1024 :: exec -- "${ZRUN[@]}" ':: benchmark / h2load / https' "${@}" --threads 2 --clients 1024 --npn-list=h2
:: benchmark / h2load / http2 / 512 :: exec -- "${ZRUN[@]}" ':: benchmark / h2load / https' "${@}" --threads 2 --clients 512 --npn-list=h2
:: benchmark / h2load / http2 / 256 :: exec -- "${ZRUN[@]}" ':: benchmark / h2load / https' "${@}" --threads 2 --clients 256 --npn-list=h2
:: benchmark / h2load / http2 / 128 :: exec -- "${ZRUN[@]}" ':: benchmark / h2load / https' "${@}" --threads 2 --clients 128 --npn-list=h2
:: benchmark / h2load / http2 / 64 :: exec -- "${ZRUN[@]}" ':: benchmark / h2load / https' "${@}" --threads 2 --clients 64 --npn-list=h2
:: benchmark / h2load / http2 / 32 :: exec -- "${ZRUN[@]}" ':: benchmark / h2load / https' "${@}" --threads 2 --clients 32 --npn-list=h2
:: benchmark / h2load / http2 / 16 :: exec -- "${ZRUN[@]}" ':: benchmark / h2load / https' "${@}" --threads 2 --clients 16 --npn-list=h2
:: benchmark / h2load / http2 / 8 :: exec -- "${ZRUN[@]}" ':: benchmark / h2load / https' "${@}" --threads 1 --clients 8 --npn-list=h2
:: benchmark / h2load / http2 / 4 :: exec -- "${ZRUN[@]}" ':: benchmark / h2load / https' "${@}" --threads 1 --clients 4 --npn-list=h2
:: benchmark / h2load / http2 / 2 :: exec -- "${ZRUN[@]}" ':: benchmark / h2load / https' "${@}" --threads 1 --clients 2 --npn-list=h2
:: benchmark / h2load / http2 / 1 :: exec -- "${ZRUN[@]}" ':: benchmark / h2load / https' "${@}" --threads 1 --clients 1 --npn-list=h2
--<< benchmark / server --<< benchmark / server
@ -279,6 +310,51 @@
<< benchmark / h2load / http
exec -- "${ZRUN[@]}" ':: benchmark / h2load' http 127.9.185.194:8080 "${@}"
!!
<< benchmark / h2load / https
exec -- "${ZRUN[@]}" ':: benchmark / h2load' https 127.9.185.194:8443 "${@}"
!!
--<< benchmark / h2load
test "${#}" -ge 2
_url_base="${1}://${2}"
shift -- 2
if test "${#}" -ge 1 ; then
if test "${1:0:1}" != '-' ; then
_path="${1}"
_path="${_path#/}"
shift -- 1
else
_path=''
fi
else
_path=''
fi
exec -- \
sudo -u root -n -E -P -- \
taskset -c 2,3 \
nice -n -19 -- \
ionice -c 2 -n 0 -- \
chrt -r 10 \
prlimit -n262144 -- \
sudo -u "${USER}" -n -E -P -- \
"${ZRUN[@]}" ':: tools / h2load' \
"${@}" \
-- \
"${_url_base}/${_path}" \
#
!!
<< benchmark / nghttp / https << benchmark / nghttp / https
exec -- "${ZRUN[@]}" ':: benchmark / nghttp' https 127.9.185.194:8443 "${@}" exec -- "${ZRUN[@]}" ':: benchmark / nghttp' https 127.9.185.194:8443 "${@}"
!! !!

View file

@ -32,6 +32,11 @@
env -i -- \ env -i -- \
./.bin/nodaemon \ ./.bin/nodaemon \
./.bin/h2load \ ./.bin/h2load \
--threads 1 \
--clients 1 \
--connection-inactivity-timeout 1 \
--duration 30 \
--warm-up-time 1 \
"${@}" \ "${@}" \
# #
!! !!