On Mit, 2012-06-20 at 10:36 -0700, George Pontis wrote:
> I have an application that runs well using lighttpd with PHP. In an effort
> to reduce the memory footprint I tried porting it to the busybox ( 1.20.1 )
> httpd. It was easy to get this working and it seems to work properly. What
> isn't good enough is performance when executing PHP scripts. It looks like
> the httpd is using fork/exec for each cgi, and that fork/exec can use a lot
CGI is defined that way.
> of CPU. There might also be some downsides to repeated alloc/free in the
Yes, that also depends on (the speed of) persistent memory (FlashRAM)
and the available RAM (at least for caching ....).
Usually one sees this with shell scripts (and in most shell scripts one
can avoid a lot of fork()+exec() by using pure bourne-shell features).
> embedded environment. By comparison, lighttpd starts a programmable number
> of php-cgi processes at startup, then keeps them around and just feeds
> scripts to them as needed. It is feasible to go back to lighttpd but before
This is (very probably) fast-cgi so no one wonders that it's vastly
faster.
Use pure CGI with lighttpd for a serious comparison.
> giving up for this reason, I wanted to ask if my understanding or build of
> the httpd is incorrect in some way. Any thoughts, suggestions, comments ?
Perhaps implementing fast-cgi into busybox-httpd is a solution.
But I've seen lighttpd on embedded sysrtems and it's not that fat (if
you leave out everything you do not need).
Bernd
--
Bernd Petrovitsch Email : [email protected]
LUGA : http://www.luga.at
_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox