Taking advantage of TCP Loopback fast path in Windows

Bernd Eckenfels bernd-2014 at eckenfels.net
Wed Sep 24 01:44:37 UTC 2014


Hello,

Is the GetVersionEx the recommended way to check for this feature? (we
had some trouble with manifests in the past and I think there is a new
version helper api to query for minimum levels?)  Or would it easier to
just try it and remeber the WSAEOPNOTSUPP?

I see on MSDN the only reason why you would not want to enable it is
the limited set of socket options. But if those (and it looks
like) cover all the JDK use there is no harm in turning it on,
right?

If I understand it right you always set the flag, especially also on
wildcard binds so that the listen socket is set up correctly in case it
is a connection from localhost, right? Does this safely handle
connects from other clients who do not set the flag?

Gruss
Bernd


 Am Wed, 24 Sep 2014 01:19:24 +0000
schrieb "Martin Sawicki (MS OPEN TECH)" <marcins at microsoft.com>:

> Hello
> We're proposing an improvement to the OpenJDK which enables users to
> take advantage of the TCP loopback fast path mechanism in Windows for
> significantly higher performance of sockets whose both end points are
> on the same machine.  This is especially relevant in distributed
> server-side/cloud scenarios, such as Hadoop.
> 
> We have the code figured out and tested internally. I've uploaded our
> webrev package here (too big to send as an attachment):
> 
> https://openjdkcontrib.blob.core.windows.net/tcploopback/webrev-20140918.zip
> 
> The crux of the change lies in enabling the SIO_LOOPBACK_FAST_PATH
> IOCTL flag on each socket creation call in Windows.
> 
> As for activating this optimization, we're proposing the conservative
> approach of keeping it off by default and adding a command line
> argument to activate it: -Dwindows.enableFastLocalTcpLoopback=true |
> false
> 
> (IMHO though, it'd be great to eventually just have it on by default).
> 
> We'd appreciate a review and acceptance of this improvement.
> 
> And, as we are new in the OpenJDK community and this may as well be
> our first contribution to Java, I apologize for any steps in the
> submission process that I may have missed here and would appreciate
> guidance as needed.
> 
> Best regards
> 
> Martin Sawicki (and Kirk Shoop, and Valeriy Kopylov)
> Microsoft Open Technologies, Inc.
> A subsidiary of Microsoft Corp.
> 
> 



More information about the net-dev mailing list