I need to minimize latency for sending moderate-sized messages (~100kb) from a Windows Server 2008 R2 to another machine with the same OS.
Studying wireshark logs and looking at tcp graphs shows that more than half the latency is explained by tcp slow start: the initial window size is so small that by the time it increases to a value sufficient to saturate the network bandwidth, the message is already over.
Googling told me that in pre-Vista, it was possible to manually set the TCP window size, but in Vista there's "auto tuning" for that.
Is it still possible to somehow, perhaps even programmatically, set this parameter for new tcp connections?
Yes, it's possible to adjust the Initial Congestion Window.
I've been looking at it from a web performance PoV, have a look at this blog post Increasing the TCP Initial Congestion Window on Windows 2008 Server R2
Based on everything I'm reading it doesn't look like the initial window size is configurable. You might try turing off auto-tuning (
netsh interface tcp set global autotuning=disabled
from an a elevated command prompt) and see what kind of performance you get that way. (It looks like a real blind spot that, with the introduction of the auto-tuning functionality, the ability to manually tweak values was taken away...)