logoalt Hacker News

adrian_btoday at 11:11 AM0 repliesview on HN

> Since most of the threads are idle waiting, your application needs many threads to optimally utilize the servers resources.

I do not think that "many" and "optimally" belong in the same sentence.

Instead of having a great number of threads that are idle waiting, it seems much more efficient to have a single thread or a small number of threads, which handle multiplex asynchronous I/O, using something like liburing on Linux or I/O completion ports on Windows, so that the threads are seldom idle, wasting resources.