HA-Proxy version 1.4.18 2011/09/16
Copyright 2000-2011 Willy Tarreau <[email protected]>
Build options :
TARGET = linux26
CPU = generic
CC = gcc
CFLAGS = -O2 -g -fno-strict-aliasing
OPTIONS = USE_LINUX_SPLICE=1 USE_LINUX_TPROXY=1 USE_PCRE=1
Default settings :
maxconn = 2000, bufsize = 16384, maxrewrite = 8192, maxpollevents = 200
Encrypted password support via crypt(3): yes
Available polling systems :
sepoll : pref=400, test result OK
epoll : pref=300, test result OK
poll : pref=200, test result OK
select : pref=150, test result OK
Total: 4 (4 usable), will use sepoll.
>Hi,
>please CC the list, so everyone is seeing your responses.
> Ubuntu 12.04 LTS, Kernel 3.5, Haproxy 1.4.22 from repo
please provide the output from "haproxy -vv" nonetheless. It should have
been compiled with the linux2628 target, as this will enable features like
tcp splicing.
> No, I need to handle 10GE, maybe even more using 1 loadbalancer
> Hardware is: 2 x E5620 XEON, 96GB RAM, Dual 10Gbit/s Intel NIC.
This kind of performance can be accomplished (see [1]), but you need to
configure the kernel and haproxy accordingly.
Also please make sure you read the documentation very carefully about every
setting you make.
You disabled for example splicing, epoll and sepoll, which I think doesn't
make any sense and will slow down haproxy significantly.
> Each download is limited to 700Kbit/s and files are from 40MB till 900MB.
So you are not hosting small html, css, js files but only big files for one
time download, is this correct?
Then TCP splicing will be very effective and you will not see much CPU
cycles spend in haproxy, but in the kernel. This also allows you to use just
a single haproxy process.
> > option http-no-delay
> >Same here, does your application really needs this?
> Yes, backend is also supporting it
You said the files you're serving are at least 40MB; for sure this is not a
realtime application and http-no-delay means higher CPU usage and more
overhead due to more packets on the network, so the proxy will be slower
with this configuration.
> > Why are you disabling maxaccept, can you elaborate this?
> Was thinking that 80k limit of connections will not be enough
I'm not sure I understand what you mean; I suggest you remove this command
as well, it may harm performance of established connections.
So what I'm suggesting is:
- remove the following configuration:
> noepoll
> nokqueue
> nopoll
> nosepoll
> nosplice
- also remove:
> option http-no-delay
> tune.maxaccept
- configure TCP splicing according to the doc [2]
- remove "nbproc 20", a single process will be enough
- pin haproxy to a specific core, and the interrupt handling to
another core, but on the same CPU, so that shared CPU cache
can be used between interrupt handling and haproxy
- then monitor CPU usage under heavy load
Lukas
[1] http://haproxy.1wt.eu/10g.html
[2]
http://cbonte.github.com/haproxy-dconv/configuration-1.4.html#option%20splic
e-auto