Don Bowman writes: > > Doug White wrote: > > > On Sat, 29 Jun 2002, Don Bowman wrote: > > > > > > > > I have an application where there is lots of connections, > > > but packet sizes aren't that large. I'm running into the > > > problem where I need an enormous amount of clusters, > > > but the number of mbufs needed isn't as big: > > > > > > $ netstat -m > > > 141164/141200/512000 mbufs in use (current/peak/max): > > > 141163 mbufs allocated to data > > > 1 mbufs allocated to fragment reassembly queue headers > > > 127997/128000/128000 mbuf clusters in use (current/peak/max) > > > 291300 Kbytes allocated to network (10% of mb_map in use) > > > 121192 requests for memory denied > > > > holy cow. How much memory does this thing have and what did you do to > > abuse it soo much? :-) I didn't think you could jack those values that > > high and not get panics. > > > > I tried changing MCLSHIFT to 10. Although this would seem like > the right thing to do, some trouble ensues... Some things like nfs > don't seem to work right (just UDP traffic as far as I could see). > (10 would yield a 1K cluster). Are there > any assumptions somewhere that a cluster is >= MTU size?
Possibly. What nic driver are you using? > Also, how does one change the number of mbufs down? The sysctl > value is read-only. # Mbufs seems to be a constant 4x # clusters. You can set the boot-time tunables kern.ipc.nmbufs and kern.ipc.nmbclusters in /boot/loader.conf. There's a sanity check that enfornces that nmbufs be at least 2x nmbclusters in sys/kern/uipc_mbuf.c. You might want to start with: kern.ipc.nmbclusters=256000 kern.ipc.nmbufs=512000 This will use a max of 625MB of kernel memory for mbufs... You may also need to increase the limit of the mbuf malloc type Drew To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-stable" in the body of the message
