How to get maximum TCP Receive/Send window in MAC OS X?

一曲冷凌霜 提交于 2019-12-04 10:03:29

I'm not 100% sure whether these are the correct ones, but try sysctl -n net.inet.tcp.recvspace and sysctl -n net.inet.tcp.sendspace. You can set them with sysctl -w (see man sysctl).

As OP mentioned: recvspace+sendspace < maxsockbuf

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

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

To increase maxsockbuf, tell the system to use more than the default mbufclusters via the ncl boot arg: (you need to disable SIP before edit boot-args)

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

quote from here

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!