Open m0ppers opened 1 month ago
Your example runs in about 40-50 seconds for me, which is still pretty slow. I noticed that after sending the packet, it takes anywhere from 2-4ms to get the first response data, but sometimes it spikes up to 42ms, which seems suspiciously slow. I'll dive into more debugging as soon as I get some more time.
I digged a bit deeper and can reproduce that it sometime takes longer than 40ms to read(). The 40ms are happening whenever it renegotiates the window. By setting the window_size to 0xfffffff I was able to come around that. Still: I am stuck at 70MB/s whereas it should be 200MB+
I am not sure if I am doing something wrong but the download speed is way slower than it could be. I am trying to fetch a 1GiB file from my local vm as a testcase. The vm is just a freshly setup debian 12 with only openssh installed.
This is what I am doing:
After tweaking the values a bit I get roughly 60-70 MBps:
without doing anything I get only 10 MBps :face_with_spiral_eyes: :
A quick test with the sftp command line:
Is this the expected performance? Or did I do something wrong? :thinking:
I also did a quick cross check using a go library and this one is very close to what the sftp command line is doing: