Fix Slow SFTP/SCP File Upload Rate and Stalling caused by TCP SACK

In brief, sometimes a conflict occurs between some firewalls and the TCP SACK. In my case, the upload was severely affected and reached upload speeds of a few kilobytes over a LAN!

The following command disables TCP SACK and fixes the slow upload on all Ethernet cards:

sudo sysctl -w net.ipv4.tcp_sack=0

To make it permanent, edit /etc/sysctl.conf and add this line

net.ipv4.tcp_sack = 0

Then run:

About SoCRaT

Systems Engineer, OSS & Linux Geek
This entry was posted in Linux, Uncategorized and tagged , , , , , , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s