Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 20 Jun 2001 17:35:24 -0400 (EDT)
From:      Marius <marius@mail.communityconnect.com>
To:        Mikko Tyolajarvi <mikko@dynas.se>
Cc:        stable@FreeBSD.org, questions@FreeBSD.org
Subject:   Re: running out of buffer space for sockets 
Message-ID:  <Pine.BSF.4.21.0106201734190.40196-100000@utterlux.hq.communitconnect.com>
In-Reply-To: <200106192008.f5JK8aY55684@explorer.rsa.com>

next in thread | previous in thread | raw e-mail | index | archive | help

Ah,

        Thank you that cleared up a lot of issues.  I have a greater idea
of what I am dealing with at least.    It is interesting that on the 4.x
machine my fstat output is about 10x what my output for sockstat is.  This
is not the case on my 3.x machines.  I am not _exactly_ sure what that
means, but now at least I have a way of looking into the problem.  Thank
you again.

-Marius M. Rex



On Tue, 19 Jun 2001, Mikko Tyolajarvi wrote:

> Yo!
>=20
> In local.freebsd.stable you write:
>=20
> >*smile*
>=20
> >=09Given my sometimes hideous abuse of the English language, it does
> >not surprise me that someone would think I made a typo.  Actually, I mea=
nt
> >what I said.  I am using thttpd not httpd.  It is a single instance,
> >spawning no children.
> >=09You have a point though, I will indeed scan the docs to see if
> >there is anything on thttpd's side that can be done to quell the tide. =
=20
> >=09The pecular part about this is that my 3.5-Stable servers don't have
> >such problems.  With the same augents to the kernel (maxusers at 128 =20
> >and NMBCLUSTERS at 16384) my 4.2-Stable box had significantly fewer
> >kernel resources then my 3.5-Stable boxen.  It would freeze up and die
> >(couldn't open more filehandles) after about a day of serving.  I manual=
ly
>=20
> You could be hitting the "maxsockets" limit (16k in your case).
>=20
> Dunno if this will help, but here is what I would do:
>=20
>  - Check that thttpd isn't leaking sockets (fds).  fstat -p PID | wc -l
>    Correlate with "sockstat | wc -l".  Try to figure out if all your
>    sockets are in use (I don't think you will see pending connections
>    with either of these commands, though).
>=20
>  - If you conclude thttpd is leaking sockets, fix it :-)
>=20
>  - Otherwise, it looks like "maxsockets" is a kernel tunable, so
>    echo kern.ipc.maxsockets=3D'"65536"' >> /boot/loader.conf
>    and reboot.  If the values below are correct, you are nowhere near
>    exhausting your mbufs.
>=20
>    Also see comment in /sys/kern/uipc_domain.c:domaininit()
>=20
>      $.02,
>      /Mikko
>=20
> [...]
>=20
> >>kern.ipc.maxsockets: 16384=09<- Lower than your 64k maxfiles
>=20
> [...]
>=20
> >># netstat -m
> >>7115/8624/65536 mbufs in use (current/peak/max):
> >>        5454 mbufs allocated to data
> >>        1661 mbufs allocated to packet headers
> >>5056/5854/16384 mbuf clusters in use (current/peak/max)
> >>13864 Kbytes allocated to network (28% of mb_map in use)
>=20
> Only about one third of buffers in use.
> --=20
>  Mikko Ty=F6l=E4j=E4rvi_______________________________________mikko@rsase=
curity.com
>  RSA Security
>=20



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0106201734190.40196-100000>