during: a io_uring wrapper library
tchaloupka
chalucha at gmail.com
Sun Dec 8 10:35:24 UTC 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
More information about the Digitalmars-d-announce
mailing list