Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make sure all tests pass when io_uring is enabled #5635

Open
trustin opened this issue Apr 24, 2024 · 1 comment
Open

Make sure all tests pass when io_uring is enabled #5635

trustin opened this issue Apr 24, 2024 · 1 comment

Comments

@trustin
Copy link
Member

trustin commented Apr 24, 2024

Armeria allows a user to choose the underlying transport type between nio, epoll and io_uring, defaulting to epoll on Linux and nio on other OSes. Armeria does not select io_uring even if the current Linux kernel has io_uring support, mainly because there were some test failures when we switched to io_uring.

We need to fix any test failures that occur when io_uring is used, and make it the default transport type on Linux for potentially better performance.

Currently, you can enable io_uring for all tests by inserting two lines in /build.gradle:

def isCi = System.getenv("CI") != null
allprojects {
    // Add common JVM options such as max memory and leak detection.
    tasks.withType(JavaForkOptions) {
        ...
        // Enable io_uring by default (only effective in Linux kernel 5.1+) // 👈👈👈
        systemProperties 'com.linecorp.armeria.transportType': 'io_uring'   // 👈👈👈
    }
    ...

You can confirm io_uring is actually in use from the log message like the following:

INFO  com.linecorp.armeria.common.Flags - transportType: IO_URING (sysprops)

Also, the event loop thread names will have -io_uring, e.g. armeria-common-worker-io_uring-3-6.

@trustin
Copy link
Member Author

trustin commented Apr 24, 2024

@dachshu, you told me you're interested in this issue last week, right? 😉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant