]> git.ipfire.org Git - thirdparty/haproxy.git/commit
[OPTIM] stream_sock: reduce the default number of accepted connections at once
authorWilly Tarreau <w@1wt.eu>
Fri, 22 Jul 2011 19:59:59 +0000 (21:59 +0200)
committerWilly Tarreau <w@1wt.eu>
Sun, 24 Jul 2011 14:12:27 +0000 (16:12 +0200)
commit4827fd2a7e695fef467004174c60e3d2aa03fc1c
treed18b8e93bc0d4fa87d5e1b5a978c79b09c53eee0
parent2b15492a751f6b3191c324c4d6a92e51f90273f0
[OPTIM] stream_sock: reduce the default number of accepted connections at once

By default on a single process, we accept 100 connections at once. This is too
much on recent CPUs where the cache is constantly thrashing, because we visit
all those connections several times. We should batch the processing slightly
less so that all the accepted session may remain in cache during their initial
processing.

Lowering the batch size from 100 to 32 has changed the connection rate for
concurrencies between 5-10k from 67 kcps to 94 kcps on a Core i5 660 (4M L3),
and forward rates from 30k to 39.5k.

Tests on this hardware show that values between 10 and 30 seem to do the job fine.
src/haproxy.c