digitalmars.D.announce - during: a io_uring wrapper library
- tchaloupka (41/41) Dec 08 2019 As of Linux kernel 5.1 new promissing io_uring interface was
- Tobias Pankrath (2/9) Dec 08 2019 I like the range interface.
- Daniel Kozak (2/6) Dec 09 2019 https://bitbucket.org/kozzi11/during_io/src/master/
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
Dec 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_serverI like the range interface.
Dec 08 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 Linuxhttps://bitbucket.org/kozzi11/during_io/src/master/
Dec 09 2019