新安装的 ubuntu,测试上传速度的时候永远无法超过 4m,同样环境安装的 centos 测速可以达到 40m,大概是什么原因呢?

1 LGA1150 Nov 30, 2018 via Android 用什么工具测的? iperf3 ? |
2 liuxu Nov 30, 2018 竟有如此怪异之事?我从 ubuntu12.04 用到现在 18.04 ,没见过 |
3 iwtbauh Nov 30, 2018 via Android 无线 or 有线? 网卡型号? 使用的驱动程序和版本? 供应商固件版本? 内核日志? |
4 liuxu Nov 30, 2018 如果是用 speedtest 测试的话,是测试节点问题,不要迷信它们,最好自己搞个网盘实际测试一下 liuxu:~$ speedtest Retrieving speedtest.net configuration... Testing from China Unicom Beijing (114.249.28.210)... Retrieving speedtest.net server list... Selecting best server based on ping... Hosted by Beijing Broadband Network (Beijing) [1.67 km]: 4.419 ms Testing download speed................................................................................ Download: 92.63 Mbit/s Testing upload speed...................................................................................................... Upload: 3.93 Mbit/s liuxu:~$ speedtest --server 5505 Retrieving speedtest.net configuration... Testing from China Unicom Beijing (114.249.28.210)... Retrieving speedtest.net server list... Retrieving information for the selected server... Hosted by Beijing Broadband Network (Beijing) [1.67 km]: 5.469 ms Testing download speed................................................................................ Download: 91.26 Mbit/s Testing upload speed..................................................................................................... Upload: 4.02 Mbit/s liuxu:~$ speedtest --server 17019 Retrieving speedtest.net configuration... Testing from China Unicom Beijing (114.249.28.210)... Retrieving speedtest.net server list... Retrieving information for the selected server... Hosted by CoreLink, Inc. (Shanghai) [1074.57 km]: 28.922 ms Testing download speed................................................................................ Download: 86.42 Mbit/s Testing upload speed...................................................................................................... Upload: 12.03 Mbit/s liuxu:~$ speedtest --server 17184 Retrieving speedtest.net configuration... Testing from China Unicom Beijing (114.249.28.210)... Retrieving speedtest.net server list... Retrieving information for the selected server... Hosted by China Mobile,TianJin (Tianjin) [111.65 km]: 18.27 ms Testing download speed................................................................................ Download: 81.23 Mbit/s Testing upload speed...................................................................................................... Upload: 12.55 Mbit/s |
5 lidongdong1222 OP @LGA1150 @iwtbauh @liuxu 用 speedtest-cli 测试的 esxi 里直接跟主路由分配的同一块网卡 没有开启防火墙,iptables 也没有配置任何东西 driver: e1000 version: 7.3.21-k8-NAPI firmware-version: expansion-rom-version: bus-info: 0000:02:01.0 supports-statistics: yes supports-test: yes supports-eeprom-access: yes supports-register-dump: yes supports-priv-flags: no Settings for ens33: Supported ports: [ TP ] Supported link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full 1000baseT/Full Supported pause frame use: No Supports auto-negotiation: Yes Supported FEC modes: Not reported Advertised link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full 1000baseT/Full Advertised pause frame use: No Advertised auto-negotiation: Yes Advertised FEC modes: Not reported Speed: 1000Mb/s Duplex: Full Port: Twisted Pair PHYAD: 0 Transceiver: internal Auto-negotiation: on MDI-X: off (auto) Cannot get wake-on-lan settings: Operation not permitted Current message level: 0x00000007 (7) drv probe link Link detected: yes |
6 lidongdong1222 OP @liuxu 使用相同的节点,centos 里测速,wifi 下连接的笔记本测速上行都是 40,只有 ubuntu 里不到 5 |
7 liuxu Nov 30, 2018 @lidongdong1222 用 --server 参数指定了相同节点? 说实话,这个锅 ubuntu 不好接,毕竟都是 python 的,唯一不同的就是 user-agent 了 def build_user_agent(): """Build a Mozilla/5.0 compatible User-Agent string""" ua_tuple = ( 'Mozilla/5.0', '(%s; U; %s; en-us)' % (platform.system(), platform.architecture()[0]), 'Python/%s' % platform.python_version(), '(KHTML, like Gecko)', 'speedtest-cli/%s' % __version__ ) user_agent = ' '.join(ua_tuple) printer('User-Agent: %s' % user_agent, debug=True) return user_agent |
8 lidongdong1222 OP |
9 oovveeaarr Nov 30, 2018 换 python2 |
10 lidongdong1222 OP @oovveeaarr 正解 root@ubuntu:~$ python2 /usr/lib/python3/dist-packages/speedtest.py --no-download Retrieving speedtest.net configuration... Testing from China Unicom Beijing (123.118.10.37)... Retrieving speedtest.net server list... Selecting best server based on ping... Hosted by Beijing Unicom (Beijing) [1.67 km]: 31.197 ms Skipping download test Testing upload speed................................................................................................ Upload: 42.66 Mbit/s root@ubuntu:~$ python3 /usr/lib/python3/dist-packages/speedtest.py --no-download Retrieving speedtest.net configuration... Testing from China Unicom Beijing (123.118.10.37)... Retrieving speedtest.net server list... Selecting best server based on ping... Hosted by Beijing Unicom (Beijing) [1.67 km]: 4.88 ms Skipping download test Testing upload speed...................................................................................................... Upload: 1.66 Mbit/s |
11 liuxu Dec 2, 2018 |