问题: 文件下载到远程办公室,从服务器提取数据的速度停留在 128KB/秒(Windows 资源管理器报告),大约为 1mbps。
问题: 为什么当我从具有 20 mbps 互联网连接的服务器中提取文件时,无法接近远程办公室的下载速度 750KB/秒或 6 mbps?
linux openVPN server 20/20 mbps internet connection (server location - EoC service)
-same LAN as openVPN server is ubuntu RAID10 file server, SAMBA
windows7 openVPN client 10/2 mbps internet connection (remote office - ADSL service)
iperf 结果:
TCP
openVPN client box (remote office)
iperf -s
openVPN server box
iperf -c <remoteOffice **public IP**>
[ ID] Interval Transfer Bandwidth
[ 3] 0.0-10.3 sec 6.75 MBytes 5.48 Mbits/sec
openVPN server box
iperf -c <remoteOffice **openVPN IP**>
[ ID] Interval Transfer Bandwidth
[ 3] 0.0-10.2 sec 7.12 MBytes 5.84 Mbits/sec
UDP
openVPN client box (remote office)
iperf -s -u
openVPN server box
iperf -c <remoteOffice **public IP**> -u -b 6M
[ ID] Interval Transfer Bandwidth Jitter Lost/Total Datagrams
[ 3] 0.0-10.0 sec 7.15 MBytes 6.01 Mbits/sec 0.307 ms 0/ 5102 (0%)
[ 3] 0.0-10.0 sec 1 datagrams received out-of-order
penVPN server box
iperf -c <remoteOffice **openVPN IP**> -u -b 6M
[ ID] Interval Transfer Bandwidth Jitter Lost/Total Datagrams
[ 3] 0.0-10.0 sec 7.15 MBytes 6.00 Mbits/sec 1.310 ms 0/ 5103 (0%)
从服务器位置上传到远程办公室的数据以大致符合我预期的速率发送,即受到远程办公室 10 mbps 下载连接的限制。
通过公共接口和 openVPN 适配器进行的测试似乎相似。为什么 windows7 无法达到上面显示的速度?
编辑——按要求
这些结果确实很奇怪......
iperf 结果相反:
TCP
openVPN server box
iperf -s
openVPN client box (remote office)
iperf -c <server **public IP**>
[ ID] Interval Transfer Bandwidth
[ 3] 0.0-11.0 sec 2.00 MBytes 1.52 Mbits/sec
openVPN client box (remote office)
iperf -c <server **openVPN Server IP**>
[ ID] Interval Transfer Bandwidth
[ 3] 0.0-10.3 sec 7.75 MBytes 6.34 Mbits/sec
UDP
openVPN server box
iperf -s -u
openVPN client box (remote office)
iperf -c <server **public IP**> -u -b 6M
[ ID] Interval Transfer Bandwidth Jitter Lost/Total Datagrams
[ 3] 0.0-12.1 sec 1.03 MBytes 711 Kbits/sec 7.327 ms 4367/ 5101 (86%)
openVPN client box (remote office)
iperf -c <server **openVPN IP**> -u -b 6M
[ ID] Interval Transfer Bandwidth Jitter Lost/Total Datagrams
[ 3] 0.0- 9.8 sec 7.15 MBytes 6.11 Mbits/sec 1.686 ms 0/ 5102 (0%)
[ 3] 0.0- 9.8 sec 1 datagrams received out-of-order
编辑 - 2015 年 8 月 10 日 我从 Windows Server 2008 文件共享的 LAN 内的 Windows7 机子上进行了一些测试;速度为 100MB/秒。
从 Ubuntu Server Samba 共享传输的同一文件的速度为 64MB/秒。
在 openVPN 连接中传输速度差异相同。Windows Server 2008 共享 - 1.4MB/秒。Ubuntu Server Samba 共享 - 70KB/秒。
我研究了 Ubuntu Server Samba Socket Options 问题,发现
SO_RCVBUF=8192 SO_SNDBUF=8192
我增加了发送/接收缓冲区到
SO_RCVBUF=65536 SO_SNDBUF=65536
现在,Win. Server 和 Ubuntu Samba 共享之间的传输速度差不多。因此,最终看来是 Samba 配置错误,而不是 openVPN 导致了传输缓慢。