less_slow.cpp icon indicating copy to clipboard operation
less_slow.cpp copied to clipboard

Faster `io_uring` RPC

Open ashvardanian opened this issue 1 year ago • 4 comments

The current minimalistic RPC implementation using io_uring avoids certain more advanced features:

  • IORING_REGISTER_BUFFERS - since 5.1
  • IORING_RECV_MULTISHOT or io_uring_prep_recvmsg_multishot - since 6.0
  • IORING_OP_SEND_ZC or io_uring_prep_sendmsg_zc - since 6.0
  • IORING_SETUP_SQPOLL - with IORING_FEAT_SQPOLL_NONFIXED after 5.11
  • IORING_SETUP_SUBMIT_ALL - since 5.18
  • IORING_SETUP_COOP_TASKRUN - since 5.19
  • IORING_SETUP_SINGLE_ISSUER - since 6.0

It would be great to have one more implementation that uses those newer features while running on a newer Linux kernel.

ashvardanian avatar Jan 25 '25 21:01 ashvardanian

I've renamed the existing classes to rpc_uring55_server and rpc_uring55_client, targeting Linux kernel 5.5 and newer. I propose adding new classs called rpc_uring60_server and rpc_uring60_client for kernel 6.0 and newer.

ashvardanian avatar Jan 27 '25 10:01 ashvardanian

This set of examples by Dylan Yudaken (@DylanZA) can be very handy 🤗

ashvardanian avatar Feb 07 '25 11:02 ashvardanian

Is this completed? I see you've implemented some, if not all, of what's described here already.

charliesabino avatar Apr 19 '25 01:04 charliesabino

Hi @charliesabino! Most of the code is written, but I couldn't get all the flags to work, and wondering if there are some system settings we can poll to conditionally enable them?

ashvardanian avatar Apr 19 '25 08:04 ashvardanian