y
Throughput - Orders Per Minute (OPM). Each order actually consists of 10 web requests to complete
the order.
y
Order response time (RT) in milliseconds
y
Total CPU - Total system processor utilization
y
CPU Zend/AP - CPU for the Zend Core / Apache component.
y
CPU DB - CPU for the DB component
Database Access
The following four methods were used to access the backend database for the DVD Store application. In
the first three cases, SQL requests were issued directly from the PHP pages. In the fourth case, the i5 PHP
API toolkit program call interface was used to call RPG programs to issue i5 native DB IO. For all the
environments, the same presentation logic was used.
y
ibm_db2 extension shipped with Zend Core for i that provides the SQL interface to DB2 for i.
y
mysqli extension that provides the SQL interface to MySQL databases. In this case the MySQL
InnoDB and MyISAM storage engines were used.
y
i5 PHP API Toolkit SQL functions included with Zend Core for i that provide an SQL interface to
DB2 for i.
y
i5 PHP API Toolkit classes included with Zend Core for i that provide a program call interface.
When using ibm_db2, there are two ways to connect to DB2. If empty strings are passed for userid and
password on the connect, the database access occurs within the same job that the PHP script is executing
in. If a specific userid and password are used, database access occurs via a QSQSRVR job, which is
called server mode processing
.
In all tests using ibm_db2, server mode processing was used. This may
have a minimal performance impact due to management of QSQSRVR jobs, but does prevent the apache
job servicing the php request from not responding if a DB error occurs.
When using ibm_db2 and the i5 toolkit (SQL functions), the accepted practice of using prepare and
execute was utilized. In addition stored procedures were utilized for processing the purchase transactions.
For MySQL, prepared statements were not utilized because of performance overhead.
Finally, in the case of the i5 PHP API toolkit and ibm_db2, persistent connections were used. Persistent
connections provides dramatic performance gains versus using non-persistent connections. This is
discussed in more detail in the next section.
In the following table, we compare the performance of the different DB access methods.
IBM i 6.1 Performance Capabilities Reference - January/April/October 2008
©
Copyright IBM Corp. 2008
Chapter 6 - Web Server and WebSphere
89
OS / DB
i 5.4 / DB2
i 5.4 / MySQL 5.0
i 5.4 / DB2
i 5.4 / DB2
ZendCore Version
V2.5.2
V2.5.2
V2.5.2
V2.5.2
Connect
db2_pconnect
mysqli
i5_pconnect
i5_pconnect
SQL function
Pgm Call Function
OPM
4997
3935
3920
5240
RT (ms)
176
225
227
169
Total CPU
99
98
99
98
CPU - Zend/AP
62
49
63
88
CPU - DB
33
47
33
7