Sun Java System Web Server 6.1 SP11 Performance Tuning, Sizing, and Scaling Guide

PHP Scalability Tests

PHP is a widely used scripting language uniquely suited to creating dynamic Web based content. It is the most rapidly expanding scripting language in use on the Internet due to its simplicity, accessibility, wide number of available modules, and large number of easily available applications.

The scalability of Sun Java System Web Server combined with the versatility of the PHP engine provides a highly performant and versatile web deployment platform for dynamic content.

The PHP (version 4.3.2) tests were performed in two modes:

FastCGI

Figure 7–11 PHP Scalability Tests: FastCGI

PHP Scalability Tests: FastCGI

Table 7–19 PHP Scalability Test: FastCGI

CPUs  

Op/Sec  

Latency (msec)  

54 

214 

105 

225 

199 

230 

NSAPI

Figure 7–12 PHP Scalability Tests: NSAPI

PHP Scalability Tests: NSAPI

Table 7–20 PHP Scalability Test: NSAPI

CPUs  

Op/Sec  

Latency  

63 

190 

125 

193 

251 

190 

magnus.conf Settings

Init fn="load-modules"
shlib="/export0/ES61/install/bin/https/lib/libphp4.so"\
funcs="php4_init,php4_close,php4_execute,php4_auth_trans"
Init fn="php4_init"/
      errorString="PHP Totally Blowed Up!"

Init fn="load-modules"
shlib="/export0/ES61/install/bin/https/lib/libnsapi_fcgi.
so" funcs="FCGIRequestHandler,FCGIInit" shlib_flags="(global|now)"

Init fn="FCGIInit" errorString "Unable to start the FCGI NSAPI module"

obj.conf Settings

NameTrans fn="pfx2dir"
 from="/php-nsapi"dir="/export0/ES61/install/docs/php-nsapi" name="php-nsapi"
NameTrans fn="pfx2dir"
from="/php-fcgi"dir="/export0/ES61/install/docs/php-fcgi" name="fastcgi"

Service type="magnus-internal/fastcgi-php" fn="FCGIRequestHandler"
BindPath="localhost:8082" AppPath="/export0/php-fastcgi/bin/php"
StartServers="5" PHP_FCGI_CHILDREN="10" PHP_FCGI_MAX_REQUEST="2000"

<Object name="fastcgi">
ObjectType fn="force-type" type="magnus-internal/fastcgi-php"
Service type="magnus-internal/fastcgi-php"
         fn=FCGIRequestHandler
         BindPath="localhost:8082"
         AppPath="/export0/php-fastcgi/bin/php"
         StartServers="5"
         PHP_FCGI_CHILDREN="10"
         PHP_FCGI_MAX_REQUEST="2000"
</Object>

<Object name="php-nsapi">
# Set the MIME type
ObjectType fn="force-type" type="magnus-internal/x-httpd-php"
# Run the function
Service fn=php4_execute
</Object>