adding ADQ support to jdk

Ivanov, Vladimir A vladimir.a.ivanov at
Thu Mar 12 22:10:46 UTC 2020

Dear All,

Application Device Queue (ADQ) is an open technology to create application specific traffic queuing and steering. We would like to propose adding new socket option support into JDK for Java applications to query the NAPI_ID of the underlying device queue associated with its socket connection and take advantage of ADQ feature.

The proposed API changes are:
public synchronized int getIncomingNapiId() throws SocketException
public synchronized int getIncomingNapiId() throws SocketException
public static final SocketOption<Integer> SO_INCOMING_NAPI_ID =
   new StdSocketOption<Integer>("SO_INCOMING_NAPI_ID", Integer.class);
public int getIncomingNapiId() throws SocketException

Please find the details on the ADQ feature below. We will be submitting a patch for community review soon. In the meantime, please let us know your feedback and comments.

ADQ is an open technology to create application specific traffic queuing and steering. System Administrator allocates Network resources to an application in a multi-application environment. These Network Resources are allocated as a set of Device Queues (Number of Tx/RX queue pairs), dedicated for application traffic. In addition, QoS attributes can now be applied to these Application Queues such as Network bandwidth limits & Traffic priority. Device then assigns the incoming application connections to these set of queues by defined policies such as round robin. ADQ provides hints to applications that enables each application thread to service incoming and outgoing traffic from a single device queue.
For a multi-threaded application to take advantage of these dedicated queues, application needs ability to query what queue a connection is assigned to, so all connections from a specific device queue can be serviced by a single application thread. Application then may utilize busy polling to receive and transmit the network packets, minimizing system interrupts and context switches to better align overall system resources to applications. This helps in improved predictability, reduce latency and improve throughput for ADQ enabled Application.  Performance-wise, several applications, including Aerospike, Open Source Redis, Memcached and NVMe over TCP can benefit with ADQ.

In our tests performed for Apache Kafka (Java application), with ADQ changes, we observed bandwidth improvements up to ~20% and 99 percentile tail latency reduced by ~20%.


Thanks, Vladimir
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the nio-dev mailing list