From owner-freebsd-net@freebsd.org Thu May 24 18:15:26 2018 Return-Path: Delivered-To: freebsd-net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 98544EFA4D0 for ; Thu, 24 May 2018 18:15:26 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from hz.grosbein.net (unknown [IPv6:2a01:4f8:d12:604::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "hz.grosbein.net", Issuer "hz.grosbein.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 10DA97B9F5 for ; Thu, 24 May 2018 18:15:25 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from eg.sd.rdtc.ru (root@eg.sd.rdtc.ru [62.231.161.221] (may be forged)) by hz.grosbein.net (8.15.2/8.15.2) with ESMTPS id w4OIFHJZ017965 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 24 May 2018 20:15:17 +0200 (CEST) (envelope-from eugen@grosbein.net) X-Envelope-From: eugen@grosbein.net X-Envelope-To: rs@logitravel.com Received: from [10.58.0.4] ([10.58.0.4]) by eg.sd.rdtc.ru (8.15.2/8.15.2) with ESMTPS id w4OIFDge090104 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Fri, 25 May 2018 01:15:13 +0700 (+07) (envelope-from eugen@grosbein.net) Subject: Re: systat -ip, socket buffer full To: Ray , freebsd-net@freebsd.org References: From: Eugene Grosbein Message-ID: <5B07012D.4050003@grosbein.net> Date: Fri, 25 May 2018 01:15:09 +0700 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=2.2 required=5.0 tests=BAYES_00, LOCAL_FROM, RDNS_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.1 X-Spam-Report: * -0.0 SPF_PASS SPF: sender matches SPF record * -2.3 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 1.9 RDNS_NONE Delivered to internal network by a host with no rDNS * 2.6 LOCAL_FROM From my domains X-Spam-Level: ** X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on hz.grosbein.net X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 May 2018 18:15:26 -0000 24.05.2018 21:09, Ray wrote: > when checking systat -ip I see the value for "socket buffer full" with > values different from 0, I see 1, 2, up to 55 in one occasion. > > I asked on IRC and it was mentioned I should try to up > kern.ipc.soacceptqueue to 1024 from the default 128, but I could still see > values over 0 in "socket buffer full". > > How can I tune this buffer? > > We have a lot of UDP traffic (the server is a PBX serving around 200 agents > with avg 50 concurrent calls. Each (udp) socket has its own limit on receiving buffer size and it is application's duty to set its size to right value using setsockopt() function. You should read your PBX manual on how to configure it to use larger buffers. As last resort, you can raise sysctl kern.ipc.maxsockbuf that establishes default value for size of such buffers that is used when application does not change defaults. However, it may affect many applications in the system and lead to overflow of kernel memory pools unless you know what are you doing, has plenty of free physical memory and raised kernel limits accordingly, so better start with PBX documentation. kern.ipc.soacceptqueue has nothing to do with "socket buffer full" problem.