Re: HAProxy Response time performance

From: Willy Tarreau <w#1wt.eu>
Date: Thu, 9 Jun 2011 22:01:54 +0200


Hi Matt,

On Thu, Jun 09, 2011 at 11:37:00AM -0700, Matt Christiansen wrote:
> I turned on those two options and seemed to help a little.
>
> We don't have a 2.6.30+ kernel so I don't believe option
> splice-response will work(?). Thats one of the things I'm going to try
> next.

Splicing is OK since 2.6.27.something. But it will not affect the time distribution at all.

> I used halog to narrow down the sample, it was still a few 100 lines
> so I picked three at random.
>
> Jun 1 14:19:59 localhost haproxy[3124]: 76.102.107.85:28023
> [01/Jun/2011:14:19:48.502] recs runtimes/sf-102 8062/0/0/3123/+11185
> 200 +814 - - ---- 1267/1267/18/14/0 0/0 {Apache-Coyote/1.1|3827|||}
> Jun 1 14:19:09 localhost haproxy[3124]: 96.229.202.77:56011
> [01/Jun/2011:14:19:00.861] recs runtimes/sf-103 4982/0/0/3956/+8938
> 200 +426 - - ---- 1214/1212/39/39/0 0/0 {Apache-Coyote/1.1|622|||}
> Jun 1 14:22:09 localhost haproxy[3124]: 108.68.28.81:59854
> [01/Jun/2011:14:19:02.218] recs runtimes/sf-110 3731/0/0/3844/+7575
> 200 +523 - - ---- 1214/1212/45/43/0 0/0 {Apache-Coyote/1.1|4856|||}
>
> If you need more I can attach the log, im removing the request url and
> referrer just because it has client info it, I'll have to ask if thats
> ok to post.

These lines indicate that the server took between 3.1 and 3.8 seconds to start responding. The variation in the server's response time is higher than the variation you observe in your tests, so it's really not easy to guess what happens, because it could as well be the server taking more time with requests from haproxy than from nginx as it could be haproxy by itself.

Could you please post your config ? Just replace any sensible information such as IP addresses, server names or user/passwords with XXXX. It's very possible we could spot something abnormal or suboptimal there but without a config it's hard to tell.

One thing which can be responsible for this is the frontend's backlog parameter, which defaults to the maxconn value. If it's too low, the system might drop some incoming connection requests from time to time.

Also, could you please report the output of "haproxy -vv", which indicates the build options and supported pollers ? After that we could suggest a few parameters to test.

Regards,
Willy Received on 2011/06/09 22:01

This archive was generated by hypermail 2.2.0 : 2011/06/09 22:15 CEST