Unix Fork Performance
Discussions center on the performance issues of fork() and fork/exec in Unix-like systems, particularly copy-on-write overhead for large processes, and alternatives like posix_spawn, vfork, and Windows CreateProcess.
Activity Over Time
Top Contributors
Keywords
Sample Comments
It's mostly about copy-on-write memory due to forks.
What else is there besides fork/exec?
Is basic fork/exec from a large process still slow or have newer apis fixed that?
it's like a really really really expensive version of fork()!
Seems like more overhead than fork & execv technique.
Use posix_spawn not fork and exec, then at least the OS may not allocate twice the memory, eg the BSDs will not.
Wasn't vfork designed to solve this issue? Does it not work in practice?
You wouldn't fork() for performance, but for security reasons.
What about OSes that dont use fork()?
Could you educate me on what's wrong with fork()?