On Mon, Jul 12, 2010 at 02:26:45PM -0700, Bart Smaalders wrote:
> The overhead cost of a system call is about the same as a L3 cache miss:
> of order 150 ns.  Given the general expense in creating a new process by
> any means, this would not be my first place to look for performance
> wins.

But the overhead of vfork() is probably much higher when the parent has
multiple threads, since they must all get stopped first, and then later
they must all be made runnable again.  Java, Firefox, Thunderbird, all
come to mind as programs that might benefit from a native posix_spawn(2),
but first we need to see them using posix_spawn(3C).

For a single-threaded parent, posix_spawn(3C) as currently implemented
is plenty fast enough.  For most threaded programs that typically have
large RSSes and that use fork(2)+exec(2), switching to posix_spawn(3C)
would be a huge enough boost.

If there are important threaded apps with large memory footprints where
posix_spawn(2) would help a lot then we could consider posix_spawn(2).

Nico
-- 
_______________________________________________
on-discuss mailing list
on-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/on-discuss

Reply via email to