如何在 MAC OS X 中获得最大 TCP 接收/发送窗口?
如何在 MAC OS X 中获得最大 TCP 接收/发送窗口?
Linux中有两个ctl。 /proc/sys/net/core/rmem_max - 最大 TCP 接收窗口 (NET_CORE_RMEM_MAX) /proc/sys/net/core/wmem_max - 最大 TCP 发送窗口 (NET_CORE_WMEM_MAX)
但我找不到如何在 mac os 中获取这些参数。
有人知道吗?
我在 MAC OS X 中找到了以下 ctls: net.inet.tcp.recvspace, net.inet.tcp.sendspace, kern.ipc.maxsockbuf
看来recvspace+sendspace不能大于maxsockbuf。 我在这里读到过: http://www.macgeekery.com/tips/configuration/mac_os_x_network_tuning_guide_revisited
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我不确定这些是否正确,但请尝试 sysctl -n net.inet.tcp.recvspace 和 sysctl -n net.inet.tcp.sendspace >。您可以使用 sysctl -w 来设置它们(请参阅 man sysctl )。
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
).正如OP提到的:recvspace+sendspace
recvspace+sendspace
recvspace+sendspace
recvspace+sendspace < maxsockbuf
maxsockbuf
受kern.ipc.nmbclusters
限制,nmbclusters*2KB/16=maxsockbuf
要增大
maxsockbuf< /code>,告诉系统使用超过
通过 ncl boot arg 的默认
mbufclusters
:(您需要在编辑 boot-args 之前禁用 SIP)引用 此处
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 thedefault
mbufclusters
via the ncl boot arg: (you need to disable SIP before edit boot-args)quote from here