TCP Sockets - Limiting one write at a time is harming performance (at least on windows)
leonfin at optonline.net
Tue Jun 2 10:03:57 PDT 2009
I did some more testing on what seems to be the best combination on multiple
simultaneous outstanding writes/reads. I find that at least on windows the
best option for writes is to set SO_SNDBUF size to 0 and schedule writes as
many as possible and not wait for single write to complete before scheduling
next one. It doesn't mean that application should schedule writes non-stop.
There can be a policy that application code can enforce. The data throughput
increase is 2x-3x in my tests.
More information about the nio-dev