5

Is there a way to limit the speed of scp (or rsync)? I couldn't find any information in the man page, nor on the internet.

9

From the man page: -l limit Limits the used bandwidth, specified in Kbit/s.

  • 1
    Plus is you want to do it with rsync, you need to specify/add the -e "ssh -l xxx" on the command – Leo Oct 21 '10 at 13:46
  • 2
    ssh -l xxx means login as user xxx. – Cristian Ciupitu Oct 21 '10 at 14:06
  • I'm very sorry. I did not check my work (I hate when people do that here!!) rsync uses this according to the man page: --bwlimit=KBPS limit I/O bandwidth; KBytes per second. I've not tested it, but it does say that this is for daemon mode. – Leo Oct 21 '10 at 14:16
  • everybody says they have great success with the -l option in scp, but I'm trying it on my raspberry pi and it seems to be ignored. No matter what I set it to, it maxes out my bandwidth. – Stu Dec 25 '12 at 1:21
  • @Stu I tested it on a Raspberry Pi with the default software installed. And the -l option works as advertised in the man page. The transfer speed fluctuates a bit, but it appears to keep the right speed on average. – kasperd Nov 24 '16 at 22:25
4

I'm not convinced the -l setting works properly with big values: On my RHEL6 system if see:

-l not specified

  • Expected: Whatever the wan can handle
  • Actual: 20 Megabytes per second

-l 8000

  • Expected: 1 Megabyte per second
  • Actual: 1 Megabyte per second

-l 80000

  • Expected: 10 Megabytes per second
  • Actual: 150 Kilobytes per second

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.