Subject: Expanding network memory
To: None <netbsd-help@NetBSD.ORG>
From: Kevin Brown <kbrown@CS.Scarolina.EDU>
List: netbsd-help
Date: 05/16/1995 15:00:54
I'm planning on modifying the UDP/IP code in NetBSD 1.0 to test a new
protocol and it may be necessary to increase the amount of memory
allocated to the network.  I've found what appears to be the right spot
to do this, but I was hoping someone with more experience with this code
could enlighten me.

In /usr/src/sys/arch/i386/include/param.h, the number of mbuf clusters,
NMBCLUSTERS, is set to 512 or 256 depending on whether this is a gateway
or not.  Then VM_MBUF_SIZE in vmparam.h is based on NMBCLUSTERS.  So it
appears that by changing NMBUFCLUSTERS, I can increase the amount of
memory available to the network.

Are there other dependencies (other than h/w) or is this enough?

Also, netstat -m shows some number of mbufs in use and some number of
mapped pages in use.  I believe that each page is a cluster, but where
are the mbufs allocated from? (I would think from these same clusters,
but I can't tell)

Thanks for any help
--

Kevin Brown
Department of Computer Science       email: kbrown@cs.scarolina.edu
University of South Carolina         http://mingus.cs.scarolina.edu/brown.html
Columbia SC 29208                    (803) 777-3769