nodejs / node

Node.js JavaScript runtime ✨🐢🚀✨
https://nodejs.org
Other
107.41k stars 29.51k forks source link

Enable io_uring support in libuv by default #52156

Open ronag opened 7 months ago

ronag commented 7 months ago

Couldn’t find any issue tracking this so opening one.

We made ioring opt-in due to security concerns. Do we have any plan to re-enable it?

lemire commented 7 months ago

What are the documented benefits?

ronag commented 7 months ago

https://github.com/libuv/libuv/pull/3952

Performance looks great; an 8x increase in throughput has been observed.

santigimeno commented 7 months ago

We made ioring opt-in due to security concerns. Do we have any plan to re-enable it?

If adding an api in libuv that allows to communicate that user credentials have changed (maybe just thin wrappers over setxid() calls) is acceptable, it certainly can be done.

Also I think we should think thoroughly whether enabling io_uring by default at the moment is a good idea, as there're known issues with the current io_uring implementation in cpu constrained environments (specially relevant for containerized apps).

ronag commented 7 months ago

as there're https://github.com/libuv/libuv/issues/4089#issuecomment-1954866943 with the current io_uring implementation in cpu constrained environments (specially relevant for containerized apps).

Isn't that quite easy to work around with a available concurrency check?