Trouble with resources under network load

Chuck Swiger cswiger at mac.com
Sun Feb 5 08:45:13 PST 2006


Andrew Pantyukhin wrote:
> I've got P4 box with 256Mb RAM. I want it to be able to
> forward 5Mbit/s between 500 PPTP clients (no crypto/
> compression) and our ISP. I understand we should
> probably get Cisco for this, or at least a higher-spec
> box, but I just want this setup to be kinda proof of concept.
> Complicated things can be done using cheap hardware
> and a good OS. Can't they?

Sure.  :-)

> ====================================================
> 
> I'm constantly stumbling upon some out-of-resources
> problems. Just to name a couple:
> 
> named[400]: client 10.32.23.92#1714:
> error sending response: not enough free resources
> 
> snmpd[806]: sysctl get: Cannot allocate memory
> 
> ====================================================
> 
> I have these in loader.conf and sysctl.conf:
> 
> kern.maxfiles=65536
> kern.maxfilesperproc=65536
> net.graph.maxdgram=65536
> net.graph.recvspace=65536
> kern.maxusers=512
> kern.ipc.maxpipekva=268435456
> net.graph.maxalloc=65536
[ ... ]
> What's wrong?

For one thing, if you've got a machine with 256MB of RAM, you cannot possibly be
able to dedicate 256MB just to kern.ipc.maxpipekva.  Likewise, a machine with
256MB of users would auto-tune kern.maxusers to ~100 or so, and kern.maxfiles
ought to be under 10000, if not half that.

You should revert to the defaults and make gradual tuning changes, if needed,
from there.

-- 
-Chuck


More information about the freebsd-questions mailing list