Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 30 May 2004 00:28:16 -0500
From:      Henrik Hudson <lists@rhavenn.net>
To:        questions@freebsd.org
Subject:   socket resource / vm.zone question?
Message-ID:  <200405300028.16165.lists@rhavenn.net>

next in thread | raw e-mail | index | archive | help
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!



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200405300028.16165.lists>