• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • VCS
  • Interview Questions
  • Database
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

How to Limit/throttle rsync transfer speed in Linux

by admin

If you use the rsync utility to keep your backups synchronized between your servers or with a local machine, you might want to prevent the script from using too much bandwidth. However, rsync makes a lot of network I/O. The point of limiting bandwidth is to make sure your backup scripts don’t clog up the network connection.

Naturally, limiting the amount of bandwidth your backups are using is going to make them happen more slowly, but if you can deal with that, this is the way to do it.

Here is a normal rsync command:

$ rsync –avz -e 'ssh' /path/to/source user@remotehost:/path/to/dest/

What you’ll want to do is use the –bwlimit parameter with a KB/second value, like this:

$ rsync –bwlimit=[kb/second] –avz -e 'ssh' /path/to/source user@remotehost:/path/to/dest/

So if you wanted to limit transfer to around 10000KB/s (9.7MB/s), enter:

$ rsync –bwlimit=10000 –avz -e 'ssh' /path/to/source user@remotehost:/path/to/dest/

Here is a real world example:

rsync –bwlimit=10000 –avz -e 'ssh' /backup/ root@192.168.0.51:/backup/

Here, rsync will be throttled to a bandwidth of 10000kb/second or 9.7MB/s approximately.

Using trickle

There is an alternative to the -bwlimit option. You can also use the “trickle” command to limit the bandwidth of any application you run. The syntax of trickle command is:

$ trickle -u|-d [uploadLimit|downloadLimit] [app]

Here,
-u uploadLimit -> limits the upload bandwidth
-d downloadLimit -> limits the download bandwidth
app -> is the application you want to limit bandwidth for e.g. rsync.

So in our case, we will limit the rsync command bandwidth usage to 0000kb/second using the below commands:

$ trickle -s -u 10000 -d 10000 rsync –avz -e 'ssh' /backup/ root@192.168.0.51:/backup/

Filed Under: Linux

Some more articles you might also be interested in …

  1. legit Command Examples in Linux
  2. fusermount: Mount and unmount FUSE filesystems
  3. deemix: A barebone deezer downloader library built from the ashes of Deezloader Remix
  4. How to convert text files to all upper or lower case
  5. cpufreq-aperf Command Examples in Linux
  6. vnstati Command Examples in Linux
  7. CentOS / RHEL 7 : Shutting Down, Suspending, or Rebooting Commands (systemctl)
  8. compsize: command not found
  9. Wallch (Wallpaper Changer) – Rotate Ubuntu Desktop Wallpapers
  10. semanage Command Examples in Linux

You May Also Like

Primary Sidebar

Recent Posts

  • Vanilla OS 2 Released: A New Era for Linux Enthusiasts
  • mk Command Examples
  • mixxx Command Examples
  • mix Command Examples

© 2025 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright