JDK-8243099 : SO_INCOMING_NAPI_ID support
  • Type: Enhancement
  • Component: core-libs
  • Sub-Component: java.net
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: linux
  • Submitted: 2020-04-17
  • Updated: 2021-01-12
  • Resolved: 2020-05-20
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 15
15 b25Fixed
Related Reports
CSR :  
Relates :  
Relates :  
Relates :  
Sub Tasks
JDK-8250845 :  
Description
To create application specific traffic queuing and steering the SO_INCOMING_NAPI_ID support is needed on the JDK level. 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:

jdk.net ExtendedSocketOptions.java
+    public static final SocketOption<Integer> SO_INCOMING_NAPI_ID
+          = new ExtSocketOption<Integer>("SO_INCOMING_NAPI_ID", Integer.class);

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%.

[1] https://www.intel.com/content/www/us/en/architecture-and-technology/network-connectivity/800-series-adq-technology.html
[2] https://www.businesswire.com/news/home/20190924005210/en/Aerospike-Commercial-Database-Support-Intel%C2%AE-Ethernet-800
[3] https://lore.kernel.org/patchwork/patch/773304/
Comments
URL: https://hg.openjdk.java.net/jdk/jdk/rev/d70e921b3db9 User: sviswanathan Date: 2020-05-20 22:13:26 +0000
20-05-2020

Assigning to Sandhya for now as she is sponsoring this feature.
17-05-2020