为什么 openjdk:8-jdk-alpine 这个镜像会限制上传速度,也没有找到在哪里限制的

2020-06-15 17:21:43 +08:00
 nilai
通过同一台 docker 机器 两个不同镜像来对比的,镜像分别为:openjdk:8-jdk-alpine 、alpine
1.openjdk:8-jdk-alpine 测试情况如下:
docker run --rm -it openjdk:8-jdk-alpine /bin/sh
/ # sed -i "s@http://dl-cdn.alpinelinux.org/@https://repo.huaweicloud.com/@g" /etc/apk/repositories
/ # apk add speedtest-cli
fetch https://repo.huaweicloud.com/alpine/v3.9/main/x86_64/APKINDEX.tar.gz
fetch https://repo.huaweicloud.com/alpine/v3.9/community/x86_64/APKINDEX.tar.gz
(1/9) Installing expat (2.2.8-r0)
(2/9) Installing gdbm (1.13-r1)
(3/9) Installing xz-libs (5.2.4-r0)
(4/9) Installing ncurses-terminfo-base (6.1_p20190105-r0)
(5/9) Installing ncurses-terminfo (6.1_p20190105-r0)
(6/9) Installing ncurses-libs (6.1_p20190105-r0)
(7/9) Installing readline (7.0.003-r1)
(8/9) Installing python3 (3.6.9-r2)
(9/9) Installing speedtest-cli (2.0.2-r0)
Executing busybox-1.29.3-r10.trigger
OK: 165 MiB in 63 packages
/ # speedtest
Retrieving speedtest.net configuration...
Testing from China Mobile Guangdong (1.2.3.4)...
Retrieving speedtest.net server list...
Selecting best server based on ping...
Hosted by Chongqing Mobile Company (Chongqing) [1.32 km]: 4.433 ms
Testing download speed................................................................................
Download: 80.18 Mbit/s
Testing upload speed......................................................................................................
Upload: 4.00 Mbit/s # 这里, 上传只有 4M



2.alpine 测试情况如下:
docker run --rm -it alpine /bin/sh
Unable to find image 'alpine:latest' locally
latest: Pulling from library/alpine
df20fa9351a1: Pull complete
Digest: sha256:185518070891758909c9f839cf4ca393ee977ac378609f700f60a771a2dfe321
Status: Downloaded newer image for alpine:latest
/ # sed -i "s@http://dl-cdn.alpinelinux.org/@https://repo.huaweicloud.com/@g" /etc/apk/repositories
/ # apk add speedtest-cli
fetch https://repo.huaweicloud.com/alpine/v3.12/main/x86_64/APKINDEX.tar.gz
fetch https://repo.huaweicloud.com/alpine/v3.12/community/x86_64/APKINDEX.tar.gz
(1/17) Installing libbz2 (1.0.8-r1)
(2/17) Installing expat (2.2.9-r1)
(3/17) Installing libffi (3.3-r2)
(4/17) Installing gdbm (1.13-r1)
(5/17) Installing xz-libs (5.2.5-r0)
(6/17) Installing ncurses-terminfo-base (6.2_p20200523-r0)
(7/17) Installing ncurses-libs (6.2_p20200523-r0)
(8/17) Installing readline (8.0.4-r0)
(9/17) Installing sqlite-libs (3.32.1-r0)
(10/17) Installing python3 (3.8.3-r0)
(11/17) Installing py3-ordered-set (4.0.1-r0)
(12/17) Installing py3-appdirs (1.4.4-r1)
(13/17) Installing py3-parsing (2.4.7-r0)
(14/17) Installing py3-six (1.15.0-r0)
(15/17) Installing py3-packaging (20.4-r0)
(16/17) Installing py3-setuptools (47.0.0-r0)
(17/17) Installing speedtest-cli (2.1.2-r2)
Executing busybox-1.31.1-r16.trigger
OK: 55 MiB in 31 packages
/ # speedtest
Retrieving speedtest.net configuration...
Testing from China Mobile Guangdong (1.2.3.4)...
Retrieving speedtest.net server list...
Selecting best server based on ping...
Hosted by Chongqing Mobile Company (Chongqing) [1.32 km]: 4.201 ms
Testing download speed................................................................................
Download: 79.99 Mbit/s
Testing upload speed......................................................................................................
Upload: 92.61 Mbit/s #这个速度就非常的正常 100M 企业带宽差不多能跑满
1968 次点击
所在节点    Docker
3 条回复
letitbesqzr
2020-06-15 17:46:22 +08:00
使用 alpine : https://i.loli.net/2020/06/15/9yFNcOw5AP2G3gl.png
使用 openjdk: https://i.loli.net/2020/06/15/V8lkF7LHvOZqEyX.png

我试了一下,还真有这个问题....
nilai
2020-06-15 17:48:27 +08:00
但是 我没找到 openjdk:8-jdk-alpine 这个镜像在哪里限带宽的? 翻了一圈
scorpion
2020-09-01 16:25:14 +08:00
还真有这个问题

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/681757

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX