Bug 1217

Summary: scp does not limit bandwidth
Product: Portable OpenSSH Reporter: Jacek Kalinski <jacek_kal>
Component: scpAssignee: Damien Miller <djm>
Status: CLOSED WORKSFORME    
Severity: normal    
Priority: P3    
Version: 4.3p2   
Hardware: Other   
OS: Linux   
Attachments:
Description Flags
scp without -l option
none
scp with -l option
none
Crank upper backoff limit for scp bwlimit none

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.