]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: htx: make htx_add_data() never defragment the buffer
authorWilly Tarreau <w@1wt.eu>
Tue, 28 May 2019 08:58:50 +0000 (10:58 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 28 May 2019 12:48:59 +0000 (14:48 +0200)
commit0350b90e318f2e5a29d87159308d675a40cc8a1a
treee0ee6838ed002613322177a0dcbee5e385d331ce
parent0a7ef02074962152125af897492162a4bbb7bf07
MEDIUM: htx: make htx_add_data() never defragment the buffer

Now instead of trying to fit 100% of the input data into the output
buffer at the risk of defragmenting it, we put what fits into it only
and return the amount of bytes transferred. In a test, compared to the
previous commit, it increases the cached data rate from 44 Gbps to
55 Gbps and saves a lot in case of large buffers : with a 1 MB buffer,
uncached transfers jumped from 700 Mbps to 30 Gbps.
src/htx.c