Subject: Re: keepalive per socket settings patch
To: None <tech-net@netbsd.org>
From: Christos Zoulas <christos@astron.com>
List: tech-net
Date: 06/20/2007 14:34:48
In article <rmi3b0m918g.fsf@fnord.ir.bbn.com>,
Greg Troxel  <gdt@ir.bbn.com> wrote:
>Darren Reed <darrenr@netbsd.org> writes:
>
>> Christos Zoulas wrote:
>>> Hi,
>>>
>>> This is pretty straight forward... The question is do we let setsockopt
>>> specify arbitrary values, or do we cap them to the global settings like
>>> I do now? Comments? If there are no disagreements I will commit this after
>>> I write the documentation. If there are, speak now and I won't bother
>>> with the docs.
>
>I think that a program should be able to ask for values both higher and
>lower than the global default setting.
>
>> The bigger problem is the lower bound....
>> Is it too much to allow an application to specify it as being 500ms?
>> And what if apache does this for all n000 connections?
>> Should that just be a configuration error or ...?
>
>I think 500 ms is crazy; I bet if you went to IETF everyone would say
>that's abusive.  Thoughts:

The granularity is 1sec. Perhaps 0 should be disallowed for the interval.

>  keepalive interval should be well greater than RTT

But you don't always know the RTT at the point you set it.

>  keepalive intercal should only be short enough to keep broken nat
>  boxes working
>
>  if someone has truly odd needs they can rebuild and we can discuss
>
>I would suggest 30 seconds as the minimum settable value, or maybe 15.

I would think that even 5 seconds is acceptable.

>I suggest not limiting the high value.  If an admin does want to force
>apps that don't want keepalive, then that's another sysctl to override
>policy but it seems unwarranted.

I don't know. Linux does it. I don't see the downside of letting it
become bigger than the limits, so I will change it. I will also change
the minimum interval to 1 second.

christos