Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I'll often transfer items to and from my laptop on my local network using scp. Often, it seems, I'll see the transfer rate start out right (2.0MB/s), then slowly diminish until the transfer completely stalls. This seems to be fairly reproducible on larger files. Is there a network problem or a way for me to better configure SSH on my laptop? My desktop doesn't seem to have these problems when transferring files to remote servers, so I assume that my laptop's WiFi connection may be to blame.

Both computers are running an Ubuntu 12.04 derivative.

share|improve this question

3 Answers 3

I had seen issues like this with my network. It helps to get a wifi analyzer that shows channel usage (for example, kismit or wavemon). Turns out that the automatic channel settings weren't working well. I explicitly set the channel in the wifi router and it helped quite a bit.

share|improve this answer
    
Would it explain the difference between my laptop and my deskop? Won't they use the same channel and experience the same level of terrible transfer rate? –  Naftuli Tzvi Kay Aug 29 '13 at 0:34
    
@TKKocheran is your desktop also connected wirelessly? Is it perhaps closer to the router? –  terdon Aug 29 '13 at 11:20
    
Nope, they're both sitting next to each other and it doesn't seem to relate to location. I've had my laptop behave similarly on other networks too. –  Naftuli Tzvi Kay Aug 30 '13 at 0:20

Are you using a VPN? Sounds like an MTU issue. If you are running over a VPN or PPPOE the MTU is reduced to compensate for the overhead of the VPN or PPPOE layer. Longer packets are dropped and soon an endless amount of re-tries happens. To test if this is the issue set the MTU on the interface to something small, like 800. If that solves the problem, increase the MTU by 100 (max 1500) until you narrow down the maximum size.

share|improve this answer
    
Nope, no VPN :( –  Naftuli Tzvi Kay Aug 29 '13 at 0:33
    
Try setting MTU anyway. It could be some other device in the middle. –  TomOnTime Aug 29 '13 at 2:09
    
This doesn't look like an MTU issue: the scp connection would stall after a few packets. –  Gilles Aug 29 '13 at 21:25

No, I believe scp is just slower then other ways by default. It was barely 10MB/s on a direct cable connection between two laptops (1000Mbps). One possible bottleneck can be also a CPU which needs to encrypt data. Mine was at 50% (half a core on a quadcore CPU)

http://intermediatesql.com/linux/scrap-the-scp-how-to-copy-data-fast-using-pigz-and-nc/

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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