From owner-freebsd-current@FreeBSD.ORG Fri Oct 5 14:11:16 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DBD9A106566C; Fri, 5 Oct 2012 14:11:16 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-pb0-f54.google.com (mail-pb0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id A79248FC14; Fri, 5 Oct 2012 14:11:16 +0000 (UTC) Received: by mail-pb0-f54.google.com with SMTP id rp8so2136353pbb.13 for ; Fri, 05 Oct 2012 07:11:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=SGmvpax0szVpythFSy1T8h0cIqZ46szHFdv6sP03WfA=; b=vJLotuLJl7LtwRitXOW8opcZyDsJxQSEbCeafrHs1Tt9umzQvmU4f6DAcMjnf1q/fV 8aTpWJdlOnuJBwpAnv7GvN9Rb/ZSdcYb7QKPP5V2SURbr+N28jKOfva38NtAGU54astQ yeIom8126+XakClmAOfD8X+q1jLPgcHOUSomiZIW0tCuXhFZeUm1sBwkWTOAXq8GYLv6 ohrGJgcVNrrkOw+IIRVOB6eR47pGSzwkkLEHlW8Xb+QFfH1/KWtSnS/FC3zSpNiYezUE 4aqvM6pox7AlUltmk72eizz8zW3RSbEuPNVSrHHzzCZ/z7XO67XnT8DzUde030SbZcXy N7Pg== MIME-Version: 1.0 Received: by 10.68.232.71 with SMTP id tm7mr31278701pbc.118.1349446276230; Fri, 05 Oct 2012 07:11:16 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.68.223.136 with HTTP; Fri, 5 Oct 2012 07:11:16 -0700 (PDT) In-Reply-To: References: <03e101cda197$326dc240$974946c0$@org> <506C9CE4.6080400@freebsd.org> Date: Fri, 5 Oct 2012 07:11:16 -0700 X-Google-Sender-Auth: 70c__NgxbL4dMb8vTyp9M0AWrKg Message-ID: From: Adrian Chadd To: Ivan Voras Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-current@freebsd.org Subject: Re: sysctl kern.ipc.somaxconn limit 65535 why? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Oct 2012 14:11:17 -0000 On 5 October 2012 05:26, Ivan Voras 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