#102019 - 2003-06-12 10:02 AM
Re: Suggestion: For Moderators
|
Richard H.
Administrator
   
Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
|
Jooel, With IIS (which this board runs on), PHP is AFAIK an external CGI.
With Apache on Linux (and possibly Windows, not too sure) PHP can be in one of three modes:
- Traditional CGI (external process)
- Loadable module (like a DLL) via apxs
- Compiled in to the web server executable as static code
PERL can also be external or compiled in. If not used very often you would probably compile in as loadable module (saves memory). Where it is integral to your site you would probably compile in as static code (improves execution).
One of the major benefits of compiling in PHP is that it supports persistent connections. This means that where your database backend is (say) MySql, the database connection can be opened once by the web server process, and all subsequent requests which use the same authentication can reuse the connection. This is true even if the requests are for completely different end users or applications. Reusing a connector saves time, CPU cycles and memory required to start up and shut down a connection.
An external CGI process suffers a huge overhead including things like building/copying the environment, loading from disk, pre-allocating swap, fork/exec and all subsequent context switching.
|
|
Top
|
|
|
|
Moderator: Arend_, Allen, Jochen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Mart
|
0 registered
and 1635 anonymous users online.
|
|
|