Did you know LQ has a Linux Hardware Compatibility List?
Go Back > Blogs > Vermind
User Name


Rating: 4 votes, 4.00 average.

Ubuntu scp stall resolved

Posted 09-24-2008 at 06:34 AM by Vermind

I had been troubled for long by my Ubuntu server not uploading files with scp or rsync properly. The transfers would hang at a little bit over 2MB, and never proceed from there. I asked on the Ubuntu forums about this, and yesterday received a fix suggestion that worked for me. The fix entails adding lines to /etc/sysctl.conf that change the default net and IPv4 behaviour, like so:

net.core.rmem_default = 524288
net.core.rmem_max = 524288
net.core.wmem_default = 524288
net.core.wmem_max = 524288
net.ipv4.tcp_wmem = 4096 87380 524288
net.ipv4.tcp_rmem = 4096 87380 524288
net.ipv4.tcp_mem = 524288 524288 524288
net.ipv4.tcp_rfc1337 = 1
net.ipv4.ip_no_pmtu_disc = 0
net.ipv4.tcp_sack = 1
net.ipv4.tcp_fack = 1
net.ipv4.tcp_window_scaling = 1
net.ipv4.tcp_timestamps = 1
net.ipv4.tcp_ecn = 0
net.ipv4.route.flush = 1
(sudo gedit /etc/sysctl.conf to edit the file to add the lines)

and then, if one does not like rebooting, reloading the config with
sudo sysctl -p
Posted in Uncategorized
Views 8634 Comments 0
« Prev     Main     Next »


All times are GMT -5. The time now is 11:48 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration