Welcome! Log In Create A New Profile

Advanced

limit_rate и высокие скорости

June 21, 2020 05:53PM
есть такой конфиг:
server {
listen 19999 default_server reuseport;# sndbuf=4m;
location ~ ^/speedtest-limit-([0-9]+[km]?)/([^/]*)$ {
limit_rate $1;
limit_rate_after 2m;
alias /var/www/speedtest/$2;
}
}

проверяю скорость скачивания без лимита, вполне приличная:
$ curl -o /dev/null 127.0.0.1:19999/speedtest-limit-0/1000mb
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 1000M 100 1000M 0 0 2375M 0 --:--:-- --:--:-- --:--:-- 2375M

с относительно небольшим лимитом всё хорошо:
$ curl -o /dev/null 127.0.0.1:19999/speedtest-limit-1m/100mb
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 100M 100 100M 0 0 1044k 0 0:01:38 0:01:38 --:--:-- 1008k

а вот с лимитом повыше ерунда выходит:
$ curl -o /dev/null 127.0.0.1:19999/speedtest-limit-100m/1000mb
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 1000M 100 1000M 0 0 42.9M 0 0:00:23 0:00:23 --:--:-- 42.6M


что можно подкрутить?
Subject Author Posted

limit_rate и высокие скорости

edo1 June 21, 2020 05:53PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 80
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready