如何为高性能单向传输调整 TCP? [英] how TCP can be tuned for high-performance one-way transmission?

查看:68
本文介绍了如何为高性能单向传输调整 TCP?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的(网络)客户端每 200 毫秒向我的服务器发送 50 到 100 KB 的数据包.有多达 300 个客户.服务器不向客户端发送任何内容.服务器(专用)和客户端在 LAN 中.如何调整 TCP 配置以获得更好的性能?Windows Server 2003 或 2008 上的服务器,Windows 2000 及更高版本上的客户端.

my (network) client sends 50 to 100 KB data packets every 200ms to my server. there're up to 300 clients. Server sends nothing to client. Server (dedicated) and clients are in LAN. How can I tune TCP configuration for better performance? Server on Windows Server 2003 or 2008, clients on Windows 2000 and up.

例如TCP 窗口大小.更改此参数有帮助吗?还要别的吗?任何特殊的套接字选项?

e.g. TCP window size. Does changing this parameter help? anything else? any special socket options?

:实际上在不同模式下数据包可以达到 5MB

: actually in different modes packets can be up to 5MB

推荐答案

几年前,我用 1700 个数据点对此进行了研究.结论是,您可以做的最好的事情是在接收器上配置一个巨大的套接字接收缓冲区(例如 512k).对侦听套接字执行此操作,因此它将被接受的套接字继承,因此在握手时已经设置了它.这反过来又允许在握手期间协商 TCP 窗口缩放,这允许客户端知道窗口大小 > 64k.巨大的窗口大小基本上允许客户端以最大可能的速率传输,仅受拥塞避免而不是关闭接收窗口的约束.

I did a study on this a couple of years ago wth 1700 data points. The conclusion was that the single best thing you can do is configure an enormous socket receive buffer (e.g. 512k) at the receiver. Do that to the listening socket, so it will be inherited by the accepted sockets, so it will already be set while they are handshaking. That in turn allows TCP window scaling to be negotiated during the handshake, which allows the client to know about the window size > 64k. The enormous window size basically lets the client transmit at the maximum possible rate, subject only to congestion avoidance rather than closed receive windows.

这篇关于如何为高性能单向传输调整 TCP?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆