Intel® Ethernet 800 Series Application Device Queues (ADQ)

Software Developer's Guide

ID Date Version Classification
626536 04/03/2023 Public
Document Table of Contents

SO_INCOMING_NAPI_ID Approach for Java-Based Applications

Open JDK 15 natively supports socket option SO_​INCOMING_​NAPI_​ID. Java-based applications can make use of socket option (SO_​INCOMING_​NAPI_​ID) as load balancing technique for connection(s) to threads for optimal performance with ADQ (in terms of improving predictability, consistent lower latency, and higher throughput).

For a multi-threaded application to take advantage of an adapter’s dedicated queues, the application needs the ability to query which queue a connection is assigned to, so all socket connections from a specific device queue can be serviced by a single application thread. The application can then utilize busy polling to receive and transmit the network packets, minimizing system interrupts and context switches to better align overall system resources to applications.

Following is an example of Kafka application and pseudo code to utilize the new socket option. For the Kafka application only one class SocketServer.scala must change to add support for the SO_​INCOMING_​NAPI_​ID option and utilize ADQ benefits. The cycle to accept connection on server side was updated as: