franz1981 commented on code in PR #6021:
URL: https://github.com/apache/activemq-artemis/pull/6021#discussion_r2478471369


##########
artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/CheckDependencies.java:
##########
@@ -51,4 +52,17 @@ public static final boolean isKQueueAvailable() {
          return false;
       }
    }
+
+   public static final boolean isIoUringAvailable() {

Review Comment:
   I've added via https://github.com/netty/netty/pull/15785 a way to verify the 
status of the different optimizations made by io_uring on the OS - you can use 
it for reporting/debugging 👍 



##########
artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/NettyConnector.java:
##########
@@ -528,38 +534,54 @@ public synchronized void start() {
          return;
       }
 
-      if (remotingThreads == -1) {
+      boolean defaultRemotingThreads = remotingThreads == -1;
+
+      if (defaultRemotingThreads) {
          // Default to number of cores * 3
          remotingThreads = Runtime.getRuntime().availableProcessors() * 3;
       }
 
       String connectorType;
 
-      if (useEpoll && CheckDependencies.isEpollAvailable()) {
+      if (useIoUring && CheckDependencies.isIoUringAvailable()) {
+         //IO_URING should default to 1 remotingThread unless specified in 
config

Review Comment:
   It should use less than we use too with epoll - but 1 could be quite low.
   
   And check  https://github.com/netty/netty/pull/15524 if can help to scale up 
the number of event loops if required 



##########
docs/user-manual/configuring-transports.adoc:
##########
@@ -264,6 +264,22 @@ enables the use of epoll if a supported linux platform is 
running a 64bit JVM is
 Setting this to `false` will force the use of Java NIO instead of epoll.
 Default is `true`
 
+Additionally, Apache ActiveMQ Artemis offers support for using IO_URING, @see 
https://en.wikipedia.org/wiki/Io_uring.
+
+The following properties are specific to this native transport:
+
+useIoUring::
+enables the use of IO_URING if a supported linux platform running a 64bit JVM 
is detected.
+Setting this to `false` will attempt the use of `epoll`, then finally falling 
back to using Java NIO.
+Default is `false`
+
+[WARNING]
+====
+[#io_uring-warning]
+IO_URING support is a recent addition to the broker and should be considered 
`experimental` at this stage.
+Using it _could_ introduce unwanted side effects. As such, thourough testing 
and verification is advised before use in any production or otherwise critical 
environment.

Review Comment:
   Link to 
https://github.com/netty/netty/blob/d057da84206f958a0264284f24a5f513fb2652f9/transport-native-io_uring/README.md#i-tried-to-use-io_uring-but-got-javalangruntimeexception-failed-to-create-io_uring-ring-fd-cannot-allocate-memory



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information, visit: https://activemq.apache.org/contact


Reply via email to