Re: [PATCH] : Count retries and redispatches also for servers + extend logs + %d->%u cleanup

From: Krzysztof Oledzki <ole#ans.pl>
Date: Mon, 3 Dec 2007 22:05:33 +0100 (CET)

On Mon, 3 Dec 2007, Willy Tarreau wrote:

> Hi Krzysztof,
>
> On Mon, Dec 03, 2007 at 01:15:57AM +0100, Krzysztof Oledzki wrote:
>>> From 9a41d4f9155826cc9034af5adec13e3029b1dc2f Mon Sep 17 00:00:00 2001
>> From: Krzysztof Piotr Oledzki <ole#ans.pl>
>> Date: Mon, 3 Dec 2007 00:43:15 +0100
>> Subject: [MINOR]: Count retries and redispatches also for servers + extend logs + %d->%u cleanup
>>
>> This patch extends a little previously added functionality to also
>> count retries and redispatches for servers. Now it is possible to know
>> which server causes redispatches as it is not alwas the same that takes
>> most retries.
>
> Ah OK I see, previously only the backend would account for redispatches.
> That's a good idea.

:)

>> I also extended log to add how many retries are still possible and fixed
>
> Don't you think it would be more useful to count the number of retries
> performed before getting the connection processed ? I think that putting
> the remaining retries in the logs does not bring much information as soon
> as you update your configuration. So most probably, you should log
> (be->retries - sv->conn_retries).

Indeed. I'll fix this. I also thinking about marking it somehow in logs when a redispatch forced by retries==0 has occurred. What is your opinion?

> Also, is it really useful in your situation to see the number of retries ?
> I'm not against merging the patch, I'm just wondering if that uncovers a
> lot of problems or just one in while.

Rather one in while: from a global [http] statistics you can obtain an information about final situation, but you don't known how does error distribution look like: was it a single situation caused by a massive traffic (so you may think about tuning knobs like minconn/maxconn) or maybe it is rather a constant tendency independent from things like number of connections, etc.

>> Finally, I changed %d -> %u for retries/redispatches as those variables
>> are declared as unsigned. Similar cleanup also applies to other variables,
>> will send additional patch if that is OK?
>
> I remember that a long time ago I stopped using one of the printf formats
> which was not found on all unixes, and I think it was %u, but I'm not sure,
> maybe I'm confusing with %llu and relatives. At least from the man pages,
> %u is OK on solaris and openbsd. Should be fine anywhere else. If so, yes
> you can update the fields you identify.

OK.

Best regards,

                                 Krzysztof Olędzki Received on 2007/12/03 22:05

This archive was generated by hypermail 2.2.0 : 2007/12/03 23:00 CET