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

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:

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

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:
41,469
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:

Disable Connection -> Optimize connection buffer size.
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:
3
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

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:
41,469
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:
41,469
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: <invalid hyperlink removed by admin>

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:
41,469
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:
41,469
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

makaplan
Joined:
Posts:
2
Location:
Canberra, Australia

No significant improvement on SFTP or SCP in my case

Hi guys

I have tried both SFTP and SCP with connection buffer size optimization disabled, and it doesn't improve my slow (about 30x slower than the network) transfer speeds. Are there other common causes for slow transfer speeds that I should consider?

Thanks!

Reply with quote

Advertisement

Rainer
Guest

Wow.

From 5–7 MB/s to 20–30.

Taking into account that I usually transfer files in units of multiple GB I don't know how I didn't search for this earlier.

Thank you very much.

Reply with quote

ramteja
Guest

WinSCP slow file copy issue

This fix of disabling Optimize buffer size has increased speed from 6 mb/s to 20 mb/s. Very grateful

Reply with quote

stumit63
Joined:
Posts:
1
Location:
Portugal, Lisboa

If you are using one, try without the VPN

I disconnect from ExpressVPN and the transfer rate increased 10 times. I tried again with the VPN connected and again without the VPN. This confirmed my first finding.

BTW, I couldn't open video streams while using WinSCP to upload via ExpressVPN.
It's time I finally start looking for a different VPN.

Reply with quote

Advertisement

NathanR
Guest

Huge Improvement

Like many others, this worked wonders for me. Transferring from an Ubuntu Server on my local network to my Windows 11 freshly installed machine across a 1Gbps network. Prior to this change, it was starting at about 12MB/s but with every passing second it was decreasing, down to the range of a few KB/s and was going to take hours to transfer the 540MB file.

Once I turned this optimise connection setting off, it transferred at 100MB/s and naturally, was done a few seconds later.

Reply with quote

cboldt
Joined:
Posts:
1

Slow Transfer Speeds

I have read the link (ui_login_connection) and found only a small difference.

WinSCP: v5.21.7 Build 12963
OS Client: MS Win11 Enterprise v22H2 Build 22621.1265.
OS Installs: True MS-Image and Corporate Image.
Hardware: Various
Network: Flat 192.168.0.0/24
Protocols Used: TCP, UDP, SMB, NFS, and all associated others.
FTP Server: Qnap NAS v4.2.6 latest and last Build. Unit is EOL. I also tried other FTP servers on other operating systems.
Experience: 30yrs+. Desktops to OC48 Fiber, Data Center design and build. Engineer and implement all aspects of "IT"

The issue started with building a data connection via MS FTP cli. I could connect and authenticate with multiple test accounts with varying rights. All are unable to (can transverse directories, i.e. cd\ directories.) but when issuing a "Dir" or "ls" and waiting, I would receive an "Ftp error 425: Can't Open Data Connection" I have tried all Tech bulletin's and articles without success. Other OS's work without issue.

So after maintaining my flat spot of banging my head against the wall I figured it's time to load a GUI app. So here I am. With WinSCP I am able to transfer data, both compressed and uncompressed but at very low speeds of 25kBs +/-. Any help would be Greatly Appreciated.

Reply with quote

kpcz
Guest

wow

I really thought there are some issues in my network., This fixed transfer rate from kilobytes to ~20 MB/s. Thanks OP!

Reply with quote

Advertisement

technopian
Guest

old thread I know, but...
am getting 10kbps when using SFTP from remote CentOS7 box to local Win10 client.
found the optimise setting from the error prompt prior to this page, sadly no change when set as reccomended above.
other protocols fly, host has 10Gb, I'm on 1Gb.
wondered if anyone would suggest where else to look?
within WinSCP..?

('kin awesome program btw, many, many thanks)

regards,
scott

Reply with quote

dkary
Guest

Slow download speeds

I am facing very slow speeds trying to download some files. The speed cannot exceed 5 kb/second. I then get an error that the host is not communicating and it is disconnected. In fact, for 300Mb it says it is going to take 18 hours. I tried to turn off the OPtimization connection buffer size. Change from SFTP to SCP. Choose a different encryption file but nothing worked out. I am not very familiar with all of these but I cannot detect what might be responsible for that and it is kind of urgent to download my files.

Reply with quote

Advertisement

Guest

Martin, I wonder if a good idea would be to have a button to speed test? Automated test various settings and file upload / download to see what works best.

This looks like enough of a problem for people that it may be worth doing. As far as I know, WinSCP doesn't have this.

Just an idea. People shouldn't have to figure this stuff out =)

Reply with quote

amolpali
Guest

didn't help me at all.

I was transferring at speed of 4 mbps from my pc to raspberry pi having high speed disk attached to usb 3 port via scp with winscp. As I was using private ip to transfer the file on my internal home network I thought i should get much more speed. Looking at this thread I was hoping it will help but changing this setting didnt' make any difference to the speed.

Reply with quote

Advertisement

You can post new topics in this forum