windows tcp buffer size 调研

8 篇文章 0 订阅

what is tcp buffer size

TCP/IP buffers are too large and applications are not processing data fast enough
https://www.ibm.com/support/knowledgecenter/en/SSAW57_8.0.0/com.ibm.websphere.nd.doc/info/ae/ae/tprf_tunetcpip.html

经过一天的查找, 查到了一些信息

# 每个sockets占用20kb内存。

1GB/20kb = 52428 

http://blog.csdn.net/libaineu2004/article/details/38983913

# 本地安装cgywin,看看有没有ss命令
http://www.cygwin.com/setup-x86_64.exe


# 
typeperf "\Network Interface(*)\Output Queue Length" -sc 1

Get-Counter -ListSet * > getcounter.txt

PS D:\Users\ops\Desktop> (Get-Counter -ListSet "Network Interface").Paths
\Network Interface(*)\Bytes Total/sec
\Network Interface(*)\Packets/sec
\Network Interface(*)\Packets Received/sec
\Network Interface(*)\Packets Sent/sec
\Network Interface(*)\Current Bandwidth
\Network Interface(*)\Bytes Received/sec
\Network Interface(*)\Packets Received Unicast/sec
\Network Interface(*)\Packets Received Non-Unicast/sec
\Network Interface(*)\Packets Received Discarded
\Network Interface(*)\Packets Received Errors
\Network Interface(*)\Packets Received Unknown
\Network Interface(*)\Bytes Sent/sec
\Network Interface(*)\Packets Sent Unicast/sec
\Network Interface(*)\Packets Sent Non-Unicast/sec
\Network Interface(*)\Packets Outbound Discarded
\Network Interface(*)\Packets Outbound Errors
\Network Interface(*)\Output Queue Length
\Network Interface(*)\Offloaded Connections

(Get-Counter -ListSet "*").Paths > pathlist.txt
(Get-Counter -List *).Counter

# 查看tcp v4的一些状态,里面有active和passive哦,这个地方就是并发连接直接关心的地方
PS D:\Users\ops\Desktop> (Get-Counter -ListSet "TCPv4").Paths
\TCPv4\Segments/sec
\TCPv4\Connections Established
\TCPv4\Connections Active
\TCPv4\Connections Passive
\TCPv4\Connection Failures
\TCPv4\Connections Reset
\TCPv4\Segments Received/sec
\TCPv4\Segments Sent/sec
\TCPv4\Segments Retransmitted/sec

typeperf "\TCPv4\Connections"

# 
netstat -nT 2

# 
Get-NetTCPSetting
https://support.microsoft.com/en-us/help/328476/description-of-tcp-ip-settings-that-you-may-have-to-adjust-when-sql-server-connection-pooling-is-disabled

# 注册表里面你的
EnableDyanmicBackLog
MaximumBacklog
MinumumBacklog

https://social.msdn.microsoft.com/Forums/SqlServer/en-US/d38eaa3a-1814-4cbe-9a44-4e64dc24f446/increasing-tcp-connection-backlog-in-windows-2008?forum=winserver2008appcompatabilityandcertification

# 非常棒的一个关于windows tcpip参数调整的文章
http://smallvoid.com/article/winnt-tcpip-max-limit.html
https://www.ibm.com/support/knowledgecenter/en/SSAW57_8.5.5/com.ibm.websphere.nd.doc/ae/tprf_tunewindows.html

# 查看tcp状态的
http://www.nirsoft.net/utils/cports.html#DownloadLinks


# 更深入的一些参数
SO_RCVBUF
SO_SNDBUF
Recv-Q/Send-Q 

http://stackoverflow.com/questions/2655057/how-can-the-so-rcvbuf-be-smaller-than-the-tcp-receive-window-windows-xp
http://stackoverflow.com/questions/4257410/what-are-so-sndbuf-and-so-recvbuf

#

sndbuf and rcvbuf set to 786432
https://community.openvpn.net/openvpn/ticket/640

# 如何修改
http://www.miersengineering.com/2015/03/480/

[HKEY_LOCAL_MACHINE \SYSTEM \CurrentControlSet\Services\Afd\Parameters]

DefaultReceiveWindow = 10240
DefaultSendWindow = 10240

# 有用的 windows调整tcp参数
https://www.speedguide.net/articles/windows-8-2012-server-tcpip-tweaks-5077

http://yehrayyeh.blogspot.sg/2009/11/tcp-windows-size.html



# 不知道这个哥们这是搞得啥, 拉出来那么多的东西
PS D:\Users\ops>  Get-WmiObject -Namespace root\wmi -List  | Where-Object {$_.name -Match "MSNdis" } | Sort-Object

但是感觉还是没有深入到最本质的地方, 但是还是有点希望,就是使用 openfalcon在windows下面的监控,是否可以有点价值呢?

试试看。

继续翻阅资料

https://blog.stackpath.com/glossary/cwnd-and-rwnd/

http://www.nirsoft.net/utils/socket_sniffer.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值