File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed
vertx-core/src/main/java/io/vertx/core/impl Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -116,6 +116,17 @@ public String get() {
116116 JACKSON_DEFAULT_READ_MAX_NAME_LEN ("vertx.jackson.defaultReadMaxNameLength" ),
117117 JACKSON_DEFAULT_READ_MAX_TOKEN_COUNT ("vertx.jackson.defaultMaxTokenCount" ),
118118
119+ /**
120+ * Disable {@code sendfile} support for the io_uring transport.
121+ * <p>
122+ * When this system property is set to {@code true}, Vert.x will avoid using the
123+ * io_uring splice path.
124+ * <p>
125+ * This is useful because io_uring splice can be slower than the
126+ * epoll {@code sendfile} in some workloads.
127+ * See <a href="https://github.com/netty/netty/issues/15747">Netty issue 15747</a>.
128+ */
129+ DISABLE_IO_URING_SENDFILE ("vertx.disableIoUringSendfile" ),
119130 ;
120131
121132 public final String name ;
Original file line number Diff line number Diff line change 1818import io .netty .channel .unix .DomainSocketAddress ;
1919import io .netty .channel .uring .*;
2020import io .vertx .core .datagram .DatagramSocketOptions ;
21+ import io .vertx .core .impl .SysProps ;
2122import io .vertx .core .net .TcpOptions ;
2223import io .vertx .core .net .impl .SocketAddressImpl ;
2324import io .vertx .core .spi .transport .Transport ;
2930 */
3031public class IoUringTransport implements Transport {
3132
33+ private static final boolean DISABLE_SENDFILE = SysProps .DISABLE_IO_URING_SENDFILE .getBoolean ();
34+
3235 private static volatile int pendingFastOpenRequestsThreshold = 256 ;
3336
3437 /**
@@ -62,7 +65,7 @@ public boolean supportsDomainSockets() {
6265
6366 @ Override
6467 public boolean supportFileRegion () {
65- return IoUring .isSpliceSupported ();
68+ return IoUring .isSpliceSupported () && ! DISABLE_SENDFILE ;
6669 }
6770
6871 @ Override
You can’t perform that action at this time.
0 commit comments