How to get the maximum TCP send / receive window in MAC OS X?

How to get the maximum TCP send / receive window in MAC OS X?

There are two ctls on 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 could not find how to get these options in mac os.

Somebody knows?

On MAC OS X, I found the following ctls: net.inet.tcp.recvspace, net.inet.tcp.sendspace, kern.ipc.maxsockbuf

It seems that recvspace + sentpace could not be more than maxsockbuf. I read about it here: http://www.macgeekery.com/tips/configuration/mac_os_x_network_tuning_guide_revisited

+4
source share
2 answers

I am not 100% sure if they are correct, but try sysctl -n net.inet.tcp.recvspace and sysctl -n net.inet.tcp.sendspace . You can install them using sysctl -w (see man sysctl ).

+2
source

As mentioned in the OP: recvspace+sendspace < maxsockbuf

maxsockbuf limited to kern.ipc.nmbclusters , nmbclusters*2KB/16=maxsockbuf

 sysctl -a | egrep nmbcl\|maxsockb kern.ipc.maxsockbuf: 8388608 kern.ipc.nmbclusters: 65536 

To increase maxsockbuf , ask the system to use more than the default mbufclusters via the mbufclusters boot argument: (SIP must be disabled before editing boot arguments)

 nvram boot-args="ncl=131072" shutdown -r now 

quote from here

0
source

Source: https://habr.com/ru/post/1333030/


All Articles