title: Faster forking of large processes on Linux?
body: <p>What's the fastest, best way on modern Linux of achieving the same effect as a <code>fork</code>-<code>execve</code> combo <em>from a large process</em> ?</p>
  
  <p>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.</p>
  
  <p>Some googling turns up <a href="http://www.kernel.org/doc/man-pages/online/pages/man2/vfork.2.html" rel="noreferrer"><code>vfork</code></a> as having being invented as the solution to this problem... but also warnings about <a href="http://www.linux.org/docs/ldp/howto/Secure-Programs-HOWTO/avoid-vfork.html" rel="noreferrer">not to use it</a>.  Modern Linux seems to have acquired related <code>clone</code> and <code>posix_spawn</code> calls; are these likely to help ?  What's the modern replacement for <code>vfork</code> ?</p>
  
  <p>I'm using 64bit Debian Lenny on an i7 (the project could move to Squeeze if <code>posix_spawn</code> would help).</p>