Re: [PATCH] Add support to tcp socket linger tweaking

From: Alexandre Cassen <acassen#freebox.fr>
Date: Sat, 29 Sep 2007 17:18:59 +0200 (CEST)


Hi Willy,

On Sat, 29 Sep 2007, Willy Tarreau wrote:
> There is something which puzzles me, because I'm not used to play with
> linger. Does the lingering apply after the last data segment has been
> ACKed or could it cause some data retransmits to be lost ? If the former,
> then yes it's wise to shorten the timeout, but if the later, maybe we
> should be able to tweak the value ? In all cases, I think it could be
> useful in the health-checking code too.
>
> BTW, if the option does not require any tweaking, maybe we should call
> it "nolinger" since its goal is precisely to disable lingering. I'm
> holding the patch so that we can discuss the feature a bit before
> merging it.

yes, nolinger is better, the fact is that (you know) I done both patches posted in a hurry last week :/ (especially proxy one).

> Also, I don't know if you have noticed, but there are quite a number
> of syscalls performed upon each accept(). A lot of setsockopt(), and
> now possibly the setsockopt(nolinger). I never found any way to make
> a socket inherit from the listen socket's options. Would you happen
> to know a trick to do this ? Otherwise, maybe we should slightly patch
> the kernel to provide this feature (eg: SO_INHERIT_OPTIONS), which
> haproxy would check during the listen so that it knows it has nothing
> to do to prepare the socket after an accept().

hmm, yes simple patch for the kernel, I add in my todo :)

cya,
Alex Received on 2007/09/29 17:18

This archive was generated by hypermail 2.2.0 : 2007/11/04 19:21 CET