Posts: 69
Joined: Tue Mar 28, 2017 3:55 pm

Extremely Slow Pi SFTP Server

Wed Jul 04, 2018 7:18 pm

Hi Folks,

I am using my Pi as a home server. One of the benefits of the setup is having my USB devices connected, I managed to configure SFTP.

The setup is as follows:

Pi3 B+ - Up to date with Stretch
Samba installed as NAS on local network (speeds are considerably faster)
SSH Enabled on Stretch
BT Home Hub 5

I have Win SCP setup outside the home, trying to copy files across to the FTP and onto the USB drive configured on the pi / under Samba.

No other real configurations have been done.

At home, I am running 58Mbps downstream, 17Mbps upstream.
Outside home, its running about 8.5Mbps downstream, 7.5 upstream.

WinSCP from outside home is transferring at a maximum of 75kbps! Its been working for about 8 hours now, and has only transferred 1.5GB in this time.

Any ideas why it is running so terribly?



Posts: 3786
Joined: Thu May 05, 2016 9:33 am
Location: Paris, France

Re: Extremely Slow Pi SFTP Server

Thu Jul 05, 2018 6:22 pm

Let's see:
7.5Mbps ~ 0.75MB/s = 750kB/s
If you see 75kB/s (not 75kbps) that's not great but possible:
If "Outside home" was uploading at 750kB/s, no download at all would be possible at the same time for them.
So perhaps there is a rule set somewhere (in the ISP box, in the FTP software) throttling bulk uploads to 10% of the uplink.

If you see 0.75kB/s (really 75kbps), something is wrong.
But 1.5GB in 8hrs averages to 50kB/s I think.

Try to see if speed goes up when "Outside home" stops using its Internet link heavily (VOIP/TV off).
"S'il n'y a pas de solution, c'est qu'il n'y a pas de problème." Les Shadoks, J. Rouxel

Posts: 69
Joined: Tue Mar 28, 2017 3:55 pm

Re: Extremely Slow Pi SFTP Server

Fri Jul 06, 2018 7:41 am

Thanks for your reply. The internet connection i am using outside home is typically idle, doesnt do anything intensive like voip.

Doing an upload speed test it was showing 7Mbps upload speed, so I dont know if its limited by the ISP. Especially as at the same time, I transferred on the same connection (via TeamViewer File Transfer) about 15GB in about 8 hours. Same machine and internet connection uploading, to my home, but instead connecting via my laptop at home.

It definitely seems to be something to do with the Pi. Its connected via LAN cable to the router (albeit over powerline adapters). Whilst I am not expecting uploads of the full 7Mbps, even on the powerline adapter, I would still expect it to be a fair bit quicker than 65/75Kbps.

I am going to do a test and transfer content from my laptop on the lan to the drives and see what speeds it achieves, as I am sure it will be considerably quicker.

Posts: 69
Joined: Tue Mar 28, 2017 3:55 pm

Re: Extremely Slow Pi SFTP Server

Fri Jul 06, 2018 3:36 pm

Just done a comparison, took the same 5GB which was transferred across the FTP, and copied them across. The transfer rate was between 1.5Mbps for small files, and 15Mbps for larger files.

That was just accessing the internal IP address on my LAN and copying them across (using Samba as the internal NAS offering).

Posts: 69
Joined: Tue Mar 28, 2017 3:55 pm

Re: Extremely Slow Pi SFTP Server

Wed Jul 11, 2018 8:36 am

After further looking, I can see even with the FTP transfer, and a local transfer over the LAN, CPU struggled to get over 20% and RAM was sat around 60%, when LAN had finished, it was idling around 8% CPU and around 40% RAM.

I am lost as to why this is so slow... Any further ideas?

Return to “Troubleshooting”