-
Notifications
You must be signed in to change notification settings - Fork 12
switch HA-proxy tests to h1load client #69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
e118d97 to
67ed709
Compare
nhorman
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks fine to me, but I'm a bit confused as to how h1load gets setup with this test. Is it meant to be run by hand independently?
it's run by it's the the part up to collecting results is mostly done. I'm still working on gnuplot scripts to post-process data. I will include them to separate PR. |
|
Sasha, before you spend too much time on gnuplot scripts, I'll share you some hints to ease your job (e.g. using -ll instead of -l to have raw numbers instead of human-friendly ones). I'm also finalizing a few small changes that ease selecting relevant lines if you want to compute averages. I'll ping you soon about this. |
|
Walter, thanks a lot. I will be also happy for tips on how to set the h1load arguments. to run benchmark tests. |
|
Agreed, that's what I want to show you because it's not quite hard. With -d you can set the duration of the test, with -s you can configure a slow ramp-up period (absolutely necessary to avoid measurement errors), and I'll also show you how to pick the relevant values to provide a meaningful measure. On the haproxy side, using taskset is an easy and convenient way to select the number of threads you want. I'll try to dedicate you some time next week to work on this. Today I'm busy chasing a few bugs. |
be2f9de to
7d10408
Compare
jogme
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First iteration - only cosmetics
|
You comment that you aren't using siege as a client - but I still see a pile of references there - is this expected? Is it still actually used? If so the PR comment should be updated. |
I will fix the comment. I think it is useful to keep both tools working just for a cross check. |
This change also simplifies current HA-proxy test set up.
Testing no longer requires apache/nginx server as backend.
Test also uses h1load [1] client now.
The pull request also installs httpterm [2] http/1.1 server.
It's used as a backend for tests perfromed by siege [3].
The HA-proxy configuration for testing matches the configuration
used in 'State of SSL stacks' [4] write up.
The h1load client currently runs with options as follows :
h1load
-l \ # long results, output expected by h1load shell script
-P \ # report also percentiles for gathared data
-d ${TEST_TIME} \ # test duration, TEST_TIME is 10secs
-c 500 \ # 500 concurrent connections
-t ${THREAD_COUNT} \ # gather data for 1, 2, 4, 8, 16, 32, 64 threads
-u \ # use runtime instead of system time
${BASE_URL}${PORT} # url where to connect to
[1] https://github.com/wtarreau/h1load
[2] https://github.com/wtarreau/httpterm
[3] https://github.com/JoeDog/siege
[4] https://www.haproxy.com/blog/state-of-ssl-stacks
1c43370 to
7e377ad
Compare
|
|
||
| function install_h1load { | ||
| typeset SSL_LIB=$1 | ||
| typeset H1LOAD_REPO="https://github.com/sashan/h1load" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are you referencing own repo? Is there h1load upstream PR for changes you have?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was using the fork because I had to modify the gnuplot scripts. but it looks like there is no reason to keep those modifications around.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BTW @Sashan, when you're forced to change stuff in h1load, do not hesitate to ping me for merging it. The program receives few modifications and most of them are totally relevant and more than welcome, because generally we all face similar limitations/difficulties that we all painfully work around using scripts. So don't be shy!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think those ended up in the update to README. I'm going to give try the new h1load. And see how it will go. There will be follow up PR which will let gnuplot to generate charts. It will be gathering date from h1load output and also from siege. The h1load data are more detailed the siege is just for cross-check.
| # this fork adds -u option to keep time as uptime | ||
| # | ||
| cd "${WORKSPACE_ROOT}" || exit 1 | ||
| git clone -b float "${H1LOAD_REPO}" "${DIRNAME}" || exit 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fatal: Remote branch float not found in upstream origin
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this looks like a leftover after sashan changed the repo from his fork to upstream
bench-scripts/bench_run_haproxy.sh
Outdated
| -d ${TEST_TIME} \ | ||
| -c 500 \ | ||
| -t ${THREAD_COUNT} \ | ||
| -u \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-u seems to be gone.
| } | ||
|
|
||
| check_env | ||
| setup_tests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we do plot_result here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is a follow up PR
…nt to HA-proxy tests
jogme
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
| install_haproxy openssl-master | ||
| install_httpterm openssl-master | ||
| install_h1load openssl-master | ||
| install_siege openssl-master |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
note: I can't install siege on manjaro, but that's not an issue of this script.
It can't properly detect string.h - even the config says it founds it (fails on HAVE_STRCMP)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks, for review. I think ?Nikola? reported the siege does not build on ?suse? if I remember correct. Let's get it working on Ubuntu first.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It cannot be built anywhere. The last version is pretty broken.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ubuntu works fine
This change simplifies current HA-proxy test set up. Testing no longer requires apache/nginx server as backend. Instead of using siege as a client the test uses
h1load [1].
The pull request also install httpterm [2] http/1.1 server. It's unused currently.
The HA-proxy configuration for testing matches the configuration used in 'State of SSL stacks' write up.
The h1load client currently runs with options as follows :
h1load
-l \ # long results, output expected by h1load shell script
-P \ # report also percentiles for gathared data
-d ${TEST_TIME} \ # test duration, TEST_TIME is 10secs
-c 500 \ # 500 concurrent connections
-t ${THREAD_COUNT} \ # gather data for 1, 2, 4, 8, 16, 32, 64 threads
-u \ # use runtime instead of system time
${BASE_URL}${PORT} # url where to connect to
The options above is just the initial version.
[1] https://github.com/wtarreau/h1load
[2] https://github.com/wtarreau/httpterm
[3] https://www.haproxy.com/blog/state-of-ssl-stacks