Questions tagged [io-uring]
37 questions
55
votes
4 answers
Is there really no asynchronous block I/O on Linux?
Consider an application that is CPU bound, but also has high-performance I/O requirements.
I'm comparing Linux file I/O to Windows, and I can't see how epoll will help a Linux program at all. The kernel will tell me that the file descriptor is…

Jon Watte
- 6,579
- 4
- 53
- 63
27
votes
1 answer
What exactly is io_uring?
Recently I've been seeing this in different forums. As far as I can tell from reading some forum discussions it is something to do with input and output. What exactly is io_uring?

Amani
- 16,245
- 29
- 103
- 153
14
votes
1 answer
Why is liburing write performance lower than expected?
Problem Summary
I am working on a project that requires streaming data to disk at very high speeds on a single Linux server. An fio benchmark using the command below shows that I should be able to get the desired write speeds (> 40 GB/s) using…

Smitch
- 171
- 8
11
votes
2 answers
Comparing Boost.Asio, libunifex, liburing, and CppCoro
I am trying to understand asynchronous models in C++. I am investigating 4 libraries that purport to deal with asynchronous I/O:
liburing (C version, C++ version): provides an interface for io_uring. The C++ version uses coroutines.
libunifex:…

Mark Wallace
- 528
- 2
- 12
4
votes
1 answer
Trouble compiling io_uring
I have been reading https://kernel.dk/io_uring.pdf and I would like to experiment with the actual syscalls (io_uring_setup, io_uring_enter) to check my understanding, but I am not able to compile the following simple program:
#include…

sc46
- 57
- 4
2
votes
1 answer
io_uring in multithreaded process
I am trying to write a multithreaded server using io_uring.
The problem is the function 'io_uring_wait_cqe' requires calling to io_uring_cqe_seen to mark the CQE as seen.
Therefore, in several threads, there may be a situation where the same event…

Rachel91
- 59
- 4
2
votes
1 answer
Convert `ioctl` call in golang
I'm trying to convert, or at least understand this ioctl call:
#define NVME_URING_CMD_IO _IOWR('N', 0x80, struct nvme_uring_cmd)
Is there an equivalent of _IOWR in golang? maybe with the unix package?

Mascarpone
- 2,516
- 4
- 25
- 46
2
votes
1 answer
How to create a single SQPOLL thread in io_uring for multiple rings (IORING_SETUP_SQPOLL)
Is it possible to create a single SQPOLL (iou-sqp) thread that polls submit requests of multiple io_uring rings?
This questions comes from the desire to use multiple io_uring rings without making syscalls (entering kernel) when submitting I/O…

Yury
- 21
- 2
2
votes
1 answer
io_uring_queue_init permission denied
I've updated my fedora linux with dnf update to kernel version Linux 5.16.7-200.fc35.x86_64 x86_64 and am now getting a EPERM/permission denied error for a call to io_uring_queue_init, even when calling my program as root.
I am at a total loss, is…

Klemens Morgenstern
- 783
- 4
- 18
2
votes
1 answer
Waiting for epoll and io_uring simultaneously
I'm migrating my project to io_uring for better performance. However, some part of the system depends on epoll being event system and not movable to io_uring (ex: database drivers, they write to socket internally and I get notification read/write…

Mary Chang
- 865
- 6
- 25
2
votes
1 answer
Where is the function: trace_io_uring_submit_sqe in Linux kernel?
Recently, I'm tracing the io_uring in Linux kernel. I found a function trace_io_uring_submit_sqe was called in io_uring.c. Through searching symbol on Github mirror repository or on elixir.bootlin, I can't found the definition of its. Are there any…

Steven
- 811
- 4
- 23
2
votes
0 answers
Why can't gdb read io_uring_cqe contents?
I am trying out loti-examples (Lord of the Uring) commit 8724d47 and liburing commit 7ff4fee on Ubuntu 20.04 with mainline kernel 5.12.
I use the following patch for loti-examples to have a better debugging experience:
diff --git a/CMakeLists.txt…

Janus Troelsen
- 20,267
- 14
- 135
- 196
1
vote
0 answers
IoUring with batch submission decrease the throughput
I want to use IoUring to speed up my application. After some search, I found that batch-submit IO requests can have higher throughput.
Therefore, I write the following code to read a big file(3.6GB):
let mut file =…

YjyJeff
- 833
- 1
- 6
- 14
1
vote
1 answer
Read at position relative to end of the file via IoUring
How can I read at the position relative to end of the file via IoUring? I have a file that contains the metadata in the end of the file because of single pass writing. Now, I want to read the file via IoUring for efficiency, therefore I have to read…

YjyJeff
- 833
- 1
- 6
- 14
1
vote
1 answer
liburing: io_uring_submit() causes error when placed in await_suspend
I'm currently trying out C++ coroutines abstracting away io_uring. For that I have the following class:
class io_service final {
public:
explicit io_service(unsigned size, threadpool& pool) : pool_(pool) {
if (auto ret =…

Frederic Schönberger
- 177
- 8