windows-server-2008 – 混合以太网速度的Windows 2008 Server
我有一个
Windows Server 2008 R2 x64服??务器,它是AD控制器和文件服务器.我有一个问题,Windows XP客户端从共享下载文件的速度非常慢(低于10Mbps,实际上低于每秒10兆比特).
服务器使用1Gbps Nvidia NForce卡连接到1Gbps交换机,客户端使用100Mbps内置卡连接. 当我从CentOS Linux 5.5 Live-USB启动客户端计算机并使用smbclient进行下载时,也可以看到这种缓慢的下载.但是从Linux服务器上下载Samba共享,也是使用1Gbps链接连接的速度很快. 很奇怪我创建了一对程序(下面附带),用于测试C#中的普通TCP吞吐量,并且它们按预期运行 – 大约89Mbps. 我在客户端禁用了防火墙,我使用的是dot_nc_l 21000>客户端上的NIL和dot_nc [client_ip]< Windows服务器上的100m.dat.当我从共享中复制相同的100MB文件需要2分钟时,我大约需要9秒钟. 如何消除这个? 在Linux客户端上使用wireshark生成的一些图片: 从1Gbps网卡连接的Windows 2008 CIFS文件服务器向带有smbclient的100Mbps网卡连接的Centos 5 Linux客户端下载100MB文件: 以下是这些程序(链接使用mono的gmcs编译,需要.NET2):
using System; using System.IO; using System.Diagnostics; using System.Net.Sockets; public class dot_nc { public static void Main(string[] args) { string hostname = args[0]; int port = int.Parse(args[1]); Stopwatch stopwatch = new Stopwatch(); stopwatch.Start(); TcpClient client = new TcpClient(hostname,port); stopwatch.Stop(); Console.WriteLine("Connection: {0}ms",stopwatch.ElapsedMilliseconds); stopwatch.Reset(); stopwatch.Start(); byte[] buffer = new byte[4096]; { Stream stdin = Console.OpenStandardInput(); NetworkStream netout = client.GetStream(); while ( true ) { int bytesread = stdin.Read(buffer,buffer.Length); if ( bytesread <= 0 ) { break; } netout.Write(buffer,bytesread); } } stopwatch.Stop(); Console.WriteLine("Sending: {0}ms",stopwatch.ElapsedMilliseconds); client.Close(); } }
using System; using System.IO; using System.Diagnostics; using System.Net; using System.Net.Sockets; public class dot_nc { public static void Main(string[] args) { int port = int.Parse(args[0]); TcpListener server = new TcpListener(IPAddress.Any,port); server.Start(); TcpClient client = server.AcceptTcpClient(); NetworkStream netin = client.GetStream(); byte[] buffer = new byte[4096]; Stream stdout = Console.OpenStandardOutput(); int processed_bytes = 0; int processed_chunks = 0; while ( true ) { int bytesread = netin.Read(buffer,buffer.Length); if ( bytesread <= 0 ) { break; } stdout.Write(buffer,bytesread); processed_bytes += bytesread; processed_chunks++; } netin.Close(); client.Close(); server.Stop(); Console.Error.WriteLine( "Received: {0} chunks of data of {1} average size",processed_chunks,processed_bytes/processed_chunks ); } }
问题是由以下原因引起的:
>廉价的千兆交换机中的数据包缓冲区太小; 由于禁用了流量控制,因此Windows使用1Gbps连接以一批方式发送最大窗口大小的数据包.由于100Mbps客户端接收数据包的速度要慢得多,因此几乎所有窗口大小的数据都需要通过交换机进行缓冲.由于这个便宜的交换机具有非常小的缓冲区(缓冲区大小甚至没有在规范中声明,但每个端口必须小于64kB,因为即使禁用窗口缩放也没有帮助)它必须丢弃多余的数据包.数据包丢失导致图表上出现约0.25秒的延迟.但是,在文件服务中使用的拥塞避免算法,或者缺少它,并没有减少TCP窗口大小,因此下一批数据包并不小 – 它一次又一次地拥塞连接导致congestion collapse. 标准TCP连接(不是文件服务)必须使用不同的拥塞控制算法,并且不会重复拥塞.我认为特别是Windows TCP堆栈处理文件服务有助于对基准测试,例如Samba. 所以解决方案是: >在网络适配器属性中启用流控制.它不是一个理想的解决方案,因为任何文件服务传输到100Mbps客户端也会减慢到1Gbps客户端的并发传输速度,速度低于100Mbps. 感谢SpacemanSpiff,他的评论有助于解决这个问题. (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
- microsoft-graph – 无法访问Microsoft Graph AP
- Win32 .:如何在没有正则表达式的情况下擦除HTML?
- Win10下Wireshark找不到网卡的方法
- 如何使用量角器控制Windows文件选择器
- windows-server-2008 – Windows Server2008 Rem
- 什么是Windows 7上的Internet Explorer 11? ES2
- windows-server-2003 – w32tm / query / config
- windows-phone-7 – Windows Phone 7设置
- 自动部署Windows服务 – 工具
- windows-mobile – 如何在Windows Mobile 6中创建