mac上本地网络传输问题

31 views
Skip to first unread message

deletex

unread,
Feb 6, 2015, 4:35:17 AM2/6/15
to dev4s...@googlegroups.com
在我的Mac电脑中,以太网网卡的ip为:10.3.48.82
使用iperf -s 启动服务器
使用iperf -c 10.3.48.82 -n 131072 进行测试,不到1秒就传完,131072 = 128K
使用iperf -c 10.3.48.82 -n 131073 进行测试,需要34秒传完,131073 = 128K + 1

以下是相关指令的执行结果,所有操作均在该Mac电脑上,请问为什么会这样

=================================================================================
执行命令:ifconfig
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 1500
options=3<RXCSUM,TXCSUM>        
inet 127.0.0.1 netmask 0xff000000
nd6 options=1<PERFORMNUD>

gif0: flags=8010<POINTOPOINT,MULTICAST> mtu 1280
stf0: flags=0<> mtu 1280

en0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
options=10b<RXCSUM,TXCSUM,VLAN_HWTAGGING,AV>
ether xx:xx:xx:xx:xx:xx
inet 10.3.48.82 netmask 0xffffff00 broadcast 10.3.48.255
nd6 options=1<PERFORMNUD>
media: autoselect (100baseTX <full-duplex>)
status: active

en1: flags=8963<UP,BROADCAST,SMART,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500
ether xx:xx:xx:xx:xx:xx
nd6 options=1<PERFORMNUD>
media: autoselect
status: active

bridge100: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
options=3<RXCSUM,TXCSUM>
ether xx:xx:xx:xx:xx:xx
inet 192.168.2.1 netmask 0xffffff00 broadcast 192.168.2.255
Configuration:
id 0:0:0:0:0:0 priority 0 hellotime 0 fwddelay 0
maxage 0 holdcnt 0 proto stp maxaddr 100 timeout 1200
root id 0:0:0:0:0:0 priority 0 ifcost 0 port 0
ipfilter disabled flags 0x2
member: en1 flags=3<LEARNING,DISCOVER>
ifmaxaddr 0 port 5 priority 0 path cost 0
media: autoselect
status: active



=================================================================================
执行命令:iperf -s
------------------------------------------------------------
Server listening on TCP port 5001
TCP window size:  128 KByte (default)
------------------------------------------------------------
[  4] local 10.3.48.82 port 5001 connected with 10.3.48.82 port 52100
[  5] local 10.3.48.82 port 5001 connected with 10.3.48.82 port 52101
[ ID] Interval       Transfer     Bandwidth
[  4]  0.0-41.2 sec   128 KBytes  25.5 Kbits/sec



=================================================================================
第一次执行命令:iperf -c 10.3.48.82 -n 131072
------------------------------------------------------------
Client connecting to 10.3.48.82, TCP port 5001
TCP window size:  129 KByte (default)
------------------------------------------------------------
[  4] local 10.3.48.82 port 52100 connected with 10.3.48.82 port 5001
[ ID] Interval       Transfer     Bandwidth
[  4]  0.0- 0.0 sec   128 KBytes  30.0 Gbits/sec



=================================================================================
第二次执行命令:iperf -c 10.3.48.82 -n 131073
------------------------------------------------------------
Client connecting to 10.3.48.82, TCP port 5001
TCP window size:  129 KByte (default)
------------------------------------------------------------
[  4] local 10.3.48.82 port 52101 connected with 10.3.48.82 port 5001
[ ID] Interval       Transfer     Bandwidth
[  4]  0.0-34.3 sec   256 KBytes  61.1 Kbits/sec



=================================================================================
内核参数:
net.inet.ip.fw.enable: 0
net.local.stream.sendspace: 65535
net.local.stream.recvspace: 65535
net.local.dgram.recvspace: 4096
net.inet.tcp.sendspace: 131072
net.inet.tcp.recvspace: 131072
net.inet.udp.recvspace: 196724
net.inet.raw.recvspace: 8192
Reply all
Reply to author
Forward
0 new messages