OK, sounds good.
Thanks! :mrgreen:
Thanks! :mrgreen:
Before posting, please read how to report bug or request support effectively.
Bug reports without an attached log file are usually useless.
SO_RCVBUF setting as it broke WinSCP for some users.
DefaultSendWindow (along its partner, DefaultReceiveWindow). It's what controls the system-wide default for socket buffers. And the msdn docs (<invalid hyperlink removed by admin>) even say, "Applications can modify this value on a per-socket basis with the SO_RCVBUF socket option".
send() function, individually block by block.
setsockopt(SO_SNDBUF)) and the issue disappeared.
pscp and an SSH server, and the results matched what I saw earlier – against the 180ms machine, I got 40kB/s with unpatched 8kB buffer pscp, and 330kB/s with a patched version. In this case, a buffer size of 64kB was enough to reach the max. transfer speed. A huge, mind-blowing improvement. So people have been using PuTTY for a decade, and noone ever questioned why SSH clients on *nix systems transfer data several times faster?
=== windows/winnet.c
==================================================================
--- windows/winnet.c (revision 9010)
+++ windows/winnet.c (local)
@@ -866,6 +866,8 @@
p_setsockopt(s, SOL_SOCKET, SO_KEEPALIVE, (void *) &b, sizeof(b));
}
+ {
+ int bufsize = 262144;
+ p_setsockopt(s, SOL_SOCKET, SO_SNDBUF, (void *) &bufsize, sizeof(bufsize));
+ }
+
scp tool, I get a clean stream of send:1460.