Hacker News new | ask | show | jobs
by barrkel 2316 days ago
Killing a process is much safer than killing a thread, and the OS does cleanup.

It's not great for maximizing performance but it's not 100s of milliseconds either, forking doesn't take long; what is slow is scripting languages loading their runtimes, but you can fork after that's loaded. If hardware is cheaper than opportunity cost of adding new features (rather than debugging leaks) it makes sense.

1 comments

I measured less than half a millisecond to fork, print time, and wait for child to exit.

http://paste.dy.fi/NEs/plain

So forking alone doesn't cap performance too much; one or two cores could handle >1000 requests per second (billions per month).