TurnKey Linux Virtual Appliance Library

SFTP on LAMP is VERY slow!

aa's picture

We are having a problem with our TKL LAMP VM, the issue is that any SFTP transfers start out extremely slow, often timing out, but then after 4-8MB have been transferred it will rocket up to normal (for the connection) speed.

For example, I upload a 100MB file, for the first 2-5 mintues I'm only getting 5KB/s, then all the sudden after around 5MB have been transferred it goes up to 200KB/s for the remaining 95MB.  

The behavior is the same for downloads. 

I don't believe its a network issue because if I download a large file through https (via apache) I get the full 200KB/s for the entire download.


This VM is running on a Dell PC running Windows 2003 (fully patched) and VMWare Server 2.0.2 we've had running VMs without any problems for a few years (including other Linux systems).

I've triple checked network settings, Gateway, DNS, etc and cannot find any problems.  

The problem appears to be specific to SFTP (SSH) and I just don't know where to look from here.  Obviously this is a big problem because none of our clients can upload their web site data through SFTP because they believe it is just timing out (even though its very, very slow).

Any help would be greatly appreciated!


Jeremy Davis's picture

Try disabling DNS lookup for SSH

I'm not sure, but could be worth a shot. Have a look at this blog post by Liraz.

Chicago-TKLUser's picture

Thanks yeah, I tried

Thanks yeah, I tried that.

We've done more expierimentation and we believe the issue is related to the firewall in front of the server.  We will probably try a different firewall.

It's such an odd issue.

Post new comment

The content of this field is kept private and will not be shown publicly. If you have a Gravatar account, used to display your avatar.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <p> <span> <div> <h1> <h2> <h3> <h4> <h5> <h6> <img> <map> <area> <hr> <br> <br /> <ul> <ol> <li> <dl> <dt> <dd> <table> <tr> <td> <em> <b> <u> <i> <strong> <font> <del> <ins> <sub> <sup> <quote> <blockquote> <pre> <address> <code> <cite> <strike> <caption>

More information about formatting options

Leave this field empty. It's part of a security mechanism.
(Dear spammers: moderators are notified of all new posts. Spam is deleted immediately)