RE: Process Creation Speed
From: Stephan T. Lavavej
Date: Mon Apr 19 2004 - 07:46:52 EST
Thanks to all who have responded.
I had been measuring the time to create and terminate a do-nothing program.
I had not been measuring CGI programs, though that was why I was doing the
measurement in the first place.
I changed my measurement strategy, and I now get about 110 microseconds for
creation and termination of a do-nothing process (fork() followed by
execve()). Statically linking everything gave a significant speedup, which
allowed me to reach that value. This was on a 2.6.x kernel. 110
microseconds is well within my "doesn't suck" range, so I'm happy - CGI will
be fast enough for my needs, and I can always turn to FastCGI later if
necessary.
I am writing a web-based forum entirely in C++, rejecting interpreted
languages (Perl, PHP, ASP, etc.) and relational databases (MySQL,
PostGreSQL, etc.) entirely. My forum consists of "kiddy" CGI processes
which talk over the network to a persistent "mommy" daemon who keeps all
forum state in main memory.
My code runs on both Windows and GNU/Linux with no configuration needed, but
separate measurements indicate that XP takes about 3.3 ms to create and
terminate a do-nothing process. Thus it looks like Linux 2.6.x will be the
kernel of choice for my forum.
Thanks again!
Stephan T. Lavavej
http://nuwen.net
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/