Hi Tim,

On Tue, Dec 22, 2009 at 10:29 PM, Tim Nelson <tnel...@rockbochs.com> wrote:

> ----- "Gerald A" <geraldabli...@gmail.com> wrote:
> > Hey Tim,
> > Adding RAM won't increase MBUFs, if I remember correctly. It is a kernel
> param, and can be tweaked by recompiling the kernel. (It may nowadays be
> possible to massage it by sysctl, or as a boot time param, but I'm not
> sure). So, you can tweak it without adding RAM.
>

After a bit of research, I found that they had made this a sysctl:

 sysctl kern.ipc.nmbclusters

The example I found mentioned 65535 as a number, your mileage may vary.

> I've seen this when an ipfw rule prevented sending, like for a ping. Could
> it be a > fw rule that is causing this? (Just grasping at straws).
>
> Right now, it's just functioning as a 'core' router with NAT turned off.
> All interfaces have "Allow any protocol from anywhere to anywhere" rules on
> them. There are no other services enabled, not even dns forwarder or DHCP.
> Just pure routing and RIP.
>
> Looking at my edge firewall, I see MBUF usage like this:  738 /1845 which
> is very odd since that box also has 256MB RAM. The only difference is that
> my edge box has 2x128MB DIMMs and my core (problematic box) has a single
> 256MB DIMM. Are the MBUF values calculated randomly? Where do they come
> from?
>

I tried doing some research on this one, and wasn't as successful. From what
I recall, there is some important constant somewhere in the kernel sources
that sets this up initially. It might now additionally be sized by RAM or
some other magic, and since it's a dynamic tunable, you can tweak it at
boottime (or anytime).

I'd be surprised if it was random. One thing you did mention was that your
"core" box has 5 interfaces -- my off the cuff guess would be that mbufs are
added as the number of interfaces increases. It would make sense, since you
would potentially have more network traffic requiring more resources.

Thanks,
Gerald.

Reply via email to