From owner-freebsd-net@FreeBSD.ORG Tue Oct 2 20:45:25 2007 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0082216A46C for ; Tue, 2 Oct 2007 20:45:25 +0000 (UTC) (envelope-from jamie.ostrowski@gmail.com) Received: from mu-out-0910.google.com (mu-out-0910.google.com [209.85.134.189]) by mx1.freebsd.org (Postfix) with ESMTP id 66E0A13C457 for ; Tue, 2 Oct 2007 20:45:24 +0000 (UTC) (envelope-from jamie.ostrowski@gmail.com) Received: by mu-out-0910.google.com with SMTP id w9so5318063mue for ; Tue, 02 Oct 2007 13:45:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type; bh=DAMKCpjQnBNUuwXSWWcwp+bVrG954fzKAFyqLpx7/80=; b=lWSH0SpbWJIegaHDU6GEpi8QYK8v5asxKIsCjGA5wi0pJVcFb1hYqjuJ6tVxXKHbnankN4I0FNowJCS8x8XdkFfEg25/JfP5mVHlgtVrTk6eptvXO/BVBxSstXrqro3ZBmfExaRxvu5qUe+rL113kHzIevyHlGfZeRqlDkSWSVE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:mime-version:content-type; b=IQM66D7GvKdPpEs7wwwn10vd4buiDMQ4Eo/y6jz/t1sUxpJX3btAuYXF90sx+nvDbHKygAX2HijqTX9RVG8fFpe0VBb5qoK4gfxHXUU0g6yRnAqlY1tAL3Lg0mZUDRHJFowibCVDFgHiGgHyEjXnN30i6qE9MAc2XuhWUbPP7NM= Received: by 10.82.126.5 with SMTP id y5mr19836761buc.1191357922737; Tue, 02 Oct 2007 13:45:22 -0700 (PDT) Received: by 10.82.161.2 with HTTP; Tue, 2 Oct 2007 13:45:22 -0700 (PDT) Message-ID: <29ae62fc0710021345o4bf4f7e5xd0594205f9fb9bbc@mail.gmail.com> Date: Tue, 2 Oct 2007 15:45:22 -0500 From: "Jamie Ostrowski" To: freebsd-net@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Troubleshooting with netstat X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Oct 2007 20:45:25 -0000 I am having a difficult time interpreting the output of netstat, and I wonder if anyone can help shed some light on the netstat man page and help me interpret the results I'm getting. If I run netstat -al -p tcp I got a long list (810 entries) of network connections. 606 of these are at TIME_WAIT status. Since I was getting network connections, I assumed that due to the above output from netstat that the TIME_WAIT connections were filling my network buffer queues. So, I tried to increase the size of the queues, and limit the expiration time on the connections: sysctl kern.ipc.somaxconn=1024 (was 128) sysctl net.inet.tcp.msl=15000 (was 30000) The whole idea was to open up the size of the connection queue and allow more tcp connections to come in while at the same time limiting the amount of time they hung around so the older ones would leave the queue faster. Strangely, I my machine is STILL dropping approx 20% of my connections. How can I view the queue with netstat? What I'd like to know is how many empty slots I have available for connections at any given point in time. What I want to know is, as I am increasing my somaxconn, is my queue getting bigger? If so, why are connections still being dropped? Strangely, when I run %netstat -L -f inet -p tcp Current listen queue sizes (qlen/incqlen/maxqlen) Proto Listen Local Address tcp4 0/0/50 localhost.domain tcp4 0/0/50 janus.domain