Android内核网络丢包分析

1 网络丢包分析工具
set_irq_affinity
netstat -i
netstat -su (for Linux desktop)
ethtool -g eth0
ethtool -G eth0 tx 4096
MSS(Maximum Segment Size)就是IP数据包每次能传输的最大数据分段,这个值是MTU值减去IP数据包头大小20Byte和TCP数据段的包头20Byte。即MSS + 40 = MTU。

2 socket发送接收缓冲区修改
2.1 Windows
Windows默认是8K。
AFD:Ancillary Function Driver for WinSock

[HKEY_LOCAL_MACHINE \SYSTEM \CurrentControlSet\Services\Afd\Parameters]
DefaultReceiveWindow = 1800 (16进制)
DefaultSendWindow = 1800(16进制)

2.2 Linux
/proc/sys/net/core/rmem_default
/proc/sys/net/core/wmem_default 

3 dropwatch

4 URLs
windows 系统中的 afd 驱动
https://www.cnblogs.com/pied/p/8465243.html

http://smallvoid.com/article/winnt-winsock-buffer.html

如何解决UDP丢包问题
https://jingyan.baidu.com/article/2c8c281d6b0c6d0008252a07.html

TCP/UDP丢包常见问题小结 增加 udp缓存
https://blog.csdn.net/weixin_40592935/article/details/82224082

发布了121 篇原创文章 · 获赞 47 · 访问量 31万+

猜你喜欢

转载自blog.csdn.net/zoosenpin/article/details/103934187