mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-05 22:56:57 +02:00
A test run on a dual-socket EPYC 9845 (2x160 cores) showed that we'll be facing new limits during the lifetime of 3.2 with our current 16 groups and 256 threads max: $ cat test.cfg global cpu-policy perforamnce $ ./haproxy -dc -c -f test.cfg ... Thread CPU Bindings: Tgrp/Thr Tid CPU set 1/1-32 1-32 32: 0-15,320-335 2/1-32 33-64 32: 16-31,336-351 3/1-32 65-96 32: 32-47,352-367 4/1-32 97-128 32: 48-63,368-383 5/1-32 129-160 32: 64-79,384-399 6/1-32 161-192 32: 80-95,400-415 7/1-32 193-224 32: 96-111,416-431 8/1-32 225-256 32: 112-127,432-447 Raising the default limit to 1024 threads and 32 groups is sufficient to buy us enough margin for a long time (hopefully, please don't laugh, you, reader from the future): $ ./haproxy -dc -c -f test.cfg ... Thread CPU Bindings: Tgrp/Thr Tid CPU set 1/1-32 1-32 32: 0-15,320-335 2/1-32 33-64 32: 16-31,336-351 3/1-32 65-96 32: 32-47,352-367 4/1-32 97-128 32: 48-63,368-383 5/1-32 129-160 32: 64-79,384-399 6/1-32 161-192 32: 80-95,400-415 7/1-32 193-224 32: 96-111,416-431 8/1-32 225-256 32: 112-127,432-447 9/1-32 257-288 32: 128-143,448-463 10/1-32 289-320 32: 144-159,464-479 11/1-32 321-352 32: 160-175,480-495 12/1-32 353-384 32: 176-191,496-511 13/1-32 385-416 32: 192-207,512-527 14/1-32 417-448 32: 208-223,528-543 15/1-32 449-480 32: 224-239,544-559 16/1-32 481-512 32: 240-255,560-575 17/1-32 513-544 32: 256-271,576-591 18/1-32 545-576 32: 272-287,592-607 19/1-32 577-608 32: 288-303,608-623 20/1-32 609-640 32: 304-319,624-639 We can change this default now because it has no functional effect without any configured cpu-policy, so this will only be an opt-in and it's better to do it now than to have an effect during the maintenance phase. A tiny effect is a doubling of the number of pool buckets and stick-table shards internally, which means that aside slightly reducing contention in these areas, a dump of tables can enumerate keys in a different order (hence the adjustment in the vtc). The only really visible effect is a slightly higher static memory consumption (29->35 MB on a small config), but that difference remains even with 50k servers so that's pretty much acceptable. Thanks to Erwan Velu for the quick tests and the insights! |
||
---|---|---|
.. | ||
balance | ||
cache | ||
checks | ||
compression | ||
connection | ||
contrib | ||
converter | ||
filters | ||
http-capture | ||
http-cookies | ||
http-errorfiles | ||
http-messaging | ||
http-rules | ||
http-set-timeout | ||
jwt | ||
log | ||
lua | ||
mailers | ||
mcli | ||
peers | ||
pki | ||
sample_fetches | ||
seamless-reload | ||
server | ||
spoe | ||
ssl | ||
startup | ||
stats | ||
stick-table | ||
stickiness | ||
stream | ||
tcp-rules | ||
webstats | ||
README |
* Regression testing for HAProxy with VTest * This little README file is about how to compile and run vtest test case files (VTC files) to test HAProxy for any regression. To do so, you will have to compile vtest program sources which depends on Varnish cache application sources. vtest, formerly varnishtest, is a very useful program which has been developed to test Varnish cache application. vtest has been modified in collaboration with Varnish cache conceptor Poul-Henning Kamp to support HAProxy in addition to Varnish cache. See also: doc/regression-testing.txt * vtest compilation * $ git clone https://github.com/vtest/VTest $ cd VTest $ make vtest Then vtest program may be found at the root directory of vtest sources directory. The Varnish cache manuals are located in 'man' directory of Varnish cache sources directory. You will have to have a look at varnishtest(7) and vtc(7) manuals to use vtest. Some information may also be found in doc/regression-testing.txt in HAProxy sources. Note that VTC files for Varnish cache may be found in bin/varnishtest/tests directory of Varnish cache sources directory which may be found here: https://github.com/varnishcache/varnish-cache * vtest execution * You must set HAPROXY_PROGRAM environment variable to give the location of the HAProxy program to test to vtest: $ HAPROXY_PROGRAM=<my haproxy program> vtest ... The HAProxy VTC files found in HAProxy sources may be run with the reg-tests Makefile target. You must set the VTEST_PROGRAM environment variable to give the location of the vtest program which has been previously compiled. $ VTEST_PROGRAM=<my vtest program> make reg-tests "reg-tests" Makefile target run scripts/run-regtest.sh script. To get more information about this script run it with --help option. Note that vtest is run with -t10 and -l option. -l option is to keep keep vtest temporary directory in case of failed test cases. core files may be found in this directory (if enabled by ulimit). * vtest patches for HAProxy VTC files * When producing a patch to add a VTC regression testing file to reg-tests directory, please follow these simple rules: - If your VTC file needs others files, if possible, use the same basename as that of the VTC file, - Put these files in a directory with the same name as the code area concerned by the bug ('peers', 'lua', 'acl' etc). Please note that most tests use a common set of timeouts defined by the environment variable HAPROXY_TEST_TIMEOUT. As much as possible, for regular I/O (i.e. not errors), please try to reuse that setting so that the value may easily be adjusted when running in some particularly slow environments, or be shortened to fail faster on developers' machines.