On Sun, Feb 20, 2011 at 6:36 PM, Samuel Adam <a...@certifound.com> wrote: > On Sun, 20 Feb 2011 14:46:06 -0500, Nico Williams <n...@cryptonector.com> > wrote:
> I appreciate your extensive (if wildly offtopic) analysis as quoted > below. You thoroughly misunderstood what I said, though. Again, my > fork()/exec() comment was directed to the same “cultural thing” as you > spoke about in a different context; and my object thereby was to posit > __why__ *nix kernel developers have more incentive to make sure processes > run light. Winapi doesn’t offer a really equivalent pair of syscalls, nor > an extensive existing fork-exec practice, so NT kernel developers needn’t > optimize that use case; whereas *nix kernel folks must of practical > necessity design their process models to support a typical *nix code > pattern. If they do not so do, their users will complain bitterly about > the overhead of all their daemons’ zillion workers *after* those workers > are started with the classic fork()/exec(). Unix _application_ developers have an incentive to keep their processes light-weight, but _kernel_ developers can't do that very much to make fork() faster other than encourage _application_ developers to use posix_spawn(). The semantics of fork() + threads are such that COW is really expensive for processes with large writable resident set sizes -- it is what it is. > This being off-topic as it is, I must decline to continue discussing OS > process practice in front of 10,000 or so people (or so I heard) who tuned > in for discussion about SQLite. You said some very interesting stuff, > though, particularly as to the TLB. I’d like to leave the door open to > engaging such discussions in an appropriate venue sometime (ENOTIME for > the foreseeable future). I thought it was on topic: I'm giving advice to SQLite3 application developers: a) fork-safety is _really_ difficult for complex libraries to implement, so assume fork-unsafe libraries unless the documentation tells you otherwise, b) fork() is not cheap, so use vfork() or better, posix_spawn() if at all possible. You're free to disregard such advice, of course. Cheers, Nico -- _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users