ossrs / srs

SRS is a simple, high-efficiency, real-time media server supporting RTMP, WebRTC, HLS, HTTP-FLV, HTTP-TS, SRT, MPEG-DASH, and GB28181.
https://ossrs.io
MIT License
25.65k stars 5.38k forks source link

New kernel file interface polling interface for Linux 4.18 (io_uring)? #3558

Closed oowl closed 1 year ago

oowl commented 1 year ago

Note: Please read FAQ before file an issue, see #2716

Description

Please description your issue here

Would SRS(ST-fork) be supported io_uring poll interface for file IO, I believe this will benefit the overall file IO performance and system stability of SRS (because SRS is a single-threaded program without any other threads to handle read/write operations for recorded files, and file IO itself is blocking in the existing system of SRS).

oowl commented 1 year ago

https://github.com/ossrs/srs/issues/2188

This is also another solution for SRS in addressing this problem. Implementing multi-threading support for the entire SRS could be complicated, but adding support for io_uring may be a feasible and quick solution for the st.

oowl commented 1 year ago

For example, we can see libuv io_uring patch https://github.com/libuv/libuv/pull/3952, it's small change (in code lines number change side)

winlinvip commented 1 year ago

Yes, we have plans to incorporate io_uring support into ST and would welcome any patches or contributions towards this effort.

To request support for io_uring in ST, please submit an issue on https://github.com/ossrs/state-threads