Moving beyond fork() + exec()
Points and comments are a snapshot, not live.
Proposal for Linux spawn templates to optimize repeated process creation rejected; discussion turns toward posix_spawn as the real goal.
Li Chen proposed adding spawn templates to the Linux kernel to optimize spawning the same executable repeatedly. The mechanism would cache executable information in a template file descriptor, then use spawn_template_spawn() to create child processes with specified arguments, environment variables, and file descriptor actions. Benchmarks showed 2% improvement. However, reviewers including Mateusz Guzik and Christian Brauner rejected the approach as incomplete, arguing it left fork() untouched where most overhead lies. Brauner suggested building instead on existing pidfd abstractions with a pidfd_config() system call modeled after fsconfig(), enabling a native kernel-based posix_spawn() implementation. Chen agreed the broader API sketch was better and said future work would follow that direction.
What commenters are saying
Top-ranked comments correct the article's claim about process memory copying: shared libraries and executable code are deduplicated across processes via mmap, not duplicated. One commenter notes fork() is expensive mainly for large-memory processes (roughly 1ms per 1GB), making helper processes necessary at scale. Discussion splits on whether process spawning belongs on hot paths at all; some argue processes should rarely be spawned repeatedly, others defend it as valid for build systems and isolation-heavy workloads. A tangential thread clarifies that libgcc and libc exist once in memory and are mapped into each process, not duplicated 800 times.