Faster forking of large processes on Linux ?
Posted
by timday
on Stack Overflow
See other posts from Stack Overflow
or by timday
Published on 2010-04-28T16:56:05Z
Indexed on
2010/04/28
18:07 UTC
Read the original article
Hit count: 274
What's the fastest, best way on modern Linux of achieving the same effect as a fork
-execve
combo from a large process ?
My problem is that the process forking is ~500MByte big, and a simple benchmarking test achieves only about 50 forks/s from the process (c.f ~1600 forks/s from a minimally sized process) which is too slow for the intended application.
Some googling turns up vfork
as having being invented as the solution to this problem... but also warnings about not to use it. Modern Linux seems to have acquired related clone
and posix_spawn
calls; are these likely to help ? What's the modern replacement for vfork
?
I'm using 64bit Debian Lenny on an i7 (the project could move to Squeeze if posix_spawn
would help).
© Stack Overflow or respective owner