1、scp限速
scp -l 800 a.txt [email protected]:/home/admin/downloads
此时的传输速率就是800/8=100KB左右
Man-a SCP View the meaning of the parameter. Note that the unit is bit
2, rsync is used to synchronize updates, can also be used to upload files, but it is not recommended to use
Man-a rsync view parameter Help information
使用rsync实现限速100KB/s
rsync -auvzP --bwlimit=100 本地文件 远程文件
参数说明:
v:详细提示
a:以archive模式操作,复制目录、符号连接,等价于 -rlptgoD 。
z:压缩
u:只进行更新,防止本地新文件被重写,注意两者机器的时钟的同时
P:是综合了--partial --progress两个参数,
此时的rsync支持了断点续传
3, Paramiko speed limit is used in the http://docs.paramiko.org/en/latest/api/sftp.html
Classmethod
from_transport
(
t,
window_size=none,
max_packet_size=none). Official reports: etting the window and packet sizes
might affect the transferspeed. The default settings in the class is the same as in
Transport
OpenSSH and should work adequately for both files tr Ansfers and interactive sessions. It's just possible to get around the speed limit, and the correct usage is:
window_sizeThere is a maximum value and a minimum value, and the default value, you must select the value in between. The default value is 64*2**15 bytes, which is 2M. The minimum value is 32K, and the maximum value is 2 of 32 squares minus 1.
but the test found that the speed limit actually didn't work.
Test code:
4, but the internet has given an accelerated upload and download method: http://1codelife.com/2017/11/30/paramiko-larger-file-update/
SCP, Paramiko, rsync upload download current limit, limit speed, speed control method