The mgw needs to scale, so it needs to be reworked, and since syscalls are getting more expensive every year due to kernel mitigations handling the virtual trunk rtp sockets sounds like a job for io_uring.
- Subject changed from general multithreading ticket to osmo-mgw multithreading
this deserves a bit better description:
- osmo-mgw traditionally only operates within one thread, which doesn't scale very far given it's extensive use of small packets and hence high syscall load
- we now are introducing the support for operating multiple MGWs from a BSC or MSC to distribute the load across different MGW instances. This is primarily useful for scaling out to multiple physical machines or VMs with separate IP addresses, etc.
- in addition to that, and unrelated to the above, we want to introduce real multi-threading support to osmo-mgw, i.e. handle different endpoints in different threads, so that the RTP/RTCP sockets of one endpoint are served within the same thread, but different endpoints can be served by different threads
The use of io_uring is a separate, independent option, which doesn't really have a strict relation to multi-threading. io_uring enables even a single-threaded program to handle alot of socket I/O syscalls without many [or even any!] syscalls.