On Wed, Jan 20, 2010 at 01:01:37AM -0500, Ted Unangst wrote: > On Tue, Jan 19, 2010 at 6:33 PM, chefren <[email protected]> wrote: > > Network defaults in OpenBSD 4.6 (i386 & amd64): > > kern.maxclusters = 6144 > > net.inet.tcp.recvspace = 16 KiB > > > > > > A) From skimming the OpenBSD kernel source code we get the impression > > that this will allow, very roughly: > > > > 6144 mbuf-clusters > > * 1460 Ethernet-bytes/mbuf-cluster > > / 16 KiB/connection > > = roughly 550 fully-buffered TCP connections. > > > > i.e. after +- 550 connections, further TCP connections can get refused. > > It doesn't quite work like that. Connections and mbufs aren't really > connected. My understanding is you're more likely to have 2000 > connections with only a little bit buffered in each one, unless you > are deliberately refusing to read the data. >
While receive side buffers are normaly empty the send side ones are normally filled. The send buffers will fill to around the delay * bandwith product. Servers with many TCP connections will hit the limit of kern.maxclusters (there is a warning in dmesg for this case) and if the box has enough memory (and kvm) it is save to increase the maxclusters. So unless you hit the limit I would not fiddle with the sysctl but if you hit it you should increase the number and use netstat -m to figure out the sweet spot. -- :wq Claudio

