mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-01-09 23:39:55 +00:00
BUG/MEDIUM: buffers: do not round up buffer size during allocation
When users request 16384 bytes for a buffer, they get 16392 after rounding up. This is problematic for SSL as it systematically causes a small 8-bytes message to be appended after the first 16kB message and costs about 15% of performance. Let's add MEM_F_EXACT to use exactly the size we need. This requires previous patch (MEDIUM: pools: add a new flag to avoid rounding pool size up). This issue was introduced in 1.6 and causes trouble there, so this fix must be backported. This is issue was reported by Gary Barrueto and diagnosed by Cyril Bont.
This commit is contained in:
parent
581bf81d34
commit
484b53da52
@ -36,7 +36,7 @@ int init_buffer()
|
||||
{
|
||||
void *buffer;
|
||||
|
||||
pool2_buffer = create_pool("buffer", sizeof (struct buffer) + global.tune.bufsize, MEM_F_SHARED);
|
||||
pool2_buffer = create_pool("buffer", sizeof (struct buffer) + global.tune.bufsize, MEM_F_SHARED|MEM_F_EXACT);
|
||||
if (!pool2_buffer)
|
||||
return 0;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user