Thread overview
during: a io_uring wrapper library
Dec 08, 2019
tchaloupka
Dec 08, 2019
Tobias Pankrath
Dec 09, 2019
Daniel Kozak
December 08, 2019
As of Linux kernel 5.1 new promissing io_uring interface was introduced (see introduction document https://kernel.dk/io_uring.pdf).

During[1] is a low level wrapper directly around Linux `io_uring` interface and so isn't using more C-ish liburing[2].

Whole library is built as `nothrow @nogc` and works with `-betterC` too.

Currently only features up to Linux 5.3 are tested. More would follow.

For some basic idea how this can be performant, I've added a sample echo_server[3] to the library with these results:

```
C++ epoll echo server:
======================
Benchmarking: localhost:5000
50 clients, running 512 bytes, 10 sec.

Speed: 45063 request/sec, 45063 response/sec
Requests: 450631
Responses: 450631

C liburing echo server:
=======================
Benchmarking: localhost:12345
50 clients, running 512 bytes, 10 sec.

Speed: 95894 request/sec, 95894 response/sec
Requests: 958942
Responses: 958941

During echo server:
===================
Benchmarking: localhost:12345
50 clients, running 512 bytes, 10 sec.

Speed: 131090 request/sec, 131090 response/sec
Requests: 1310906
Responses: 1310904
```

Main difference with C liburing echo server is that we're using preregistered IO buffer so the kernel has less work with it. Otherwise it should perform similarly.

[1] https://github.com/tchaloupka/during
[2] https://github.com/axboe/liburing
[3] https://github.com/tchaloupka/during/tree/master/examples/echo_server

December 08, 2019
On Sunday, 8 December 2019 at 10:35:24 UTC, tchaloupka wrote:
> Main difference with C liburing echo server is that we're using preregistered IO buffer so the kernel has less work with it. Otherwise it should perform similarly.
>
> [1] https://github.com/tchaloupka/during
> [2] https://github.com/axboe/liburing
> [3] https://github.com/tchaloupka/during/tree/master/examples/echo_server

I like the range interface.
December 09, 2019
On Sunday, 8 December 2019 at 10:35:24 UTC, tchaloupka wrote:
> As of Linux kernel 5.1 new promissing io_uring interface was introduced (see introduction document https://kernel.dk/io_uring.pdf).
>
> During[1] is a low level wrapper directly around Linux

https://bitbucket.org/kozzi11/during_io/src/master/