Download Speed Slow
With WinScp plugin i have 1,6MB/s download speed, with SSH.NET my download is 70 KBPs or lesss, how i can fix this?
I'm using the last versions of Both and VS2015 Nugget Plugins
Code SSH.nET: using (var client = new SftpClient("XXXXX", "XXXX", "XXXX")) { client.Connect(); if (client.IsConnected) { Program.setLog("Demorou " + TimeSpan.FromSeconds((DateTime.Now - startTime).TotalSeconds) + " ms para conectar!"); Program.setLog("Baixando: " + client.WorkingDirectory + strRmPath); using (Stream stream = File.OpenWrite(strLcGz)) { client.DownloadFile(strRmPath, stream); } var timespan = TimeSpan.FromSeconds((DateTime.Now - startTime).TotalSeconds); var size = (new FileInfo(strLcGz).Length / 1024) / 1024; var speed = size / timespan.TotalSeconds; Program.setLog("Speed: " + speed + " MB/s"); Program.setLog("Demorou " + timespan + " ms para baixar!"); Program.setLog("Download concluido!"); client.Disconnect(); } } Code WinScp:
SessionOptions soptSettings = new SessionOptions(); soptSettings.Protocol = Protocol.Sftp; soptSettings.HostName = "XXXX"; soptSettings.UserName = "XXXX"; soptSettings.Password = "XXXX"; //soptSettings.SshHostKeyFingerprint = "XXXXXXXX"; Program.setLog("Demorou " + TimeSpan.FromSeconds((DateTime.Now - startTime).TotalSeconds) + " ms para conectar!"); Program.setLog("Baixando: " + strRmPath); using (WinSCP.Session sesConnection = new WinSCP.Session()) { sesConnection.Open(soptSettings); TransferOptions toptStreamSettings = new TransferOptions(); toptStreamSettings.TransferMode = TransferMode.Binary; sesConnection.GetFiles(strRmPath, strLcGz, false, toptStreamSettings); } var timespan = TimeSpan.FromSeconds((DateTime.Now - startTime).TotalSeconds); var size = (new FileInfo(strLcGz).Length / 1024) / 1024; var speed = size / timespan.TotalSeconds; Program.setLog("Speed: {0} MB/s" + speed); Program.setLog("Demorou " + timespan + " ms para baixar!"); Program.setLog("Download concluido para pasta: " + strLcGz);
I've added two PRs today that improve SFTP performance (by a LOT, in my case), and simultaneously reduce CPU usage: #865 and #866. I'm not sure if the SCP file transfers also benefit, I didn't test/check that.
According to my benchmarks, both FileUpload and FileDownload have massive speed gains and are now comparable to Filezilla.
I'd be very interested to know if these changes also help you guys :)
It’ll take me a couple days to get and build this. I’ll let you know then.
On Aug 30, 2021, at 5:02 PM, zybexXL @.***> wrote:
I've added two PRs today that improve SFTP performance (by a LOT, in my case), and simultaneously reduce CPU usage: #865 and #866. I'm not sure if the SCP file transfers also benefit, I didn't test/check that.
According to my benchmarks, both Upload and Download have massive speed gains and are now comparable to Filezilla.
I'd be very interested to know if these changes also help you guys :)
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.
Thanks!