Subject: Re: problem with mbufs
To: Matthias Winter <ernesto_tequila@uni.de>
From: Jaromir Dolecek <jdolecek@netbsd.org>
List: tech-kern
Date: 02/06/2002 21:11:16
Matthias Winter wrote:
> 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 :)

Jaromir
-- 
Jaromir Dolecek <jdolecek@NetBSD.org> http://www.NetBSD.org/Ports/i386/ps2.html
-=  Those who would give up liberty for a little temporary safety deserve  =-
-=  neither liberty nor safety, and will lose both.  -- Benjamin Franklin  =-