Re: Understanding stress conditions of a haproxy setups

From: Willy Tarreau <w#1wt.eu>
Date: Mon, 6 Apr 2009 23:24:41 +0200


Hi,

On Mon, Apr 06, 2009 at 03:50:13PM -0300, Mariano Cortesi wrote:
> Hi,
>
> I'm trying to optimize my haproxy and servers configuration, but I'm
> having problem when I want to understand what's failing or limiting
> the configuration.
>
> I'm using autobench with httperf to generate up to 3000 to 5000
> request/second; I have a machine with haproxy, and two others with a
> nginx server each. And I have 3 computers using httperf to stress the
> application, all synchronized by autobench.
>
> My problem is that autobench reports that it could only achieve up to
> 2200 requests/second, when I requested 3000 or 4000. So I look for
> dropped connections, or failed requests in haproxy log and I don't
> find any.
>
> I already checked my test setup, so I check that each httperf client
> is able to substain a 2000 request/second, and I have 3 machines with
> httperf, so reaching that level shouldn't be a problem for them.
>
> I have the tcplog option activated, and the termination_state of the
> log is always '--' so, no problems there.
>
> I don't know where to look, so, I was wondering if anyone could tip me
> on what to look, and where to look for the reason that's limiting the
> request/second.

have you checked the CPU usage on your haproxy machine ? run "top -d 1". 2200 hits/s is rather low (I reach that on a Geode-500 MHz machine) but it is possible that you're having something eating all of your CPU on the machine (eg: a poorly configured ip_conntrack). It is also possible that you have network packet losses. I think that you should switch back to HTTP and log with "httplog". The timers will indicate what happens and when. If you observe connection times around 3sec, it's certain you're losing packets towards the servers. Depending on your machine, it may even be caused by the network interface.

Oh, what version of haproxy is this ?

Regards,
Willy Received on 2009/04/06 23:24

This archive was generated by hypermail 2.2.0 : 2009/04/06 23:30 CEST