gpt4 book ai didi

Rsync限制传输速度不起作用

转载 作者:行者123 更新时间:2023-12-02 15:52:35 26 4
gpt4 key购买 nike

我试图通过指定 --bwlimit 选项来限制 Rsync 使用的带宽,但它似乎不起作用。我不知道我是否做错了什么......:

最大可能上传速度 = 10mbit/sec。我想将 rsync 限制在 50% 左右:

Rsync命令=

[~] # rsync --version
rsync version 3.0.7 protocol version 30

[~] # rsync -a --verbose --partial --bwlimit=500 -e 'ssh -p 2200 -i /share/ssh/id_dsa' admin@10.0.3.10:/share/MD0_DATA/ /share/LocalData

结果=

Traffic

================================================== =================================

解决方案如下:

[~] # ipkg install trickle
Installing trickle (1.06-3) to root...
Downloading http://ipkg.nslu2-linux.org/feeds/optware/ts509/cross/unstable/trickle_1.06-3_i686.ipk
Installing libevent (2.0.16-1) to root...
Downloading http://ipkg.nslu2-linux.org/feeds/optware/ts509/cross/unstable/libevent_2.0.16-1_i686.ipk
Configuring libevent
Configuring trickle
Successfully terminated.
[~] # trickle -d 500 rsync -a --verbose --partial -e 'ssh -p 2200 -i /share/ssh/id_dsa' admin@10.0.3.10:/share/MD0_DATA/ /share/LocalData
trickle: Could not reach trickled, working independently: No such file or directory
receiving incremental file list

最佳答案

--bwlimit=KBytes/s 应用移动平均值来限制生成的吞吐量,因此,您只会在传输量远大于您的可用带宽时才会注意到它。

来自 man页数,

blocks of data are sent, then if rsync determines the transfer was too fast, it will wait before sending the next data block. The result is an average transfer rate equaling the specified limit.)

查看trickle这似乎用更精致的算法来体现这个概念。

关于Rsync限制传输速度不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10064316/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com