FreeBSD 6.1 max sockets

Chuck Swiger cswiger at mac.com
Thu Oct 19 17:14:28 UTC 2006


On Oct 19, 2006, at 8:24 AM, ke han wrote:
> So my desire is two things:
> 1 - good event handling for knowing which sockets have new data.  I  
> assume kqueue is the way to go here?

kqueue would be a fine choice, otherwise the typical mechanism  
involves using select().

> 2 - I need to know what my limits are on max number of sockets.  If  
> my system is a 64-bit install on a server with 8GB RAM, I need to  
> know how many sockets I can handle.  Also, what options do I have  
> to tune this?  socket buffer size?  Any kernel parameters needed to  
> tune?

See the sysctl kern.ipc.maxsockets.  You can change this and related  
settings by adjusting loader.conf (see /boot/defaults/loader.conf and  
"man tuning" about "LOADER TUNABLES")...

-- 
-Chuck





More information about the freebsd-questions mailing list