From owner-freebsd-questions@FreeBSD.ORG Sat May 29 22:35:28 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6731316A4CE for ; Sat, 29 May 2004 22:35:28 -0700 (PDT) Received: from smaug.rhavenn.net (rrcs-central-24-123-125-186.biz.rr.com [24.123.125.186]) by mx1.FreeBSD.org (Postfix) with ESMTP id BF62E43D39 for ; Sat, 29 May 2004 22:35:27 -0700 (PDT) (envelope-from lists@rhavenn.net) Received: from [172.20.0.144] (unknown [172.20.0.144]) by smaug.rhavenn.net (Postfix) with ESMTP id 1E74A2A8CA for ; Sun, 30 May 2004 00:47:30 -0500 (CDT) From: Henrik Hudson To: questions@freebsd.org Date: Sun, 30 May 2004 00:28:16 -0500 User-Agent: KMail/1.6.1 MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Message-Id: <200405300028.16165.lists@rhavenn.net> Subject: socket resource / vm.zone question? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: lists@rhavenn.net List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 May 2004 05:35:28 -0000 Hey List- I just installed Bind9 from ports (9.2.3) and I'm running into, I'm guessing, a resource issue. i'm setting up a slave server for a master of about 770 zones. When I pull in all the zones for the init of the slave I start getting socket.c errors and 48/Address already in use and failed setting up socket. Checking the Bind9 list I found one guy who was having issues and thought it was a TCP_WAIT issue and he was running out of sockets. His solution was to lower the MSL. (sysctl shows 30000 on my box..which is 30seconds???) Now, I'm guessing I'm just running out of resources, but I can't figure out what one. Here is the output and some info of stuff I "think" is relevant :) I'm not seeing any errors on the master. Box: 4.10 rel with 1GB RAM connecting to the master via a cable modem internet. kernel config: maxusers 512 NMBCLUSTERS=81920 netstat -am: 67/368/327680 mbufs in use (current/peak/max): 65 mbufs allocated to data 2 mbufs allocated to packet headers 64/160/81920 mbuf clusters in use (current/peak/max) 412 Kbytes allocated to network (0% of mb_map in use) 0 requests for memory denied 0 requests for memory delayed 0 calls to protocol drain routines netstat -an | grep TIME_WAIT | wc -l: first error at 70 max: 266 sysctl vm.zone: ITEM SIZE LIMIT USED FREE REQUESTS PIPE: 160, 0, 6, 96, 8444 SWAPMETA: 160, 126419, 0, 0, 0 unpcb: 160, 0, 9, 41, 1386 ripcb: 192, 81920, 0, 42, 24 syncache: 160, 15359, 0, 51, 63 tcpcb: 576, 81920, 279, 19, 7395 udpcb: 192, 81920, 7, 35, 158 socket: 224, 81920, 295, 34, 8965 KNOTE: 64, 0, 1, 127, 62 DIRHASH: 1024, 0, 222, 6, 244 NFSNODE: 352, 0, 0, 0, 0 NFSMOUNT: 544, 0, 0, 0, 0 VNODE: 192, 0, 17855, 59, 17855 NAMEI: 1024, 0, 0, 16, 304455 VMSPACE: 192, 0, 28, 100, 11434 PROC: 416, 0, 34, 64, 11455 DP fakepg: 64, 0, 0, 0, 0 PV ENTRY: 28, 2158060, 13370, 244460, 2488400 MAP ENTRY: 48, 0, 514, 294, 251353 KMAP ENTRY: 48, 64580, 140, 158, 12462 MAP: 108, 0, 7, 3, 7 VM OBJECT: 92, 0, 9252, 2268, 156118 The socket line is about the only one I can see that seems to approach 0 free. /etc/sysctl.conf: #maxfiles open kern.maxfiles=32768 kern.maxfilesperproc=32768 #number of listening network conns (default 128) kern.ipc.somaxconn=1024 #keeps connections open and checks them for disconnects net.inet.tcp.always_keepalive=1 note: i tried 0 here too) #last open port to be used by the system net.inet.ip.portrange.last=10000 (note: tried this too) I'm kind of stumped :) Thanks for any pointers or ideas. Henrik -- Henrik Hudson lists@rhavenn.net RTFM: Not just an acronym, it's the LAW!