During performance tests, Emeric faced a case where the wakeups of sc_conn_io_cb() caused by h2_resume_each_sending_h2s() was multiplied by 5-50 and a lot of CPU was being spent doing this for apparently no reason. The culprit is h2_send() not behaving well with congested buffers and small SSL records. What happens when the output is congested is that all buffers are full, and data are emitted in 2kB chunks, which are sufficient to wake all streams up again to ask them to send data again, something that will obviously only work for one of them at best, and waste a lot of CPU in wakeups and memcpy() due to the small buffers. When this happens, the performance can be divided by 2-2.5 on large objects. Here the chosen solution against this is to keep in mind that as long as there are still at least two buffers in the ring after calling xprt->snd_buf(), it means that the output is congested and there's no point trying again, because these data will just be placed into such buffers and will wait there. Instead we only mark the buffer decongested once we're back to a single allocated buffer in the ring. By doing so we preserve the ability to deal with large concurrent bursts while not causing a thundering herd by waking all streams for almost nothing. This needs to be backported to 2.7 and 2.6. Other versions could benefit from it as well but it's not strictly necessary, and we can reconsider this option if some excess calls to sc_conn_io_cb() are faced. Note that this fix depends on this recent commit: MINOR: buffer: add br_single() to check if a buffer ring has more than one buf
The HAProxy documentation has been split into a number of different files for ease of use. Please refer to the following files depending on what you're looking for : - INSTALL for instructions on how to build and install HAProxy - BRANCHES to understand the project's life cycle and what version to use - LICENSE for the project's license - CONTRIBUTING for the process to follow to submit contributions The more detailed documentation is located into the doc/ directory : - doc/intro.txt for a quick introduction on HAProxy - doc/configuration.txt for the configuration's reference manual - doc/lua.txt for the Lua's reference manual - doc/SPOE.txt for how to use the SPOE engine - doc/network-namespaces.txt for how to use network namespaces under Linux - doc/management.txt for the management guide - doc/regression-testing.txt for how to use the regression testing suite - doc/peers.txt for the peers protocol reference - doc/coding-style.txt for how to adopt HAProxy's coding style - doc/internals for developer-specific documentation (not all up to date)
Description
Languages
Shell
100%