Subject: Re: problem with mbufs
To: None <muc-lists-netbsd-tech-kern@moderators.muc.de>
From: Matthias Winter <ernesto_tequila@uni.de>
List: tech-kern
Date: 02/07/2002 10:34:35
hi

> > i have a i386 computer, working as network router / webserver.
everything
> > works fine since i changed nmbclusters from 256 -> 2048 (before that i
> > always got disconnects when there was a lot of traffic). But if the
traffic
> > gets really bad i still become disconnected by my ISP.
>
> If it's still not enough, keep raising NMBCLUSTERS - 4096 or 8192
> are still fairly sane values, 2048 is quite low for busy
> network router.
>
> > The error says something like: write: sendto: no buffer sdpace available
>
> Yeah, this is the symptom of mbuf shortage.
>
> > After reading through the articles oon netbsd.org I came to the opinion
that
> > the reason for this can be found at the kern.mbuf.msize
> > sysctl kern.mbuf.msize is 256 at the moment.. but how can i change this?
> > sysctl -w kern.mbuf.msize=512 ---> operation not permitted (does not
work on
> > all architectures?)
>
> You don't need to change the msize.
>
> > Can anyone tell me how to change this kernel option without compiling a
new
> > kernel? i have some probs with my hardware which make sbuilding a new
kernel
> > impossible for me at the moment!
>
> You can change the value for compiled kernel using gdb:
>
> > gdb --write /yourkernel
> (gdb) set nmbclusters 4096
> (gdb) quit
>
> reboot and that's it :)
>

i tried increasing nmbclusters, and the size was changed, but this did not
have a effect on the ppp disconnect behaviour :(
I increased the mbuf for testing prupose up to 131072 which did not help
either.

sysctl kern.mbuf

kern.mbuf.msize=256
kern.mbuf.mclbytes=2048
kern.mbuf.nmbclusters=131072
kern.mbuf.mblowat=16
kern.mbuf.mcllowat=8

Are the other settings correct? when i do netstat -m there is always a
reasonable amount of free space for the network, but i get disconnected
anyways. I am using the rp-pppoe driver (www.roaringpenguin.com) maybe this
gives anybody a hint.
The disconnects mainly appear when i start to run a edonkey server
(www.edonkey2000.com), and at about 50 connections (i should be able to
handle up to about 1000 clients) i get the ppp disconnect.
The disconnect messages says exactly this:

Feb 7 12:29:19 pppoe[254]: write (SendPacket): No buffer space available
Feb 7 12:29:19 pppd[252]: Modem Hangup
Feb 7 12.29.19 pppd[252]: Connection terminated
Feb 7 12:29:19 ppped[252] Connect time 12.1 minutes
Feb 7 12:29:19 /netbsd : IP Filter v3.4.9 unloaded
Feb 7 12:29:19 pppd[252] : Sent 516362 bytes , received 4612275 bytes

Thanks for any help

greets matthias