Re: sysctl kern.ipc.somaxconn limit 65535 why?

From: Adrian Chadd <adrian_at_freebsd.org>
Date: Fri, 5 Oct 2012 07:11:16 -0700
On 5 October 2012 05:26, Ivan Voras <ivoras_at_freebsd.org> wrote:
> On 03/10/2012 22:15, Andre Oppermann wrote:
>
>> I guess the problem is rather kern.ipc.maxsockets which is only 25600.
>
>> maxsockets should be bumped up quite a bit by default IMO. How far needs
>> some analysis because there are some dependencies and memory
>> requirements.
>
> So, how about a heuristic, 20,000 + (5000 for every GB of RAM)?
>
> A small, 16 GB machine (yes, 16 GB is "small" nowadays) would have
> 100,000, which should be enough.

Well, it depends on what the server is being used for, right? If it's
a small object proxy/web server sure. But if it's a streaming server
you may only need a few thousand sockets but very deep send buffers.

Honestly, I'd really like the OP to come to us with workloads that
aren't working and get them fixed. We're a pretty smart bunch over
here and it's highly likely that both he and we would learn from the
process. :)

And double honestly, it may be nice to print out a "running out of
sockets!" warning, as well as a "running out of mbufs!" warning. Rate
limited, so people don't get spammed. But a gentle notification that
they should retune some stuff would be user-friendly.


Adrian
Received on Fri Oct 05 2012 - 12:11:16 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:31 UTC