question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Feedback for io_uring native transport

See original GitHub issue

Hi! as you told here

We’d love to hear from you how io_uring works out for you.

So I came here to share a bit of our experience: First of all, thanks for this work, at the end of the day we were able to set everything up, it seems to be working and it reduces latency on our workloads by ~10-15%, cool! Special thanks for the flexibility, it’s nice that one developer can work on Linux and use io_uring at the same time when another one can use Mac OS and falls back to Epoll or other transport.

But one thing works not really great: on my end, I have

uname -a
Linux 5.8.0-55-generic #62~20.04.1-Ubuntu SMP Wed Jun 2 08:55:04 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

and our tests hang from time to time on my box with a log like this

## Lettuce Native Transports:
   --> io_uring availability: true
   --> epoll    availability: true

<some other logs here and at the moment we make a real connection to Redis:>

Unable to connect to [redis://127.0.0.1:5982]
java.lang.IllegalStateException: failed to create a child event loop
	at io.netty.util.concurrent.MultithreadEventExecutorGroup.<init>(MultithreadEventExecutorGroup.java:88) ~[netty-common-4.1.65.Final.jar:4.1.65.Final]
	... bla-bla-bla a lot of stracktraces here 

Caused by: java.lang.RuntimeException: failed to create io_uring ring fd Cannot allocate memory
	at io.netty.incubator.channel.uring.Native.ioUringSetup(Native Method) ~[netty-incubator-transport-native-io_uring-0.0.5.Final-linux-x86_64.jar:0.0.5.Final]
	at io.netty.incubator.channel.uring.Native.createRingBuffer(Native.java:155) ~[netty-incubator-transport-native-io_uring-0.0.5
	... over 9000 more

the first 3 lines of the log above stand for code

LOG.info("## Lettuce Native Transports:");
LOG.info("   --> io_uring availability: {}", IOUringProvider.isAvailable());
LOG.info("   --> epoll    availability: {}", Epoll.isAvailable());

So, from time to time, Native transport can allocate io_uring, but the next moment it can’t. I saw a note on the netty Readme page about that, but anyhow, seems like the transport check is not sufficient. For some colleagues of mine with a newer kernel, it works just fine.

I also saw that there is 0.0.6 version for netty transport I built it manually and seems like with this version, it works better, cos there is a kernel check > 5.9

Unfortunately, there is no 0.0.6 version in maven, so I can’t verify its behaviour on some test env. I thought about using this issue as a reference for the netty guys why do I ask to upload the 0.0.6 version on maven.

Thanks once again, I would love to hear any thoughts about this one.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:2
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
normanmaurercommented, Jul 1, 2021

@izemlyanskiy all the kernel release before 5.9 had some features missing or bugs that basically resulted in incorrect behaviour.

0reactions
mp911decommented, Jul 8, 2021

Closing that ticket, the dependency upgrade is addressed with #1798.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Netty/Incubator/Transport/Native/io_uring 0.0.1.Final released
After multiple months of development I am happy to announce the first incubator release of our native io_uring based transport.
Read more >
JVM network servers backed by io_uring | by Martin Grigorov
I've shared my idea with the Apache Tomcat team since they have a lot of experience with these Java APIs but it seems...
Read more >
Will use them again We would definitely use Native your for our next ...
Will use them again We would definitely use Native your for our next trip in Jamaica the rate was very competitive . Review...
Read more >
Avon native needs medical transport to Boston for brain surgery
Paula Persechini-Petitti has spent the past 30 years touring the world, getting medical supplies to the poor and organizing clinics in ...
Read more >
2022 Indian Super Chief Review (12 Fast Facts)
The bikes have a classic, clean look to them spread among three styles—classic naked, a bobber style, and a touring friendly model. The...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found