On Fri, 5 Dec 2003, Alex Hayward wrote: > > proxy# sysctl -a | grep maxfiles > > kern.maxfiles: 4136 > > kern.maxfilesperproc: 3722 > > maxfiles seems a little low if you are expecting lots of > connections; you'll probably need to set both maxfiles and > nmbclusters a bit higher in your kernel configuration. I don't think > that increasing it with sysctl will increase maxsockets as well. > Increasing net.inet.tcp.tcbhashsize in /boot/loader.conf might be a > good idea, too.
You SHOULD be setting "maxusers" in your FreeBSD kernel configuration to "0" (which is already the default, so you have to knowingly change it), which means it will auto-tune many kernel parameters, including maxfiles, based on the amount of installed memory. A FreeBSD 4.9 system with 1GB RAM and maxusers set to 0 should have: # sysctl kern.maxfiles kern.maxfilesperproc kern.ipc.nmbclusters kern.ipc.nmbufs kern.ipc.maxsockets kern.maxfiles: 12328 kern.maxfilesperproc: 11095 kern.ipc.nmbclusters: 6656 kern.ipc.nmbufs: 26624 kern.ipc.maxsockets: 12328 Which is (by default) quite a bit higher than what you have now... Incidentally, you can also set kern.maxusers="0" in /boot/loader.conf if you don't want to re-compile the kernel, but that is already the default so you would have had to re-compile the kernel or change loader.conf to get anything but "0" anyway. -- Chris Dillon - cdillon(at)wolves.k12.mo.us FreeBSD: The fastest, most open, and most stable OS on the planet - Available for IA32, IA64, PC98, Alpha, and UltraSPARC architectures - x86-64, PowerPC, ARM, MIPS, and S/390 under development - http://www.freebsd.org Q: Because it reverses the logical flow of conversation. A: Why is putting a reply at the top of the message frowned upon?
