Re: Problem with haproxy under testload

From: Willy Tarreau <>
Date: Fri, 20 Feb 2009 06:47:06 +0100

On Thu, Feb 19, 2009 at 03:59:54PM -0800, Valentino Volonghi wrote:
> >Could you check net.ipv4.tcp_tw_reuse, and set it to 1 if it's zero ?
> It probably was set to 0... This fix and the change of tcp_mem to the
> standard values (which are created dynamically depending on the
> available memory) basically fixed the problem.


> Now HaProxy is giving me much much better latency numbers than
> nginx,

That's surprizing since the two products rely on a similar architecture.

> and that's what I was looking for. Now 2 machines combined
> run at a maximum of about 4700 req/sec more or less and average
> latency for the full request is 0.311 while the fastest is 77ms.

You should try to play with the "maxconn" parameter on the server line in order to reduce the number of concurrent connections on apache. It will surely reduce the response time and increase the number of reqs per second. In my experience, apache is performing the best between 30 and 200 concurrent requests. I would expect something like 20-30% better performance under load with "maxconn 100" than without when you load it with 1000 concurrent requests.

Willy Received on 2009/02/20 06:47

This archive was generated by hypermail 2.2.0 : 2009/02/20 08:00 CET