Re: Expected Performance?

From: Willy Tarreau <w#1wt.eu>
Date: Fri, 4 Jan 2008 07:20:56 +0100


Hi,

On Thu, Jan 03, 2008 at 11:40:05AM -0800, Tova Shio wrote:
> I've recently begun testing HAProxy[1] as a LB for web servers. Now,
> using httperf[2] I can get about 2k req/s directly from each Apache
> instance. With a roundrobin load balance between two Apache instances
> I can only seem to get 1.5k req/s.
>
> Does this seem like common/acceptable degradation?

You should never get a performance degradation, unless haproxy is installed on the same machine as one of the servers or as the httperf injection tool, with which it will have to share CPU ressources.

Check that you don't have the linux ip_conntrack module loaded on the machine (lsmod), because when this is the case, it consumes a *lot* of CPU.
> [1] HAProxy was compiled ala `make REGEX=pcre DEBUG=` and started
> using `./haproxy -f haproxy.cfg`.

Could you start it with -V ? It looks to me that you have no kernel-specific optimization enabled, so you're basically using select() or poll() which do not scale well with large number of concurrent connections. It should be quite better with only 1000 connections though.

Also, you should run "vmstat 1" on each machine to see if one of them looks abnormaly saturated.

> haproxy.cfg
>
>
> global
> daemon
> quiet
> pidfile /var/run/haproxy.pid
>
> listen http_proxy :80
> mode tcp
> balance roundrobin
> server web1 123.123.123.123
> server web2 123.123.123.124
> [2] httperf command used:
>
> httperf --hog --num-conns=1000 --num-calls=10000
> --server=208.75.87.203 --uri=/apache2-default/index.html

Regards,
Willy Received on 2008/01/04 07:20

This archive was generated by hypermail 2.2.0 : 2008/01/04 07:30 CET