improving loopback throughput

Navin Seshadri 6 Reputation points
2021-01-11T17:01:29.473+00:00

While working on improving performance of an application which requires to do socket IPC bounded to localhost, came across following article :
https://learn.microsoft.com/en-us/windows-hardware/drivers/network/sio-loopback-fast-path

Setting "SIO_LOOPBACK_FAST_PATH" does improve throughput and explanation in the document does sound logical as well.

However, what got me worrying about usage of "SIO_LOOPBACK_FAST_PATH" is that article mentions this ioctl as deprecated.

So, here's the question; are there any alternatives to "SIO_LOOPBACK_FAST_PATH" ioctl? If so, could you please point me to it.

Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,429 questions
Windows Hardware Performance
Windows Hardware Performance
Windows: A family of Microsoft operating systems that run across personal computers, tablets, laptops, phones, internet of things devices, self-contained mixed reality headsets, large collaboration screens, and other devices.Hardware Performance: Delivering / providing hardware or hardware systems or adjusting / adapting hardware or hardware systems.
1,551 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Jeffrey Tippet [MSFT] 6 Reputation points
    2021-02-19T18:39:41.65+00:00

    It's marked as "deprecated" for a few reasons:

    • In recent OS versions, the normal, non-fast-path loopback has been improved quite a bit, such that SIO_LOOPBACK_FAST_PATH doesn't give as much benefit anymore.
    • The option doesn't coexist with all other socket options, so there are some gotchas lurking there
    • Not all WFP callout drivers support this option, so it may not interop well with other 3rd party software

    We continue to work to make the loopback path fast, and the hope is that we can eventually make this socket option a no-op, since eventually the normal path will be just as fast as the "fast path".

    All that being said, if you do measure a valuable perf benefit to using this flag (especially on older versions of the OS), you may certainly use it.

    1 person found this answer helpful.
    0 comments No comments