Issue Details (XML | Word | Printable)

Key: CORE-4563
Type: New Feature New Feature
Status: Resolved Resolved
Resolution: Fixed
Priority: Minor Minor
Assignee: Vlad Khorsun
Reporter: Sean Leyne
Votes: 3
Watchers: 7
Operations

If you were logged in you would be able to see more operations.
Firebird Core

Add support for Windows 8/2012 fast/low-latency "TCP Loopback Fast Path" functionality

Created: 29/Sep/14 02:34 PM   Updated: Sunday 08:50 AM
Component/s: Engine
Affects Version/s: None
Fix Version/s: 2.5.7, 3.0.2, 4.0 Alpha 1

Issue Links:
Depend
 


 Description  « Hide
Windows 8/2012 introduced new "TCP Loopback Fast Path" feature which improves the performance of the TCP stack for "localhost" (ie. loopback) connections, by "short-circuiting" the TCP stack for local calls. The details of the new function and the code changes required can be found at http://blogs.technet.com/b/wincat/archive/2012/12/05/fast-tcp-loopback-performance-and-low-latency-with-windows-server-2012-tcp-loopback-fast-path.aspx

 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Mark Rotteveel added a comment - 30/Sep/14 07:20 AM
Note that this needs to be both in client and server to work.

Vlad Khorsun added a comment - 30/Sep/14 07:53 AM
Mark,

sure, therefore i think there should be corresponding tickets for Jaybird and .Net provider too

Karsten Strobel added a comment - 19/Jul/16 03:58 PM
According to this article:

http://mysqlserverteam.com/mysql-5-7-labs-using-loopback-fast-path-with-windows-82012/

turning on the SIO_LOOPBACK_FAST_PATH option may bring a significant performance gain (when using a loopback connection, which is what I often do).

Here's a link about the background and how it is done:
https://blogs.technet.microsoft.com/wincat/2012/12/05/fast-tcp-loopback-performance-and-low-latency-with-windows-server-2012-tcp-loopback-fast-path

It looks like just one simple API call is required. Must be done both on the server and on the client side. Many users/developers may be able to add this on the client side, but it needs to be implemented on the server side. This may boost performance in some scenarios at nearly no effort!

Vlad Khorsun added a comment - 30/Dec/16 12:21 AM
Patch is committed into B3_0_Release branch.
Please, test it.

Sean Leyne added a comment - 30/Dec/16 05:59 PM
Any suggestions for the best type of tests to execute to measure the performance improvement? Selects of large or small rows?

Vlad Khorsun added a comment - 30/Dec/16 08:47 PM
Sean,

i think improvement should be per OS call, i.e. more calls - more profit.
I.e. case with a lot of small statements (transactions, etc) should give visible improvement.
But i can't say for sure. Ideally we should investigate all scenarions :)

Mark Rotteveel added a comment - 14/Jan/17 04:43 PM
Vlad, I might be wrong, but shouldn't setFastLoopbackOption be called before initiating the listen operation (in aux_request and listener_socket)?

When running the Jaybird testsuites against 3.0.2.32664-0_x64 I don't see any noticeable difference when using -Djdk.net.useFastTcpLoopback or not.

Vlad Khorsun added a comment - 14/Jan/17 05:12 PM
Mark,

while developing patch i've made config setting to manage when SIO_LOOPBACK_FAST_PATH should be called - before or after listen().
That patch was tested by Karsten and he found no difference.
Also, i've tested final version of patch on WIn10 virtual machine using TPCC test and found 5-10% improvement.
Probably, you should try multythreaded test (i used 64 threads, iirc).

Mark Rotteveel added a comment - 15/Jan/17 08:50 AM
Thanks, then I'll need to see if I can find another cause for this, or if I need a different test.