Bug 1217 - scp does not limit bandwidth
Summary: scp does not limit bandwidth
Status: CLOSED WORKSFORME
Alias: None
Product: Portable OpenSSH
Classification: Unclassified
Component: scp (show other bugs)
Version: 4.3p2
Hardware: Other Linux
: P3 normal
Assignee: Damien Miller
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-08-11 02:08 AEST by Jacek Kalinski
Modified: 2009-10-06 15:01 AEDT (History)
0 users

See Also:


Attachments
scp without -l option (53.50 KB, text/plain)
2006-08-11 02:09 AEST, Jacek Kalinski
no flags Details
scp with -l option (29.46 KB, text/plain)
2006-08-11 02:10 AEST, Jacek Kalinski
no flags Details
Crank upper backoff limit for scp bwlimit (507 bytes, patch)
2007-06-12 17:33 AEST, Damien Miller
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jacek Kalinski 2006-08-11 02:08:32 AEST
When I'm trying to copy a file from one server to another (in the same 100Mbit LAN). Both servers have the same openssh version (the same package): OpenSSH_4.3p2, OpenSSL 0.9.8b 04 May 2006

When I specify -l option (limit bandwidth) with value eg. 48000 (so I want to copy with speed 6MB/s), file is really copied with about 1.6MB/s (scp and bandwidth graphs show the same speed) [Attachment: scp_limit.txt]

But when I copy from the same server without -l option, it is copied with full speed (about 11MB/s). [Attachment: scp_nolimit.txt]

Also: copying files with -l option from:
OpenSSH_3.7.1p2, SSH protocols 1.5/2.0, OpenSSL 0.9.6 24 Sep 2000
to:
OpenSSH_4.3p2, OpenSSL 0.9.8b 04 May 2006
is very slow (below a specified limit). 
The same with copying files over Internet (both ssh: 4.3p2) - with "-l 1200" is really copied with speec about 60KB/s.

I'm not sure, but in previous version (probably 4.3p1 or 4.2) speed was limited correctly (I offen use scp with speed limit).

I have attached debug from running:
scp -l 48000 -vv root@192.168.16.111:/backup/test ./ 1>scp_limit.txt 2>&1
scp -vv root@192.168.16.111:/backup/test ./ 1>scp_nolimit.txt 2>&1
Comment 1 Jacek Kalinski 2006-08-11 02:09:39 AEST
Created attachment 1172 [details]
scp without -l option
Comment 2 Jacek Kalinski 2006-08-11 02:10:26 AEST
Created attachment 1173 [details]
scp with -l option
Comment 3 Damien Miller 2007-06-12 17:33:19 AEST
Created attachment 1303 [details]
Crank upper backoff limit for scp bwlimit

Could you please try this patch?
Comment 4 Damien Miller 2009-08-18 06:43:07 AEST
Can't replicate. The scp bandwidth limiting code has changed a little since the original report, so this may be fixed.
Comment 5 Damien Miller 2009-10-06 15:01:49 AEDT
Mass move of RESOLVED bugs to CLOSED now that 5.3 is out.