Winscp зависает при копировании
Troubleshooting Connection Issues
When you are not able to connect to the server:
- Make sure you use protocol that the server supports.
- Read guide for connecting to FTP/SFTP server.
- Try if you can connect with other clients using the same protocol.
- If you can connect with another client, see Why is WinSCP not able to connect to a server, when other clients are?.
- When using SFTP /SCP , it may be useful to try to connect with an SSH terminal client (such as PuTTY). You may get some useful messages back on the terminal screen.
Troubleshooting Timestamp Issues
When the file timestamps you see in file panels are not what you expect them to be; or synchronization does not work:
- Read documentation on timestamps.
- Read about common problems causing synchronization not to work.
- With SFTP and FTP2 protocols, both client and server need to use UTC timestamps.
- Common problem is that the server misinterprets the UTC timestamps.
- To see how WinSCP and the server communicate the timestamps, turn on session logging and check the generated log file.
When inspecting the session log, look for following entries:
- Directory listing, including UTC file modification timestamps:
- Modification timestamp being set on target file after file transfer (SFTP):
If this does not help you, and you decide to seek support, make sure you include a complete session log in your report, showing the above entries. Also mention a specific file that demonstrates the problem, what timestamp and behavior do you see; and what did you expect and why.
Раз вы читаете эту статью, то скорей всего столкнулись с такой проблемой, что ваши удаленные SSH сессии, которые открыты с помощью стандартных средств Linux, вроде ssh или sftp , или же через Putty , в случае работы с компьютера под управлением Windows, постоянно сбрасываются и обрываются. Хотя само интернет соединение на вашем компьютере с виду работает исправно, это не помогает от разрывов.
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.
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).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).
Для всех исходящих SSH сессий
Для этого открываем файл /etc/ssh/ ssh _config и в самый низ этого файла добавляем следующие строчки:
ServerAliveInterval 60 - Данный параметр определяет как часто ваш ПК с которого установлена SSH сессия (клиент) будет отправлять на сервер SSH к которому вы подключились пакет, говорящий "я живой". В нашем примере это будет происходить каждые 60 секунд.
ServerAliveCountMax 5 - Данный параметр определяет, сколько раз такой пакет "я живой" будет отправлен на сервер в том случае, когда от сервера не последовало ответа, прежде чем принудительно разорвать соединение. В нашем примере 5 раз.
С такими настройками сессия будет висеть 60 * 5 = 300 секунд, после чего автоматически оборвется (только в случае, когда сервер вам не отвечает 5 раз подряд).После внесения этих изменений, к любому новому соединению через ssh или sftp должны применяться эти настройки.
Troubleshooting Scripting/Automation Issues
When you are facing issue with scripting/automation:
Winscp и скорость копирования. (Как повысить скорость копирования файлов?)
Network Delay/Latency
Network delay/latency affects particularly SFTP, as it is a packet oriented-protocol. When transferring, the SFTP client (WinSCP) sends a read/write request to the SFTP server, waits for a response; and repeats, until the end of the file.
Even if your connection is fast, if the server is far away (or slow), it takes a time for the response to arrive back. If the client spends this time uselessly waiting, your transfer speed will be low.
Most SFTP clients (including WinSCP) overcome the problem by both requesting/sending a large chunk of the file in each single read/write request and by sending (queuing) multiple requests without waiting for a response to previous. For example WinSCP can request up to 32 chunks for 32 KB each at once, totaling 1 MB (these are defaults which can be altered with SFTPDownloadQueue and SFTPUploadQueue raw session settings). But if there’s a big discrepancy between the bandwidth and the network delay, even that 1 MB can be too small to saturate the bandwidth.
In case the speed is throttled by a connection latency, it may help if you use SCP protocol instead of SFTP. SCP is less affected by the latency. In this case, it may help if you turn on compression. Toggling Optimize connection buffer size, in either way, can help too.
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.Winscp и скорость копирования.
Подскажите пожалста способ увеличения скорости копирования файлов командой scp и соответственно при использовании winscp, максимум, что удаётся выжать это 800 килобайт , то есть где то в пределах 10 мегабит. а канал поднят на сотку (понятно что реально там где то 40-80), всё равно очень медленно.
And we're not gonna stop
Until we reach the highest top
We don't need, to stop
We'll keep on searchin' till we dropПодскажите пожалста способ увеличения скорости копирования файлов командой scp и соответственно при использовании winscp, максимум, что удаётся выжать это 800 килобайт , то есть где то в пределах 10 мегабит. а канал поднят на сотку (понятно что реально там где то 40-80), всё равно очень медленно.
Да на самом деле без разницы, потому что в варианте ethernet - оптика ethernet та же фигня. ну да - расстояние километров дцать.. Но вот например щас две машинки соединены кроссом стят рядом, длина кросса.. ну метр не более. и тоже самое.. копирую некий tar.gz ^_^ Или просто директорию гигов на 10 объёмом, что такое ftp , nfs и sftp знаю. просто озадачился вот таким вот вопросм. да и вломак на самом деле всё вышеперечисленное использовать.. .
And we're not gonna stop
Until we reach the highest top
We don't need, to stop
We'll keep on searchin' till we dropДа на самом деле без разницы, потому что в варианте ethernet - оптика ethernet та же фигня. ну да - расстояние километров дцать.. Но вот например щас две машинки соединены кроссом стят рядом, длина кросса.. ну метр не более. и тоже самое.. копирую некий tar.gz ^_^ Или просто директорию гигов на 10 объёмом, что такое ftp , nfs и sftp знаю. просто озадачился вот таким вот вопросм. да и вломак на самом деле всё вышеперечисленное использовать.. .
Более чем странно слышать причину "вломак" отказа от стандартных протоколов. Если любой из этих протоколов показывает скорость выше чем scp, то вопрос к разработчикам этой утилиты.scp же шифрует данные при передаче. может у тебя просто мощности проца не хватает для более быстрого шифрования?
Не дело нев проце точно. ) 2xXeon 2.4 .. ладно, уже всё что надо перетащилось. Стандартные протоколы не всегда приемлемы. Щас буду читать в сторону sftp (scp более просто в плане работы конечного юзера).. раз . и копируется (правда медленно).
Вот. В общем ситуация понятна. а мой вломак скорее от того, что несмотря на YaST всё таки недостаточно всё удобно конфигурится и админится.. (когда машин много это уже важный показатель - быстрота и удобство администрирования). Я не спорю, что из консоли лучше и иногда быстрее.. но повторюсь в варианте какой нить глобально запарки рулить всё консолями.. я не восьминог. ^_^
And we're not gonna stop
Until we reach the highest top
We don't need, to stop
We'll keep on searchin' till we dropWhen using SSH or TLS/SSL, file transfers in WinSCP are encrypted and encryption is CPU intensive. Either your local machine or your server might not be able to encrypt file transfer stream at the same speed, your connection is able to transfer it.
Use the Windows Task manager to see, if one of the cores is utilized to its maximum during the transfer.
In case the speed is throttled by CPU, it may help if you choose different encryption algorithm on SSH page of Advanced Site Settings dialog (supposing you are using SSH -based file transfer protocol, such as SFTP or SCP ). Blowfish is usually a lot faster than AES . It may also help, if you turn off compression, if you have turned it on before.
Relation to PuTTY PSCP/PSFTP
Also there’s a lots to improve in performance of WinSCP itself 164. So it may get better in future versions.
Also note that as SSH code of WinSCP is based on PuTTY, file transfers with SSH-based protocols can hardly be faster than PuTTY (PSCP/PSFTP) is. Hence there is no point asking for speed improvements, if you get the same rate with PuTTY.
can't find the settintgs
Putty
На ОС Windows очень часто в качестве ssh клиента используется Putty. В данном клиенте также есть настройки, позволяющие избежать разрыва ssh сессий. Находятся они вот тут:
Connection -> Sending of null packets to keep session active -> Seconds between keepalives (0 to turn off)
Задаем значение, например 60 и пытаемся подключиться.
Локальный способ для Windows
WinSCP Slow
The big differents was at the cmdline.
Test first with:panreyes Joined: 2020-07-27 Posts: 1
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!)
martin◆
Site Admin Joined: 2002-12-10 Posts: 37,167 Location: Prague, CzechiaI 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.
seb Joined: 2020-09-04 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 fromFresh 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.
martin◆
Site Admin Joined: 2002-12-10 Posts: 37,167 Location: Prague, CzechiaOver 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 .
When facing an issue with WinSCP, following resources and hints may help you to resolve the issue yourself:
- Try to find solution in F.A.Q, in our numerous guides or in this documentation. Use Search box on the top right.
- If you are getting an error message, check the list of common error messages.
- Try to find a solution in tens of thousands answered questions on WinSCP support forum. Again, use the Search box on the top right, but navigate to the forum before you do so. – Alternatively, select “Support forum” in the search results.
- There are hundreds of WinSCP questions answered on Stack Overflow and Super User sites.
- Make sure you are using the latest version of WinSCP.
- If some feature of WinSCP is not working as you expect, check the documentation of the respective dialog box (use Help button). You may be missing a configuration option or may not understand what the feature actually does.
- If you wonder why some feature of WinSCP is or not available (is disabled/grayed), check the documentation of the respective dialog box (use Help button).
WinSCP does not use CPU effective ==> slow
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 threadsI 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
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 ……
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?
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?
Parallel Transfers
When comparing batch file transfer speed of WinSCP, note that it by default transfers all files sequentially using a single connection. While some other clients use multiple connection by default. If you prefer, you can transfer files using multiple parallel connections in WinSCP too.
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.
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 :)
Much faster here!
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.
I changed most relevant settings but the one that actually worked was to disable Connection -> Optimize connection buffer size.
This needs to be in the FAQ & perhaps a dev should take a look. Went from 300kb/s to 10,9MB/s (connection cap). This fixed my problem. HERO
Spend like 300GBP for new switch because was thinking maybe my network issue tweak all setting on my gigabyte card update firmware.
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 .
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.
Logging
If WinSCP started being slow suddenly, check if you did not enable logging on “Debug” level inadvertently.
Used protocol etc.
I am using SFTP and the very latest WinSCP version
Sincerely,martin◆
Site Admin Joined: 2002-12-10 Posts: 37,167 Location: Prague, CzechiaHoly 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Локальный способ для Linux (ssh)
Удаленный способ Linux & Windows
Если проблема с постоянным разрывом SSH сессий присутствует только на одном определенном сервере, то тогда можно в его конфигурации sshd сделать небольшие изменения, чтобы решить эту проблему. Для этого открываем файл /etc/ssh/ sshd _config и в самый низ конфигурации дописываем следующие настройки:
ClientAliveInterval 60 - Данный параметр определяет как часто сервер, к которому вы подключены, будет отправлять на ваш компьтер (клиент) пакет, говорящий "я живой". В нашем примере это будет происходить каждые 60 секунд.
ClientAliveCountMax 5 - Данный параметр определяет, сколько раз такой пакет "я живой" будет отправлен от сервера на ваш клиентский ПК, когда от вашего ПК не последовало ответа, прежде чем принудительно разорвать соединение. В нашем примере 5 раз.
С такими настройками сессия будет висеть 60 * 5 = 300 секунд, после чего автоматически оборвется (только в случае, когда клиент не отвечает 5 раз подряд).После внесения изменений в конфиг, необходимо перезапустить службу sshd на сервере, сделать это можно следующей командой:
Для выборочных исходящих SSH сессий
Если вы не хотите менять параметры для ssh через файл конфигурации, то существует способ указывать эти настройки только для определенных хостов, для этого вводим команду для соединения вот таким образом:
WinSCP
Эти же настройки есть и в программе WinSCP. Найти их можно следующим способом:
В начальном окне программы необходимо выбрать нужное соединение и нажать на кнопку "Редактировать", а затем на кнопку "Еще".
Если же вы пользуетесь каким-то другим клиентом, в котором нет подобных опций, тогда вам необходимо переходить к следующему пункту и изменить настройки на самом сервере, к которому вы подключаетесь.
Thanks
Disable connection optimization dramatically improved performance for me. Going from 400kbps to 4MB/s
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 .work for me
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!
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!
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".
glenhall Joined: 2019-02-13 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/untickedi 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/untickedOn 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.
Описание
Основными причинами, по которым ваши подключения обрываются могут быть:
- Очень плохое подключение к сети/интернету, потери пакетов и высокий пинг;
- На некоторых серверах по умолчанию стоят настройки, которые обрывают SSH сессии в случае долго бездействия;
- Некоторые модели роутеров обрывают соединения, если они долгое время не активны;
В данной статье мы рассмотрим 2 способа решения данной проблемы. Локальный (который вы можете использовать на своем ПК с которого подключаетесь к другим компьютерам) и Удаленный (который вы можете использовать, чтобы задать необходимые настройки на каком-либо сервере, к которому вы подключаетесь).
Читайте также: