Sun ONE Web Server 6.1 Performance Tuning, Sizing, and Scaling Guide |
Chapter 7
Scalability StudiesThis chapter describes the results of scalability studies. You can refer to these studies for a sample of how the server performs, and how you might configure your system to best take advantage of Sun ONE Web Server’s strengths.
This chapter includes the following topics:
Study GoalsThis study shows how well Sun ONE Web Server 6.1 scales against 1, 2, and 4 CPUs. The goal of the tests in the study was to saturate the server CPU. The tests also help to determine what kind of configuration (CPU and memory) is required for different types of content. The studies were conducted against the following content:
General Conclusions
- The tuned server performed significantly better than the out-of-the-box server for static loads.
- The tuned server performed slightly better than the out-of-the-box server for dynamic loads.
- The tuned server showed no significant performance improvement for SSL-encrypted static and dynamic workloads.
Sun ONE Web Server Configuration
- Mostly out-of-the box settings
- File cache configured via nsfc.conf for cache static tests
- Tested with two virtual servers (secure and non-secure) on two listen sockets of the same instance
- SSL and non-SSL run without configuring two instances
- Java tests run with both the default and /usr/lib/lwp thread libraries
- HTTP/1.0 and HTTP/1.1 for static tests
This section lists:
Tuned Server Settings
The following table shows the server settings for the non-SSL performance runs. Also note the following:
nsfc.conf Settings
The following table lists the nsfc.conf settings.
For more information about nsfc.conf, see the Sun ONE Web Server 6.1 Administrator’s Configuration File Reference.
System Configuration
Performance ResultsFor most cases, scalability plots are shown. Performance is shown as a function of the number of CPUs enabled. The following metrics were used to characterize performance:
While operations per second (ops/sec) data is shown for most cases, the response time and throughput are shown only where available.
Results are provided for the following tests, which are discussed in the remainder of this chapter:
Static Content Test
This test was performed with static download of a randomly selected file from a pool of 400 directories, each containing 100 files ranging in size from 5 KB to 250 KB. Tests were done with the file cache configured to include all files in the directories. The goal of static content tests was to identify the maximum number of conforming connections the server could handle. A conforming connection is one that operates faster than 320 Kbps (kilobits per second).
Simultaneous connections: 1500
Figure 7-1 Static Content Test
Dynamic Content Test: WASP Servlet
This test was conducted using the WASP servlet. It prints out the servlet's initialization arguments, environments, request headers, connection/client info, URL information, and remote user information. The goal was to saturate the CPUs on the server.
Number of clients: 3600
Figure 7-2 Dynamic Content Test: WASP Servlet
Dynamic Content Test: C CGI
This test was performed by accessing a C executable called printenv.This executable outputs approximately 0.5 KB of data per request. The goal was to saturate the CPUs on the server.
Number of clients: 2400
Figure 7-3 Dynamic Content Test: C CGI
Dynamic Content Test: Perl CGI
This test ran against a Perl script called printenv.pl that prints the CGI environment. This script outputs approximately 0.5 KB of data per request. The goal was to saturate the CPUs on the server.
Number of clients: 450
Figure 7-4 Dynamic Content Test: Perl CGI
Dynamic Content Test: NSAPI
The NSAPI module used in this test was printenv2.so. It prints the NSAPI environment variables along with some text to make the entire response 2 KB. The goal was to saturate the CPUs on the server.
Number of clients: 6300
Figure 7-5 Dynamic Content Test: NSAPI
SSL Performance Test: Static Content
A 1 KB static SSL file was used for this test. The goal was to saturate the CPUs on the server.
Simultaneous connections: 550
Figure 7-6 SSL Test: Static Content
SSL Performance Test: Perl CGI
This test was performed by accessing the printenv C executable in SSL mode. The goal was to saturate the CPUs on the server. The test was performed in SSL mode with the SSL session cache both enabled and disabled.
Figure 7-7 SSL Test: Perl CGI
Table 7-9 SSL/Perl CGI: No Session Cache Reuse
# of CPUs
Op/Sec (Out of Box)
Op/Sec (Tuned)
1
41.9
42.19
2
81.0
81.86
4
145.1
146.05
Table 7-10 SSL/Perl CGI: 100% Session Cache Reuse
# of CPUs
Op/Sec (Out of Box)
Op/Sec (Tuned)
1
55.29
55.42
2
105.01
107.05
4
194.35
197.91
Table 7-11 SSL/Perl CGI: Session Cache Comparison
# of CPUs
No Session Cache
(Tuned)100% Session Cache
(Tuned)1
42.19
55.42
2
81.86
107.05
4
146.05
197.91
SSL Performance Test: C CGI
This test was performed by accessing the printenv C executable in SSL mode. The goal was to saturate the CPUs on the server. The test was performed in SSL mode with the SSL session cache both enabled and disabled.
Figure 7-8 SSL Test: C CGI
Table 7-12 SSL/C CGI: No Session Cache Reuse
CPUs
Op/Sec (Out of Box)
Op/Sec (Tuned)
1
84.8
82.73
2
165.0
164.38
4
290.6
291.63
Table 7-13 SSL/C CGI: 100% Session Cache Reuse
CPUs
Op/Sec (Out of Box)
Op/Sec (Tuned)
1
160.65
165.69
2
308.11
310.51
4
538.54
550.19
Table 7-14 SSL/C CGI: Session Cache Comparison
CPUs
No Session Cache
(Tuned)100% Session Cache
(Tuned)1
82.73
160.65
2
164.38
308.11
4
291.63
538.54
SSL Performance Test: NSAPI
This test was performed by accessing the printenv C executable in SSL mode. The goal was to saturate the CPUs on the server. The test was performed in SSL mode with the SSL session cache both enabled and disabled.
Figure 7-9 SSL Test: NSAPI
Table 7-15 SSL/NSAPI: No Session Cache Reuse
CPUs
Op/Sec (Out of Box)
Op/Sec (Tuned)
1
114.08
114.44
2
223.58
225.04
4
380.88
382.78
Table 7-16 SSL/NSAPI: 100% Session Cache Reuse
CPUs
Op/Sec (Out of Box)
Op/Sec (Tuned)
1
321.24
333.21
2
554.87
551.45
4
762.04
791.62
Table 7-17 SSL/NSAPI: Session Cache Comparison
CPUs
No Session Cache
(Tuned)100% Session Cache
(Tuned)1
114.44
333.21
2
225.04
551.45
4
382.78
791.62
JDBC Connection Pooling with OCI Driver
This test tested the scalability and performance of the JDBC connection pooling module. In this test a simple servlet requests a row from a large database and prints its content. An Oracle database and the Oracle OCI driver were used for the test. JDBC connection pool resource configuration is shown below (server.xml).
Number of clients: 3600
Figure 7-10 JDBC Connection Pooling Test
Table 7-18 JDBC Connection Pooling Test
CPUs
Response Time (msec)
Op/Sec
1
4223.66
529.14
2
1508.53
966.74
4
153.19
1634.94
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 ONE 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:
- Out-of-process "fastcgi-php" application invoked using the FastCGI plugin available for Sun ONE Web Server 6.1 (the download will be available from http://www.zend.com/sun/).
- In-process PHP NSAPI plugin (available with PHP).
The test executes the phpinfo() query. Mostly out-of-the-box settings were used, plus PHP-related settings in the obj.conf and magnus.conf files, as shown after the test graphs and data.
FastCGI
Figure 7-11 PHP Scalability Test: FastCGI
NSAPI
Figure 7-12 PHP Scalability Test: NSAPI
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>