LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Blogs > Vermind
User Name
Password

Notices

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:

Code:
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
Code:
sudo sysctl -p
.
Posted in Uncategorized
Views 7790 Comments 0
« Prev     Main     Next »

  



All times are GMT -5. The time now is 03:35 AM.

Main Menu
Advertisement

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