Dell Power Solutions

Dell Power Solutions

Dell Magazines

Dell Magazines

Dell Power Solutions

Dell Power Solutions
Subscription Center
Advertise
Submit an Article
Magazine Extras

Dell Insight

Dell Insight Archives

Examining Open Source Software on the Dell PowerEdge 1655MC Server Blade

By Dave Jaffe, Ph.D. (May 2003)

To see how effectively the DellTM PowerEdgeTM  1655MC server blade system runs Web applications built with open source software, Dell ran a LAMP (Linux® , Apache, MySQLTM , and PHP) application stack on the PowerEdge 1655MC, then tested its performance. Using two PowerEdge 1655MC server blades as Web servers and four PowerEdge 1655MC server blades as clustered database servers, a Dell testing team built a cost-effective platform capable of hosting 400 simultaneous Web users of the database.

The DellTM PowerEdgeTM  1655MC server blade system provides up to six powerful servers in a 3U enclosure. Saving cost, space, and power, the PowerEdge 1655MC server platform runs either the Microsoft® Windows®  2000 Server or Red Hat® Linux®  7.3 operating systems.1 Additionally, Dell provides the OpenManageTM  Remote Install tool with each enclosure to enable users to capture the disk image of any Dell blade and deploy it to other blades. Enterprises can realize new efficiencies by running their critical applications on the PowerEdge 1655MC with either the Microsoft or the open source software platform.

The development of Linux and other open source software components now allows IT departments to build enterprise applications on low-cost, robust software. One such application platform, known as LAMP (for Linux, Apache, MySQLTM , and PHP), consists of an Apache Web server running the PHP version 4 (PHP4) application server and driving a MySQL back-end database-all running on the Linux operating system. Multiple blades that can be easily deployed using a specific application make the PowerEdge 1655MC well suited to run such open source application stacks.

In this study, a Dell team brought up a publicly available database of baseball statistics on a MySQL replication cluster running on four blades (one master and three slaves). On two other blades, the team implemented a Web application to generate sets of Top 10 lists of 20 different baseball statistics from the database. Results showed that the clustered database could handle 400 simultaneous users issuing Top 10 queries through the Web servers. Figure 1 shows the software stack.

Figure 1. Open source software stack running on clustered PowerEdge 1655MC server blades
Figure 1. Open source software stack running on clustered PowerEdge 1655MC server blades

Implementing the PHP application

The Major League Baseball Top 10 PHP application resembles implementations in Active Server Pages (ASP), JavaServer PagesTM , and Oracle® PL/SQLTM  Pages.2 The PHP4 preprocessor is implemented as an Apache module, libphp4.so. Administrators must activate it by uncommenting some lines in the Apache configuration file, httpd.conf. To run the application, Red Hat Linux 7.3 needs the following packages and version levels:

  • apache-1.3.23-11
  • php-4.1.2-7
  • mysql-3.23.49-3
  • mysqlclient9-3.23.22-6
  • php-mysql-4.1.2-7

All packages can be found on the Red Hat Linux 7.3 CDs that ship with the PowerEdge 1655MC.

PHP, like most Web scripting languages, works by embedding code into HTML. In the top10.php4 code, the entire script is PHP code (delimited by a pair of < ?php and ? > ). The proper HTML codes to be sent to the browser are created by the PHP script. (HTML contained between echo < < < EOT and EOT; is sent exactly as shown in the code).

Specifying the parameters
The top10.php4 page is called with three parameters: the type of statistic requested, $stat_type; the year requested, $year; and the league for which the statistic is requested, $league. If $stat_type is specified, the script will send a form for a new request to the browser along with the HTML for the Top 10 list requested. If $stat_type is not specified (such as when the page is called the first time), only the form is sent. The value of $stat_type is used in the first if statement to set the HTML TITLE to the proper title for the query.

After the HTML for the form is generated, the page performs the database lookup if the $stat_type variable is not empty. First the PHP code generates a header and starts an HTML TABLE. A large case statement is then used to generate the appropriate select query from the statistic type, year, and league. Then, a connection to a randomly chosen member of the MySQL cluster (IP addresses 192.168.50.13, 14, 15, and 16) is made with the following statement:

if(!($link_id = mysql_connect("192.168.50.1" . rand(3,6))))
die("Could not connect to MySQL server");

The ID of the database connection is stored in the variable $link_id. The other connection parameters—user and password—are stored in the file /etc/php.ini.

Finally, the query is sent to the MySQL database with the line:

$result = mysql_db_query('baseball', $query)

The results of the query are fetched with mysql_fetch_row(), placed into the TABLE HTML, and sent to the browser.

The testing team implemented the application on the first PowerEdge 1655MC server blade (blade11.dellblades.com). The blade11 image was then captured using OpenManage Remote Install and deployed to blade12. The two Web servers handled all the Web requests using round-robin Domain Name System (DNS) resolution. To see how the application works in practice, visit http://davejaffe.net/baseball.

Accessing the MySQL database

The Baseball Databank group maintains a set of publicly available baseball database tables at http://www.baseball-databank.org/files/tables. The data there covers the entire history of organized baseball, including several now-defunct leagues.

To give access to the user named web on the blade11 Web server, the testing team ran the following database administrator commands:

mysql > grant all privileges on *.* to web@blade11.dellblades.com identified by password '(webpw)';
mysql > set password for web@blade11.dellblades.com=password('(webpw)');

The team then repeated these commands for blade12.

Because memory was plentiful on the blades, the team changed the three tuning parameters from their defaults by adding the following lines to the configuration file /etc/my.cnf:

set-variable = max_connections=120
set-variable = key_buffer_size=32M
set-variable = sort_buffer=32M

After the team set up the first database blade, it used Dell OpenManage Remote Install to capture that disk image and deploy it to blade14. The team then set up a MySQL replication cluster with blade13 as the master and blade14 as the first slave. To perform this setup, the team first gave the master a server identification number and then told the master to log updates in a binary file. This sequence was accomplished by adding two lines to /etc/my.cnf:

server_id=3
log-bin

The next step was to grant read permission on the binary file to a replication user, repl, on the slave:

mysql> grant file on *.* to repl@blade14.dellblades.com identified by password '(replpw)';

After stopping the database and flushing the tables, the database files were then copied to the slave. The slave was given a different server ID through its /etc/my.cnf file. The following command was then run on the slave to specify the location of the master and the log file:

mysql > change master to master_host='blade13.dellblades.com', master_user='repl',
master_password='(replpw)', master_log_file='blade13_bin.001', master_log_pos=73;
mysql > slave start;

The last two pieces of data are obtained by running the MySQL command show master status on the master. When the slave process is started, the process will synchronize with the master's binary log at the record shown.

The team repeated the same steps to add blade15 and blade16 as slaves to the replication cluster. Any updates to the master database would then be replicated to all the slaves.

Testing the Web application

The team used Dell Browser Emulator, a Web stress tool, to test the Apache-PHP Web application and MySQL database back end. The test simulated 100 to 400 users, each issuing a query and then waiting an average think time of 10 seconds before issuing a second one. The Apache Web server was run in keep-alive mode so that the Internet connection between the Web server and the user's browser were maintained while the user issued repeated queries.

In the simulation, each user issued an average of 5 queries before disconnecting. With two Web servers driving one database server blade, 100 users issuing 554 queries per minute were supported with an average response time of 0.930 seconds. As each additional database slave blade was added to the cluster, an additional 100 users were simulated. As shown in Figure 2 , the response time increased only slightly as the number of blades and the workload were increased, indicating that the overhead of replication was small (expected because no updates occurred on the workload that was tested).

Figure 2. Browser Emulator stress tool results
Figure 2. Browser Emulator stress tool results

Similarly, the amount of work the cluster could perform scaled linearly with the number of blades in the cluster. The scalability of the cluster is shown in Figure 3 .

Figure 3. Scalability of MySQL replication cluster
Figure 3. Scalability of MySQL replication cluster

Running high-volume applications with agility

This study demonstrates the ease with which Web applications can be built on the PowerEdge 1655MC server blade system using open source software. Running Red Hat Linux 7.3 out of the box, the PowerEdge 1655MC can be set up to run as a Web server with Apache and PHP4, or as a database server with MySQL. The combination of up to six server blades in a single cost-effective 3U enclosure provides the capacity and flexibility to run many high-volume online applications such as those critical to enterprise computing.

Acknowledgments

The author would like to thank Sean Forman, Sean Lahman, and the rest of the Baseball Databank team for use of the baseball data.

Dave Jaffe, Ph.D. (dave_jaffe@dell.com) is a senior consultant on the Dell Technology Showcase team, specializing in cross-platform solutions. Previously, Dave worked in the Dell Server Performance Lab, where he led the team responsible for Transaction Processing Performance Council (TPC) benchmarks. Before working at Dell, Dave spent 14 years at IBM in semiconductor processing, modeling, and testing, and in server and workstation performance. Dave has a Ph.D. in Chemistry from the University of California, San Diego, and a B.S. in Chemistry from Yale University.

FOR MORE INFORMATION

http://www.dell.com/blades

© 2009 Dell | About Dell | Terms of Sale | Unresolved Issues | Privacy | About Our Ads | Dell Recycling | Contact | Site Map | Feedback

snDWW3