News for hackers. Stuff that matters.
Re:io_uring_spawn: Launching New Processes with io_uring by the8472 on Wednesday September 14, 2022 @12:59PM (#32839968)
For example rust doctests consist of compiling each little doc snippet and executing it ensure that the asserts are true. That's two processes (rustc + the compiled piece of code) per test. This is an order of magnitude slower than multi-threaded in-process tests. Process startup and teardown is a significant fraction of that overhead.

Now fork+exec isn't the biggest chunk of that. But it fingers the memory subsystem. On many-core systems this leads to lock contention. So the cheaper starting a new process gets in terms of virtual memory operations the less lock-contention you get overall which also speeds up other parts.

There are no comments on this comment yet.