V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
nilai
V2EX  ›  Docker

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

  •  
  •   nilai · 2020-06-15 17:21:43 +08:00 · 1934 次点击
    这是一个创建于 1616 天前的主题,其中的信息可能已经有所发展或是发生改变。
    通过同一台 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 企业带宽差不多能跑满
    3 条回复    2020-09-01 16:25:14 +08:00
    letitbesqzr
        1
    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
        2
    nilai  
    OP
       2020-06-15 17:48:27 +08:00
    但是 我没找到 openjdk:8-jdk-alpine 这个镜像在哪里限带宽的? 翻了一圈
    scorpion
        3
    scorpion  
       2020-09-01 16:25:14 +08:00
    还真有这个问题
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   5701 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 36ms · UTC 06:41 · PVG 14:41 · LAX 22:41 · JFK 01:41
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.