cURLは1つを除くシステムでは非常に遅いです。

cURLは1つを除くシステムでは非常に遅いです。

私のオフィスには3つの異なる設定があります。私たちはギガビットナットを持つラズベリーパイ4、ギガビットナットを持つDebianサーバー、Unraidサーバーを持っています。

最初の2つのコマンドでCall Postコマンドを実行すると、約600kしかアップロードできません。アンレードボックスに8k以上アップロード中です。最初の2つがなぜそんなに遅いのかを確認するには、何を探すべきですか?すべて同じスイッチとルーターに接続されています。明らかにデバイス自体に制限されています。私はここで迷っています。

武装解除襲撃

root@Tower:/mnt/user/Media# curl -F [email protected] https://srv-file6.gofile.io/uploadFile > /dev/null
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
 18  463M    0     0   18 85.5M      0  6855k  0:01:09  0:00:12  0:00:57 8966k

PI

root@DietPiSR:/media# ./upload.sh test3.img
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  5  421M    0     0    5 22.9M      0  1114k  0:06:27  0:00:21  0:06:06  623k
[1]+  Stopped                 ./upload.sh test3.img

ダーバン

root@Server1:/media# ./upload.sh test2.img
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  5  421M    0     0    5 12.9M      0   954k  0:08:27  0:00:15  0:08:06  413k
[1]+  Stopped                 ./upload.sh test2.img

./upload.shは同じコマンドですが、他のいくつかのコマンドを含むファイルにあります。また、bashスクリプトを使用する代わりにCLIを試してみましたが、同じ結果が出ました。

/etc/resolv.confこれを私のファイルに追加しました

options single-request-reopen

私のDNSは次のように設定されています。8.8.8.8 and 1.0.0.1

私のEthtoolの結果 PI

root@DietPiSR:/media/unraid# ethtool eth0
Settings for eth0:
        Supported ports: [ TP MII ]
        Supported link modes:   10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
                                1000baseT/Half 1000baseT/Full
        Supported pause frame use: Symmetric Receive-only
        Supports auto-negotiation: Yes
        Supported FEC modes: Not reported
        Advertised link modes:  10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
                                1000baseT/Half 1000baseT/Full
        Advertised pause frame use: Symmetric Receive-only
        Advertised auto-negotiation: Yes
        Advertised FEC modes: Not reported
        Link partner advertised link modes:  10baseT/Half 10baseT/Full
                                             100baseT/Half 100baseT/Full
                                             1000baseT/Full
        Link partner advertised pause frame use: No
        Link partner advertised auto-negotiation: Yes
        Link partner advertised FEC modes: Not reported
        Speed: 1000Mb/s
        Duplex: Full
        Port: MII
        PHYAD: 1
        Transceiver: internal
        Auto-negotiation: on
        Supports Wake-on: gs
        Wake-on: d
        SecureOn password: 00:00:00:00:00:00
        Current message level: 0x00000007 (7)
                               drv probe link
        Link detected: yes

武装解除襲撃

root@Tower:/etc# ethtool eth0
Settings for eth0:
        Supported ports: [ TP MII ]
        Supported link modes:   10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
                                1000baseT/Half 1000baseT/Full
        Supported pause frame use: Symmetric Receive-only
        Supports auto-negotiation: Yes
        Supported FEC modes: Not reported
        Advertised link modes:  10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
                                1000baseT/Half 1000baseT/Full
        Advertised pause frame use: Symmetric Receive-only
        Advertised auto-negotiation: Yes
        Advertised FEC modes: Not reported
        Link partner advertised link modes:  10baseT/Half 10baseT/Full
                                             100baseT/Half 100baseT/Full
                                             1000baseT/Full
        Link partner advertised pause frame use: No
        Link partner advertised auto-negotiation: Yes
        Link partner advertised FEC modes: Not reported
        Speed: 1000Mb/s
        Duplex: Full
        Port: MII
        PHYAD: 0
        Transceiver: internal
        Auto-negotiation: on
        Supports Wake-on: pumbg
        Wake-on: g
        Current message level: 0x00000033 (51)
                               drv probe ifdown ifup
        Link detected: yes

私のupload.shファイル

#!/bin/bash
logdir=$HOME/log/uploads
simplekey='MYAPIKEY'
toup=${1%/}
path=$(dirname $1)"/"
if [ ! -d $logdir ]; then
    mkdir -p $logdir
fi
if [[-z $toup]]; then
    echo -e "No file to upload\n\nUsage: upload <path/to/upload>"
    exit 1;
elif [[-d $toup]]; then
    type='dir'
    filename=$(echo $toup | sed "s/.*\///")'.zip'
    7z a "/tmp/$filename" "$toup" >/dev/null
elif [[ -f $toup ]]; then
    type='file'
    filename=$(echo $toup | sed "s/.*\///")
else
    echo "$toup is not valid"
    exit 1
fi
uploadname=$(echo $1 | sed "s/.*\///")
server=$(curl -s https://apiv2.gofile.io/getServer | jq -r '.data.server')
if [[ "$type" == "dir" ]]; then
    upload=($(curl -F "[email protected]" -F "file=@/tmp/$filename" https://$server.gofile.io/uploadFile | jq -r '.data.code','.data.adminCode'))
    rm "/tmp/$filename"
else
    upload=($(curl -F "[email protected]" -F "file=@$filename" https://$server.gofile.io/uploadFile | jq -r '.data.code','.data.adminCode'))
fi

if [[ -z "${upload[1]}" ]]; then
    exit 0
else
    name=\"$filename\"
    myname=$(echo $toup | sed "s/(.*//g")
    SAVEIFS=$IFS
    IFS=$'\n'
    plot=($(curl -s "http://www.omdbapi.com/?apikey=MYAPI&t=$myname" | jq -r '.Genre,.Plot,.Year,.Runtime,.Poster'))
    IFS=$SAVEIFS
    printf "Filename: $filename\nUpload URL: https://gofile.io/d/${upload[0]}\nAdmin Code: '${upload[1]}'\n\n" | tee -a "$logdir/$filename.log"
    printf "\n" | tee -a "$logdir/$filename.log"
    printf "Name: $myname"
    link=\"https://gofile.io/d/${upload[0]}\"
    curl -s --data 'key='$simplekey'&title=Upload Ready&msg=Filename: '"$filename"$'\nDownload URL: https://gofile.io/d/'${upload[0]}$'\nAdmin Code: '${upload[1]}'&event=Uploaded' https://api.simplepush.io/send >/dev/null && echo Upload Complete
    SCRIPT_PATH="/mnt/user/discord.sh"
      eval '"$SCRIPT_PATH" --username="Gofile Upload" --color="8510795" --thumbnail="'${plot[4]}'" --footer="Your Download is Ready" --webhook-url="$WEBHOOK" --author="Gofile Upload" --description="Plot: '${plot[1]}' \nFile Name: $filename \nURL: https://gofile.io/d/'${upload[0]}$'"'
fi

関連情報