WinSCP slow speed SCP/SFTP - How I fixed it

Advertisement

MarcoP
Donor
Joined:
Posts:
4
Location:
Italy

WinSCP slow speed SCP/SFTP - How I fixed it

Hi folks,

old servers I knew were capped at 10Mb/s, so when WinSCP reported 1MB/s I was actually happy with it, so I stopped paying attention to it.

Recently I noticed that even from 1Gb/s and 100Mb/s servers, WinSCP was still downloading at 1MB/s so I got curious and then little frustrated when I noticed culprits were always the same servers, while others ranged from +4.5MB/s.

I changed most relevant settings but the one that actually worked was to disable Connection -> Optimize connection buffer size.

Cheers

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
34,147
Location:
Prague, Czechia

Re: WinSCP slow speed SCP/SFTP - How I fixed it

Thanks for sharing your solution.

Reply with quote

marcolussetti
Joined:
Posts:
1

I wanted to also thank the OP for the solution, and to note that my transfer speed went from ~550 KB/s to ~2.8 MB/s with no other changes but this single tweak. Should this be noted on the FAQ entry for this? I found it via FAQ -> Bug 164 -> Here, but I feel like not everyone would follow through that trail :)

Reply with quote

martin
Site Admin
martin avatar

marcolussetti wrote:

Should this be noted on the FAQ entry for this?
Are you referring to some specific FAQ entry? Or are you asking for a new FAQ entry?

Reply with quote

Advertisement

Wildcat
Guest

Much faster here!

Worked for me here also. It is now several times faster than it was before I changed the setting.

Reply with quote

Guest

wow... this worked for me also. I was copy files on my LAN with scp and it topped out at 1200kb/s, and after I did this, I am now copying at 32MB/s.

Reply with quote

Guest

Re: WinSCP slow speed SCP/SFTP - How I fixed it

MarcoP wrote:

Hi folks,

I changed most relevant settings but the one that actually worked was to disable Connection -> Optimize connection buffer size.

Thank You!

Reply with quote

Advertisement

reallyreally
Joined:
Posts:
1
Location:
UK

re:

Spend like 300GBP for new switch because was thinking maybe my network issue tweak all setting on my gigabyte card update firmware.

Speed test show full gigabyte speed, but winscp (newest) was slow max 8-13MB/s 10 diffrent servers centos ubuntu xserver my datacenter backup dirffrent configuration scp sfpt ...

Then install FileZilla spft =====>>>> and get 32MB/s

This is official only one solution

You waste my time never in my life i will be use winscp !!!!!!!!!!!!!!!!!!

Reply with quote E-mail

eddie4

Hahaha your lack of debugging disturbs me. As does your willingness to buy random hardware to solve your issue. This is a opensource project as is filezilla you should thank the developers not berate them when you have an issue.

Reply with quote

Advertisement

savvykong
Joined:
Posts:
2

Is this a GUI only solution? I have a third party software workflow that utilizes WinSCP scripting under the hood. Would there be an equivalent setting in some config file somewhere? Thank you!

Reply with quote

martin
Site Admin
martin avatar

savvykong wrote:

Is this a GUI only solution? I have a third party software workflow that utilizes WinSCP scripting under the hood. Would there be an equivalent setting in some config file somewhere? Thank you!
Equivalent to what?

Reply with quote

savvykong
Joined:
Posts:
2

martin wrote:

Equivalent to what?

A scripting equivalent to the "Optimize connection buffer size" checkbox in the GUI. But after reading through WinSCP documentation further I found what I was looking for - "SendBuf".

Reply with quote

glenhall
Joined:
Posts:
4
Location:
uk

i always noticed this with winscp, when i compare downloading something with filezilla or the old flashFXP client, winSCP always seemed slower as if it was capped, so im glad i found this subject here, but when i go into my site manager/advanced, i can see the optimize option but its greyed out and i cant untick it.
i have a passive option with can be ticked/unticked

Annotation 2019-02-20 094041.jpg

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
34,147
Location:
Prague, Czechia

glenhall wrote:

i always noticed this with winscp, when i compare downloading something with filezilla or the old flashFXP client, winSCP always seemed slower as if it was capped, so im glad i found this subject here, but when i go into my site manager/advanced, i can see the optimize option but its greyed out and i cant untick it.
i have a passive option with can be ticked/unticked
The option is not available/relevant to FTP protocol.

Reply with quote

Guest

Re: WinSCP slow speed SCP/SFTP - How I fixed it

MarcoP wrote:

Hi folks,

disable Connection -> Optimize connection buffer size.

Cheers

Awesome. This brought my local Ethernet performance from 750KB/s to 35MB/s(!!!)

Reply with quote

gp
Guest

On 5.15 worked for me as well

Was getting ~ 300-400KB/s, to servers I knew could do better. Unchecked that box and immediately got 11MB/s to the same host.

Reply with quote

Advertisement

bmcquist
Guest

Re: can't find the settintgs

crazyluke wrote:

I have the same problem but can't fix it. Why?
I had some issues finding it as well. On the specific connection click the Advanced button and in the Advanced Site Settings window select Connection.
Under Connection uncheck Optimize connection buffer size.

Optimize Connection.png

Reply with quote

Advertisement

creechy
Guest

Check your Proxy command

I discovered for me, I was using a Proxy config to tunnel through a bastion host with plink. I converted that to use the built in Tunnel config and that sped up throughput immensely.

Reply with quote

Advertisement

JimBurd
Donor
Joined:
Posts:
1
Location:
Boulder, CO

Wow

I've struggled with slow speeds from my ESXi servers for years. I just thought that there was something going on with those servers that caused the slow speeds. I just found this thread today, and my transfer rates went from 400 KB/s to 25 MB/s.
I appreciate the great product that the developers put out, but it sure seems like maybe this setting should be off by default (since it impacts so many different people).
_________________
Jim Burd
Boulder, CO, USA

Reply with quote

martin
Site Admin
martin avatar

Re: Wow

JimBurd wrote:

I appreciate the great product that the developers put out, but it sure seems like maybe this setting should be off by default (since it impacts so many different people).
Actually, we believe that the default makes it faster for most users.

Reply with quote

nooneofconsequence
Guest

worked for me

I was getting about 10 KB/s with it enabled. Disabling it gets me to about 50 MB/s.
One difference I noted is that the CPU utilization on the remote host I was transferring from was pegged at 100% with the option enabled. After disabling it I see about 50-60% CPU utilization.

Reply with quote

gsds2006@...
Guest

setting for latest version?

where does one find "Connection uncheck Optimize connection buffer size" setting for latest version? there's no connection settings listed on left like in the image?

winscp settings copy.jpg

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
34,147
Location:
Prague, Czechia

Re: setting for latest version?

gsds2006@... wrote:

where does one find "Connection uncheck Optimize connection buffer size" setting for latest version? there's no connection settings listed on left like in the image?
I've posted a link at least twice above already.
https://winscp.net/eng/docs/ui_login_connection

Reply with quote

the corey's
Guest

Re: setting for latest version?

martin wrote:

gsds2006@... wrote:

where does one find "Connection uncheck Optimize connection buffer size" setting for latest version? there's no connection settings listed on left like in the image?
I've posted a link at least twice above already.
https://winscp.net/eng/docs/ui_login_connection

the issue when I do it is that option is greyed out, how do I get passed that part?

Reply with quote

martin
Site Admin
martin avatar

Re: setting for latest version?

the corey's wrote:

the issue when I do it is that option is greyed out, how do I get passed that part?
The option is mostly relevant for SFTP and SCP protocols only. What protocol are you using?

Reply with quote

louis2
Guest

WinSCP does not use CPU effective ==> slow

Hello,

I have a relatively fast freenas server connected via 10G with my PC.

When transfering a big systembackup file towards the NAS I noticed that the transfer rate was only about 640 gbit. I did at expect something like three to four times that.

So I looked at the cpu load of the nas (moderate intel Pentium g5460, 16GB) which was about 14% ….. and did have a look at the much more powerfull cpu here on my pc (AMD2700X 32GB). And up to my surprise my PC seems to be the limmiting factor ……

The taskmanager showed me that one of the possible 16 threads was at 100% all the time. No doubt that that was related to winscp …..

So there seems to be "some" room for improvement:
- starting with migratio to 64 bit
- and using multiple threads

I understand that you are using standard librarys …… but never the less I hope that you can improve things. By the way I did turn of the buffersize optimalisation, that was a slight improvement

Sincerely,

Louis

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
34,147
Location:
Prague, Czechia

Re: WinSCP does not use CPU effective ==> slow

louis2 wrote:

When transfering a big systembackup file towards the NAS I noticed that the transfer rate was only about 640 gbit. I did at expect something like three to four times that.

So I looked at the cpu load of the nas (moderate intel Pentium g5460, 16GB) which was about 14% ….. and did have a look at the much more powerfull cpu here on my pc (AMD2700X 32GB). And up to my surprise my PC seems to be the limmiting factor ……
Thanks for your report.
What protocol are you using? What version of WinSCP?

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
34,147
Location:
Prague, Czechia

Re: Used protocol etc.

Louis2 wrote:

I am using SFTP and the very latest WinSCP version
Sincerely,
Thanks. Can you start a new thread and post a log file?

Reply with quote

Guest-Dana
Guest

Re: WinSCP slow speed SCP/SFTP - How I fixed it

Holy cow!!! Thanks for sharing this!
I tried so may things to speed up this download, but it was taking forever. At hour 4 I decided to dig harder and ran across your post here. After unchecking "Optimize connection buffer size", and restarting my download... 5 MINUTES! I burned 4 hours when it should have taken 5 minutes. I can't thank you enough for this tip.
-Dana

Reply with quote

Advertisement

jmail@...
Guest

WinScp Slow

My WinScp on a Raspberry Pi3 got from kb to MB with:
/boot/cmdline:
ipv6.enable=1 dwc_otg.lpm_enable=0 console=tty1 root=PARTUUID=4deb7a84-02 rootfstype=ext4 elevator=cfq fsck.repair=yes rootwait

/boot/config.txt:
<knip>
# uncomment to overclock the arm. 1200 MHz is the default.
arm_freq=1100
arm_freq_min=800
core_freq=400
sdram_freq=400
over_voltage=0
temp_limit=70

# Uncomment some or all of these to enable the optional hardware interfaces
dtparam=i2c_arm=off
dtparam=i2s=off
dtparam=spi=off

# Uncomment this to enable the lirc-rpi module
#dtoverlay=lirc-rpi

#Bluetooth off
dtoverlay=pi3-disable-bt

# Additional overlays and parameters are documented /boot/overlays/README

# Enable audio (loads snd_bcm2835)
dtparam=audio=off
start_x=0
gpu_mem=16
enable_uart=0
max_usb_current=1

Also look at: https://wiki.mikejung.biz/Sysctl_tweaks

The big differents was at the cmdline.
Test first with: hdparm -Tt /dev/sd(x)

Reply with quote

panreyes
Joined:
Posts:
1

Re: WinSCP slow speed SCP/SFTP - How I fixed it

Hi!

This fix also helped me a lot! I was downloading at ~500KB/s, now I'm downloading at full speed: 44MB/s.

I would recommend disabling this option by default and showing an alert whenever the user is trying to connect with this option enabled (and a checkbox to disable that alert in the future).

I'll repeat: from ~500kbps to 45,3MB/s (It grew while I was writing this!)

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
34,147
Location:
Prague, Czechia

Re: WinSCP slow speed SCP/SFTP - How I fixed it

panreyes wrote:

I would recommend disabling this option by default and showing an alert whenever the user is trying to connect with this option enabled (and a checkbox to disable that alert in the future).
I'm pretty sure the option speeds up the transfers for most (that's why it is on by default). It's probably only on some rare network setups, or possibly buggy network drivers, where disabling the option helps.

Reply with quote

seb
Joined:
Posts:
1
Location:
DE, USA

I know this is an old thread, but the above changes did not help me in my case. What I found was the ordering of the ciphers played an important part in speed for SFTP from the vendor we were connecting to. At most I could get was 5.5Mb~ but after the below changes we were up near the 25.5Mb~ range. I would suggest adding a mention to ordering the supported ciphers to the FAQ.
Raw settings for my session options were changed from
.AddRawSettings("Cipher", "3des,blowfish,aes,chacha20,WARN,arcfour,des")
to
.AddRawSettings("Cipher", "blowfish,aes,3des,chacha20,WARN,arcfour,des")

Came across this article that helped explain the impact of the ciphers used on SFTP speeds which helped us to improve the transfer speed.
https://www.systutorials.com/improving-sshscp-performance-by-choosing-ciphers/

Reply with quote

Advertisement

linuxdave
Joined:
Posts:
2

Fresh install of Windows 10 + Latest winSCP today (v5.17.7 Build 10640) and I see this problem still an issue years later, in 2020!

Over the last few years I've used WinSCP on multiple different computers and different networks and disabling this option ALWAYS improves my SCP transfer speeds by more than a factor of 10. Today I went from 2KB/s to 60MB/s.

Add my name to the list of people who really think this option needs to be disabled by default. In all of my installs, I've yet to see a single instance where this option improved speeds.

Thank you for your work on WinSCP. Other than this annoyance, it has been a great tool that I've used for years.

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
34,147
Location:
Prague, Czechia

linuxdave wrote:

Over the last few years I've used WinSCP on multiple different computers and different networks and disabling this option ALWAYS improves my SCP transfer speeds by more than a factor of 10. Today I went from 2KB/s to 60MB/s.
Are you really always using the SCP protocol only?

Reply with quote

Advertisement

You can post new topics in this forum