How to get maximum TCP Receive/Send window in MAC OS X?
There are two ctl in Linux. /proc/sys/net/core/rmem_max - Maximum TCP Receive Window (NET_CORE_RMEM_MAX) /proc/sys/net/core/wmem_max - Maximum TCP Send Window (NET_CORE_WMEM_MAX)
but i couldn't find how to get these parameters in mac os.
Does anybody know?
I have found the following ctls in MAC OS X: net.inet.tcp.recvspace, net.inet.tcp.sendspace, kern.ipc.maxsockbuf
It seems that recvspace+sendspace can't be greater than maxsockbuf. I have read about it here: http://www.macgeekery.com/tips/configuration/mac_os_x_network_tuning_guide_revisited
I'm not 100% sure whether these are the correct ones, but try
sysctl -n net.inet.tcp.recvspace
andsysctl -n net.inet.tcp.sendspace
. You can set them withsysctl -w
(seeman sysctl
).As OP mentioned:
recvspace+sendspace < maxsockbuf
maxsockbuf
is limited bykern.ipc.nmbclusters
,nmbclusters*2KB/16=maxsockbuf
To increase
maxsockbuf
, tell the system to use more than the defaultmbufclusters
via the ncl boot arg: (you need to disable SIP before edit boot-args)quote from here