Skip to main content

By clicking Submit, you agree to the developerWorks terms of use.

The first time you sign into developerWorks, a profile is created for you. Select information in your developerWorks profile is displayed to the public, but you may edit the information at any time. Your first name, last name (unless you choose to hide them), and display name will accompany the content that you post.

All information submitted is secure.

  • Close [x]

The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerworks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

By clicking Submit, you agree to the developerWorks terms of use.

All information submitted is secure.

  • Close [x]

Getting Started with WebSphere Performance Benchmark Sample on Windows 2000

Yongli An, Database Administration , IBM Toronto Lab, IBM Canada
Yongli An is a DB2 UDB Performance Engineer, IBM Certified Solutions Expert - DB2 UDB 7.1 Database Administration for UNIX, Windows and OS/2®. Yongli is experienced in TPC-C and WebSphere benchmarking. His current focus is DB2 performance for WebSphere Advanced Server and e-business applications. Yongli can be reached at yongli@ca.ibm.com.
Tony Lau, DB2 Performance Engineer, IBM Toronto Lab, IBM Canada
Tony Lau is a DB2 Performance Engineer. He earned his Bachelor Degree of Applied Science in computer engineering from the University of Waterloo. His current focus is DB2 performance for WebSphere Advanced Server and e-business applications. Tony can be reached at tktlau@ca.ibm.com.

Summary:  The WebSphere Performance Benchmark Sample, a.k.a. Trade2, provides a collection of workloads for characterizing performance of the WebSphere Application Server. This paper focuses on the steps for installing Trade2 and configuring the software. It provides an excellent starting point for those who are new to administrating and running WebSphere applications in a WebSphere and DB2 environment.

Date:  23 May 2002
Level:  Introductory
Also available in:   Japanese

Activity:  4906 views
Comments:  

© 2002 International Business Machines Corporation. All rights reserved.

Introduction

Overview

The WebSphere Performance Benchmark Sample, or Trade2, provides a suite of IBM-developed workloads for characterizing performance of the WebSphere Application Server. The workloads consist of an end-to-end Web application and a full set of Web primitives. The applications are a collection of Java TM classes, Java Servlets, Java Server Pages and Enterprise Java Beans built to open J2EE APIs. Together these provide versatile and portable test cases designed to measure aspects of scalability and performance in an e-business environment using WebSphere Application Server.

Purpose

Problem definition

The current Trade2 documentation available from the IBM Web site ( "E-business benchmark administration and setup" ) provides detailed instructions for installing the benchmark sample, as well as the instructions for installing other related software. Those instructions are designed for users who have in-depth experiences in installing database application servers and in running benchmarks. For those new to this area, we need all the pieces in one place to make it easier to get this sample application up and running. This article fills the gaps in the Trade2 readme file and other lengthy manuals.

Design statements

  • Set up a simple single-node topology for installing the WebSphere Performance Benchmark Sample (Trade2), and highlight the important steps for installing and configuring the supporting software. Doing this provides an excellent starting point for those who are new to administrating and running Web applications in the WebSphere and DB2 environment.
  • Derive the general steps for running a benchmark using Trade2 benchmark as an example in a WebSphere and DB2 environment.

Intended audience

This article is intended to be the central place for providing instructions for a new user who is interested in trying out WebSphere Application Server and DB2 by playing with the WebSphere Performance Benchmark Sample. This article is also a good starting point for users who want to do product evaluation with WebSphere and DB2 using this benchmark sample application.


Requirements

The minimum requirements for running WebSphere Application Server and DB2 database server are available from the respective user manuals. Consult the documentation to plan your installations. The sections below show the software information used in this article and the other minimum requirements for setting up a functional test bed.

Software used

  • Windows ® 2000 Professional
  • WebSphere Application Server v4.0.1 Advanced Edition (build a0131.07)
  • DB2 Universal Database TM v7.2
  • WebSphere Performance Benchmark Sample, or Trade 2.531

Other minimum requirements

  • Memory: 256 MB of RAM (512 MB is recommended)
  • OS: Microsoft Windows NT Server or Workstation, V4.0 (SP 6a) or Windows 2000. You will need administrative authority on your Windows NT username to run WebSphere Application Server.
  • File space: 500 MB free disk space to download, extract and install program. (Approx. 147 MB for the download file, 220 MB in the local temp directory (Default c:\temp) for file extraction, and 120 MB for the components to install).
  • Browser: Netscape Navigator, V4.7, or Microsoft Internet Explorer, V4.01

Creating the DB2 and WebSphere Administrator

According to the WebSphere InfoCenter, you must log in with a user ID that belongs to the local administrator's group in order to install DB2 and WebSphere. In our study, we created a user ID with:

User name: trade
Password: trade

in the administrator group. The user account was used as both the DB2 administrator and WebSphere administrator. Although it is not recommended in a production system, this allows easy installation and administration in a benchmark system, where security is not a concern.

Note: If the creation of new user account trade/trade is prohibited, the workaround is described in the section Install the trade sample application .


Setting up the database

Install DB2 UDB

To install DB2 UDB, use the following steps:

  1. Run the setup program.
  2. At the Launchpad, click on Install .
  3. Select (check) all components, including DB2 Enterprise Edition, DB2 Application Development Client, and DB2 Admin Client.
  4. Select Typical Installation option.
  5. Enter DB2 administrator user name and password.
  6. Select " Do not install the OLAP Starter Kit " when prompted.
  7. Reboot the system.

After rebooting the machine, you must stop and disable the Warehouse logger and Warehouse server services. These are features in DB2 but they have nothing to do with our study.

Test the installation

To test the DB2 installation, the following commands are issued from a DB2 CLP:

db2 create db sample 
db2 list db directory

If the commands above are executed successfully, a database named sample is created and the database directory is listed.

Upgrade the JDBC drivers

To upgrade the JDBC drivers, the following commands are issued from a DB2 CLP:

net stop "DB2 JDBC Applet Server" 
net stop "DB2 JDBC Applet Server - Control Center" 
db2stop 
<sqllib>\java12\usejdbc2.bat

Before the JDBC update script usejdbc2.bat is run, two DB2-related services are stopped.


Installing WebSphere Application Server

The following sections describe how to install the WebSphere Application Server, and then how to test it to make sure the installation is successful.

Install WebSphere Application Server

To install WebSphere Application Server, use the following steps:

  1. Run the WebSphere Installer.
  2. Select Custom Installation as the Installation Option.
  3. In terms of Install Packages, make sure that "Configure Default Server and Application" and "IBM HTTP Server" are checked.
  4. Choose IBM HTTP Server as the Web Server Plugins.
  5. For the Security Information, enter the admin login and password as the User Name and Password.
  6. Select DB2 as the Database Type.
  7. Use the default was40 as the WebSphere repository database.
  8. For the Database User information, enter the database administrator user name and password for the User Name and Password.
  9. Finish up the installation by restarting Windows.

Test the Installation

First, we have to test IBM HTTP Server and then test WebSphere Application Server.

Testing IBM HTTP Server
To verify the installation of IBM HTTP server, use the following steps:

  1. Open a Web browser.
  2. Enter the Web address http://<hostname>/, where <hostname> is the hostname of the WebSphere machine.

The message "Welcome to the IBM HTTP Server page" indicates that the IBM HTTP server is installed correctly ( Figure 1 ).


Figure 1: Test IBM HTTP Server
Fig. 1 - Test IBM HTTP Server

Testing WebSphere Application Server
To verify the installation of WebSphere Application server, use the following steps:

  1. Start the WebSphere Administrative Server by running the adminserver.bat script under the <WEBSPHERE_HOME>/bin directory.
  2. Start the administrative console by running the adminclient.bat script under the <WEBSPHERE_HOME>/bin directory.
  3. Start the Default Server by clicking on the Start button while highlighting the Default Server node (WebSphere Administrative Domain -> Nodes -> Hostname -> Application Servers - > Default Server).
  4. Open a browser and go to http://<hostname>/servlet/snoop, where <hostname> is the hostname of the WebSphere machine.

where <WEBSPHERE_HOME> is the install directory of WebSphere Application Server.

The adminserver.bat script sets up the environment and launches the WebSphere Admin Server. The classpath will be set, and the admin server class will be loaded. The message "Server __adminServer open for e-business" indicates that the server is started successfully. If it fails, the script file will retry the launch.

The adminclient.bat script starts the admin console for the WebSphere server. It will connect to the server using port 900, and launch a visual control center. This is the major interface to the WebSphere administrator.

The default server is the sample application server set up during the installation. Once it is started, it is marked in the WebSphere admin repository database.

The snoop servlet is a standard sample servlet inside the default server. The servlet provides information on the server upon a HTTP request. If it shows the "Snoop Servlet - Request/Client Information," "Requested URL," "Servlet Name," etc., the link from the client to the HTTP server and the link from the HTTP server to WebSphere server is working properly ( Figure 2 ).


Figure 2: Use Snoop servlet to test the installation of WebSphere Application Server
Fig. 2 - Use Snoop servlet

Installing WebSphere Performance Benchmark Sample (WPBS)

This section will walk you through the steps for installing the sample application, building the Trade2 database used by the application, and testing Trade2 transactions.

Install the sample application

Before installing the application, the data source has to be created first.

Create the Trade data source object
To create the Trade data source object, you must perform following procedures ( Figure 3 ):


Figure 3: Create the Trade data source object
Fig. 3 - Create the Trade data source object
  1. In the Administrative Console, expand Resources -> JDBC Providers -> Sample DBDriver -> Data Sources.
  2. Right-click on Data Sources and select New .
  3. Fill in the property sheet using the following information:
  4. Click OK to finish.

The database object is a logical representation of the underlying tradeDB database in WebSphere.

Install the trade sample application
After Trade2 is downloaded and unzipped to a Trade2 directory, the following commands are issued under the Trade2 directory:

<JAVA_HOME>\bin\jar xfv DB2_AE_scripts.zip
copy .\nt\*.*<WEBSPHERE_HOME>\bin

copy TradeSample.ear <WEBSPHERE_HOME>\InstallableApps

cd <WEBSPHERE_HOME>\bin
ImportTradeDB2.bat trade trade
			

where <JAVA_HOME> is the home directory of the JDK and <WEBSPHERE_HOME> is the install directory of WebSphere Application Server.

The DB2_AE_scripts.zip consists of the scripts and XML files for importing the WebSphere Performance Benchmark Sample and creating the required database. It must be extracted and the scripts for NT must be copied to the WebSphere bin directory.

The TradeSample.ear consists of the Trade 2 EJB, servlets, and HTML pages. It is copied to the WebSphere InstallableApps directory for import.

Once everything is copied to the right directory, the ImportTradeDB2.bat script creates the application database and imports the Trade2 Web application through the WebSphere XML interface. All the users and trading information will be stored in the application database, tradeDB . The configuration information will be stored in the was40 administrative repository database.

Note: If the administrator user name and/or password are different from trade, the ImportTradeDB2.bat script must be run with the corresponding parameters:

ImportTradeDB2.bat <login> <password></password></login>

and all occurrence of the login and password in <WAS_HOME>\bin\TradeDB.bat must be updated to the corresponding values.

Build the Trade2 database

After everything is set up, we are ready to load the tradeDB database with users and other related sample data:

  1. Open a browser and go to http://<hostname>/WebSphereSamples/TradeSample/servlet/TradeConfigServlet. This is the Trade2 configuration page. For our purpose, we will accept the default values.
  2. Open a browser and go to http://<hostname>/WebSphereSamples/TradeSample/servlet/TradeConfigServlet?action=buildDB. This will populate the Trade2 database with sample trade data. The default size of the database is for 500 users and 500 quotes. This will take several minutes, based on your machine speed. If you change this for more users and quotes, then it will take longer to populate the database.
  3. Back up the Trade2 database tradeDB by issuing the following command:
    db2 -v backup db tradeDB to <backup directory>

    where <backup directory> is the directory for storing the database.

The TradeConfigServlet allows the administrator to configure the Trade application and populate the database.

Test Trade2 transactions

To do some Trade2 transactions, you can open a browser and go to http://<hostname>/WebSphereSamples/TradeSample/welcome.jsp This is the Trade2 welcome page. The welcome page is the login and register page for the traders. You can register as a new user and navigate the entire site just like a regular user would. Figure 5 shows the page after logging in as one user and clicking on the " Portfolio " button.


Figure 5: Test Trade2 transactions (trade portfolio)
Fig. 5 - Test Trade2 transactions (trade portfolio)

Running the benchmark

At this point, Trade2 is fully set up. The DB2 UDB server, WebSphere administrative server, and Trade2 application server are all up and running. The default WebSphere Application Server and DB2 configuration parameters for this Trade2 application are sufficient for test runs. However, please note that the topic of tuning this setup (including hardware and each software component) to get optimal performance is not intended to be covered in this article. This article provides only a starting point for setting up and running a WebSphere application in a WebSphere Application Server and DB2 environment. For setting up a system and tuning the system for performance, please refer to the respective product manuals, as well as related publications .

In this following session, we generalize the procedures for the performance engineers, which are required to perform in order to obtain some performance data from the Trade2 application.

Prepare and test the system

You should decide what level of hardware to use and then follow the procedures closely described in the previous sections to ensure that all the servers are set up and working correctly.

Do performance configuration

After testing the system, you can apply performance tuning to the system. All IBM HTTP Server, WebSphere Application Server, and DB2 Database Server should be tuned to get the best performance. Please refer to the respective product manuals, as well as related publications.

Stop the Trade Application Server

To have better performance comparisons, you might prefer to stop and then start the Trade2 application before each run:

  1. Start the WebSphere administrative client.
  2. In the administrative console, highlight the Default Server node, right click, then choose Stop on the menu.

The Default Server will be stopped, and all the database connections to the tradeDB database will be closed.

Restore the Trade2 database

To have comparable results between runs, we recommend that you start with a fresh test database in every run. You can either re-create the database or restore the database from a backup.

You can re-create the database by going through the steps described in the previous section and re-applying the performance tuning to the database. Clearly this approach is not very efficient, particularly when populating the database takes a long time.

The database can be restored from backup more quickly using a single line of DB2 CLP command:

db2 drop db tradeDB
db2 restore db tradeDB from <backup directory>

where <backup directory> is the location of the backup for the application database created in the previous section. All the data and database configuration parameters will be restored very quickly.

Start the Trade2 Application Server

The following are the steps for starting the Trade2 application:

  1. Start the WebSphere administrative client.
  2. In the administrative console, highlight the Default Server node and right click, then choose Start on the menu.

By doing that, the Default Server will be started, and database connections to the tradeDB database will be established.

Apply workload and generate statistics

At this point, the system is all set to go. You can use the workload generator of your choice to drive the Trade2 application through the trade scenario servlet. When a request is sent to http://<hostname>/WebSphereSamples/TradeSample/servlet/TradeScenarioServlet, the servlet will randomly pick an action to run, which is generic to any traffic generator. Benchmark Factory and LoadRunner are two commercial implementations of Web traffic generators, which are widely used to stress the system being tested in performance studies.

Analyze the performance data

Once the performance data is collected, you should analysis the result. If further tuning and investigation are needed, you should start from the section Do performance configuration , above, again.

Shut down WebSphere

When the study is finished, the system should be shut down. Shutting down will ensure that all the processes are stopped and do not interfere with other work. The following steps are for shutting down the system properly:

  1. Stop Default Server.
  2. Stop WebSphere administrative server.

The Default Server can be stopped from the administrative console as described in a previous section . This can be verified by viewing the connections to the tradeDB database:

db2 list applications

from the DB2 command window. There should be no connections from WebSphere Application Server to the tradeDB database.


Figure 6: Stop the WebSphere Application Server node using administrative console
Fig. 6 - Stop WebSphere Application Server

The WebSphere administrative server can be stopped through the administrative console ( Figure 6 ).

  1. On the WebSphere Advanced Administrative Console window, expand the tree of "WebSphere Administrative Domain."
  2. Then expand tree of "Nodes." Under the "Node," you will see all the nodes.
  3. Highlight the node you want to stop and you will see the status of that node on the right-side window.
  4. Right click on the node and then choose Stop from the menu. You will get a prompt window, with a message of "You are trying to stop the node that the console is connected to. This will cause the console to exit after the node is stopped. Do you want to continue?"
  5. Click Yes to stop the WebSphere administrative server.

You can verify whether the WebSphere server is stopped or not by viewing the connections to the was40 database and checking the existence of Java processes in the task manager window. There should be no any database connections into was40 database and no any WebSphere-related Java processes after stopping WebSphere administrative server.


Conclusion

This article describes a single-node topology and fully explains the procedures for setting up Trade2 and the supporting software. This article provides users with clear and simple instructions in one place to get Trade2 application up and running. This fills the gaps in the Trade2 readme file and other lengthy manuals. It provides an excellent starting point for those who are new to administrating and running WebSphere applications in the WebSphere and DB2 environment. The focus of this article is to help such readers get a functionally running application (Trade2) in the environment of WebSphere and DB2, using the minimum required resources. Performance tuning is not covered in this article. For more information in performance tuning and evaluation, please refer to the respective product manuals and other related publications.


Acknowledgements

The authors want to thank Peter Shum, DB2 e-Business Performance, for his help, guidance and expertise, and many others at the IBM Toronto Lab for their help.


Resources

About the authors

Yongli An is a DB2 UDB Performance Engineer, IBM Certified Solutions Expert - DB2 UDB 7.1 Database Administration for UNIX, Windows and OS/2&reg;. Yongli is experienced in TPC-C and WebSphere benchmarking. His current focus is DB2 performance for WebSphere Advanced Server and e-business applications. Yongli can be reached at yongli@ca.ibm.com.

Tony Lau is a DB2 Performance Engineer. He earned his Bachelor Degree of Applied Science in computer engineering from the University of Waterloo. His current focus is DB2 performance for WebSphere Advanced Server and e-business applications. Tony can be reached at tktlau@ca.ibm.com.

Report abuse help

Report abuse

Thank you. This entry has been flagged for moderator attention.


Report abuse help

Report abuse

Report abuse submission failed. Please try again later.


developerWorks: Sign in


Need an IBM ID?
Forgot your IBM ID?


Forgot your password?
Change your password

By clicking Submit, you agree to the developerWorks terms of use.

 


The first time you sign into developerWorks, a profile is created for you. Select information in your developerWorks profile is displayed to the public, but you may edit the information at any time. Your first name, last name (unless you choose to hide them), and display name will accompany the content that you post.

Choose your display name

The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerWorks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

(Must be between 3 – 31 characters.)

By clicking Submit, you agree to the developerWorks terms of use.

 


Rate this article

Comments

Help: Update or add to My dW interests

What's this?

This little timesaver lets you update your My developerWorks profile with just one click! The general subject of this content (AIX and UNIX, Information Management, Lotus, Rational, Tivoli, WebSphere, Java, Linux, Open source, SOA and Web services, Web development, or XML) will be added to the interests section of your profile, if it's not there already. You only need to be logged in to My developerWorks.

And what's the point of adding your interests to your profile? That's how you find other users with the same interests as yours, and see what they're reading and contributing to the community. Your interests also help us recommend relevant developerWorks content to you.

View your My developerWorks profile

Return from help

Help: Remove from My dW interests

What's this?

Removing this interest does not alter your profile, but rather removes this piece of content from a list of all content for which you've indicated interest. In a future enhancement to My developerWorks, you'll be able to see a record of that content.

View your My developerWorks profile

Return from help

static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=Information Management, WebSphere
ArticleID=14429
ArticleTitle=Getting Started with WebSphere Performance Benchmark Sample on Windows 2000
publish-date=05232002
author1-email=
author1-email-cc=
author2-email=
author2-email-cc=

Tags

Help
Use the search field to find all types of content in My developerWorks with that tag.

Use the slider bar to see more or fewer tags.

For articles in technology zones (such as Java technology, Linux, Open source, XML), Popular tags shows the top tags for all technology zones. For articles in product zones (such as Info Mgmt, Rational, WebSphere), Popular tags shows the top tags for just that product zone.

For articles in technology zones (such as Java technology, Linux, Open source, XML), My tags shows your tags for all technology zones. For articles in product zones (such as Info Mgmt, Rational, WebSphere), My tags shows your tags for just that product zone.

Use the search field to find all types of content in My developerWorks with that tag. Popular tags shows the top tags for this particular content zone (for example, Java technology, Linux, WebSphere). My tags shows your tags for this particular content zone (for example, Java technology, Linux, WebSphere).

Try IBM PureSystems. No charge.

Special offers