sshthrottlingddoraclelinux

throttle data transfer using dd over ssh connection


I am using dd to transfer data over two machines, command which used is ,

dd bs=1M if=/dev/loop0 status=progress | sshpass -p mypassword ssh root@192.168.111.11 dd bs=1M of=/dev/loop0 iflag=fullblock conv=sparse 

Aim is to throttle the network usage while data transfer using throttle command, But which is not present in server machine Oracle Linux Server - Linux 3.10.0-957.el7.x86_64 x86_64

How can I install throttle in server machine ?

Is there any other mechanism to throttle data transfer through the above command ?

Thanks in advance


Solution

  • Done this using trickle

    dd bs=1M if=/dev/loop0 status=progress | trickle -s -d 1024 -u 1024 sshpass -p mypassword ssh root@192.168.111.11 dd bs=1M of=/dev/loop0 iflag=fullblock conv=sparse 
    

    The above trickle command will limit the download bandwidth (-d) 1024 KB/s and limit the upload bandwidth (-u) 1024 KB/s.