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.

(+-275 connections if both Tx and Rx are fully-buffered, but most TCP
uses are asymmetrical)


Is that guess correct?


B) We are in a network situation where we would like
'net.inet.tcp.recvspace' around 64 KiB.
We would like to serve 300 simultaneous connections.

In our situation, it is hard to avoid that processing of incoming data
occasionally halts for a short period (disk I/O and locking).

Are there safe OpenBSD sysctl & kernel compile settings that allow this?

    * This would suggest kern.maxclusters = 300 connections * 64
      KiB/connection / 1460 Ethernet-bytes/mbuf-cluster = roughly
      15000.  (right?)

    * But that would exhaust the default kernel memory pool too much. 
      (right?)

      (it would allocate 15000 mbuf-clusters * 2048
      alloc-bytes/mbuf-cluster = 29 MiB )


If we understand correctly, i386 is too cramped in virtual address space
to increase the kernel memory pool safely.

But supposing we move our i386 servers into early retirement, can
OpenBSD do it (with safe headroom) on amd64?

Reply via email to