

Typical application connections on a user machine, under normal network conditions, won’t normally use more than 128 to 256KB of buffer memory at peak utilization. That is a considerable amount of memory per socket. In the case of my Macbook running Mavericks 10.9, that means I could have a total of 16 sockets open each with a maximum of 8MB of buffer memory assigned. The standard calculation sets this value to 1/16th of the total amount of memory allocated to the mbuf pool. This value sets the maximum amount of Bytes of memory that can be allocated to a single socket. But, what I do know is the standard way the system calculates the buffer settings and can reverse those values to arrive at the number. I have not found a way to reveal the actual allocation value. That is double the value I see set on my Macbook running Mountain Lion 10.8 with 8Gig of RAM. OSX Mavericks 10.9 running on a brand new Macbook with 16Gig of RAM appears to have been configured to allocate 128MB of memory to the mbuf pool.
TCP TWEAKE TOOL FOR A MAC FREE
Anyone that has this information, feel free to share it here in the comments.
TCP TWEAKE TOOL FOR A MAC INSTALL
I have not been able to identify if OSX detects the amount of system RAM upon install and sets the built-in boot argument as part of the install script or if it is just arbitrarily defined for a particular OSX release. Thus, you want to set a limit as to how much memory a single connection can consume, balanced based on peak profile usage. This memory must be fairly allocated with per socket/connection thresholds to reasonably protect you from starving the entire system with just a handful of network connections. Based on my research, BSD, the underlying OS that OS X is built on top of, defaults to assigning 64MB of memory to the mbuf pool. The default value seems to be set based on the amount of physical RAM your system has installed.

This is the basis for determining most of the buffer and socket threshold values which can impact network throughput and connection scalability.

This boot-time parameter governs the scalability of network connections, in terms of the simultaneous number supported and how much data can be queued in either direction. Probably the most fundamental yet debatable system option for network tuning is memory allocation to the mbuf buffer pools. You can also find my latest updates for High Sierra and Mojave in my most recent post here. However, please refer to my original post for the gory details and caveats related to previous OSX releases. Much of this configuration and the settings are backwards compatible to previous OSX releases. This updated post is intended to address performance tuning the IP stack on OSX Mavericks and, hopefully, eliminate some of the confusion around many of the caveats and options, as this is a fairly complex topic. My previous post on this topic has gotten over 55,000 views and generated quite a bit of feedback and questions. This is my second post on performance tuning the OSX network stack.
