SEARCH DOCS
info central: your site for Collage technical info
  CASSATT.COM   INFO CENTRAL
ACTIVE RESPONSE 5.0 TOPICS BLUEPRINTS TROUBLESHOOTING DOC INDEX


 

TOC

Prerequisites
The blueprint steps
Step 1: Install ECperf
Step 2: Set up the environment

Step 3: Builde the ECperf and emulator applications

Step 4: Set up the database
Step 5: Load the database
Step 6: Run the ECperf container
Step 7: Run the emulator
Step 8: Verify the ECperf setup
Step 9: Run ECperf

know-how:

Installing and Running ECPerf

Intended for use with Cassatt Active Response V5.0.

This blueprint walks you through installing, configuring, and running the ECperf benchmark application. You can use ECperf to verify that your Apache, WebLogic, and Oracle tiers are functioning properly.

The ECperf workload simulates an enterprise-level manufacturing, supply-chain management, and order/inventory system. While running the workload, you can run the ECperf benchmark test to measure the performance of your Cassatt Active Response environment.

Prerequisites

An activated Apache tier, created as described in Apache: Capturing an Image and Creating a Tier.

An activated Oracle tier, created as described in Oracle 9i RAC: Capturing an Image and Creating a Tier.

An activated WebLogic tier, created as described in WebLogic: Capturing an Image and Creating a Tier.

Space on /cassatt for ECperf (about 100 MB).

Sun ECperf benchmark kit version 1.0 update 2, available from: http://java.sun.com/j2ee/ecperf/download.html.

BEA ECperf kit for WebLogic Server 6.1sp2 and 7.0 (an add-on kit), available from: http://dev.bea.com/codelibrary/code/ecperf.jsp. The modifications required for WebLogic 8.1 are explained in this document.

The Cassatt file ecperf.9i_rac.tar, saved to the $ECPERF_HOME/schema/oracle directory.

The host name of a node in the WebLogic tier (shown as WebLogicHost in the following examples). To find out the host name of a node in a tier, select the tier in the left navigation pane of the Controller, and look for the hostnames column in the nodes table. For this task, you can pick any node in the tier.

The host name of a node in the Oracle tier (shown as OracleHost). For this task, you can pick any node in the tier.

The JDBC port for your system (shown as JDBCport). The default JDBC is 1521.

The ECperf listener port for your system (shown as ECperfPort). The default ECperf port is 9001.

The ECperf emulator listener port for your system (shown as EmulatorPort). The default emulator port is 8011.

The name of the Oracle service from the tnsnames.ora file (shown as OracleServiceName).

The blueprint steps

This blueprint does not follow the standard high-level blueprint steps. The steps in this document are unique to installing ECperf.

Step 1: Install ECperf

  1. Download and extract the ECperf benchmark kit into your shared storage. The kit creates an ecperf directory.
  2. Download and extract the BEA add-on package (ecperfbea70.tar) into the ecperf directory.
    Note the location of the installed ECperf software; you will use this path in the following procedures (where it is shown as SharedStoragePath).

The following instructions summarize the information in the files README.html and README_WLS.html, which are included with the ECperf kit and BEA add-on package. See these files for the detailed configuration and deployment instructions.

top

Step 2: Set up the environment

Follow these steps to set up your environment for ECperf, substituting your site values for SharedStoragePath, WebLogicHost, ECperfPort, EmulatorPort, OracleServiceName, JDBCport, and OracleHost.

  1. Log on to a node in the WebLogic tier.
  2. Open the file $ECPERF_HOME/config/wls_70.env, and edit to match this sample:

    WL_HOME=/opt/app/bea/weblogic81/server
    JAVA_HOME=/opt/app/bea/jdk142_04
    ECPERF_HOME=/SharedStoragePath/ecperf
    ECPERF_HOST=WebLogicHost
    ECPERF_PORT=ECperfPort
    EMULATOR_HOST=WebLogicHost
    EMULATOR_PORT=EmulatorPort
    JDBC_CLASSPATH=$WL_HOME/ext/jdbc/oracle/920/ojdbc14.jar
    JDBC_URL=dbURL = jdbc:oracle:thin:@//OracleHost:JDBCport/
    OracleServiceName'

    DRIVER_MACHINE=WebLogicHost
    ECPERF_OUTPUT=/SharedStoragePath/ecperf/output
    ECPERF_TMP=/SharedStoragePath/ecperf/tmp
    EJB_CLUSTERABLE=true
  3. Navigate to the directory $ECPERF_HOME/template, and edit these four template files to add the following lines:
    • corpdb.properties.template
    • mfgdb.properties.template
    • ordsdb.properties.template
    • suppdb.properties.template

    # For Oracle thin driver #dbURL = jdbc:oracle:thin:@//hostname:port/service dbURL = jdbc:oracle:thin:@//OracleHost:JDBCport/OracleServiceName
    dbDriver = oracle.jdbc.driver.OracleDriver
    jdbcVersion = 2
  4. Open the file $ECPERF_HOME/bin/build.wls.sh, and add $JAVA_HOME/lib/
    tools.jar
    to the WLS_CLASSPATH:

    WLS_CLASSPATH=$WL_HOME/lib/weblogic_sp.jar:$WL_HOME/lib/
    weblogic.jar:$ECPERF_HOME/classes:$JAVA_HOME/lib/tools.jar
  5. Open the file $ECPERF_HOME/build_wls.xml, and add the following line to <path id="ecperfclasspath">:

    <pathelement path="${java_home}/lib/tools.jar"/>
  6. Set up the emulator domain's environment: Open the file $ECPERF_HOME/wlsdomain/wls70/emulatordomain/setEnv.sh, and edit to match the sample below:

    WL_HOME="/opt/app/bea/weblogic81"
    JAVA_HOME="/opt/app/bea/jdk142_04"
    XERCES_JAR="/SharedStoragePath/ecperf/jars/xerces.jar"
    WL_SERVERIP=WebLogicHost
    WL_SERVERPORT=EmulatorPort
    JAVA_OPTION="-hotspot -ms512m -mx512m -Xms512m -Xmx512m -
    XX:NewSize=128m -XX:MaxNewSize=128m"
    ###JAVA_OPTION="-hotspot -Xms64m -Xmx64m"
    LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${WL_HOME}/server/lib/
    linux/i686"
    LD_LIBRARY_PATH="${WL_HOME}/server/lib/linux/i686"
    PATH="${WL_HOME}/server/lib/linux/i686:${PATH}"
  7. Edit the emulator domain’s configuration: Open the file $ECPERF_HOME/wlsdomain/wls70/emulatordomain/config.xml, and set the ECPerf emulator’s listen address and port to match the sample below:

    ListenAddress="WebLogicHost"
    ListenPort="EmulatorPort"
  8. Set up the ECperf domain's environment: Open the file $ECPERF_HOME/wlsdomain/wls70/ecperfdomain/setEnv.sh, and edit to match the sample below:

    WL_HOME="/opt/app/bea/weblogic81"
    JAVA_HOME="/opt/app/bea/jdk142_04"
    JDBC_CLASSPATH=$WL_HOME/server/ext/jdbc/oracle/920/ojdbc14.jar
    WL_SERVERIP=WebLogicHost
    WL_SERVERPORT=EmulatorPort
    JAVA_OPTION="-server -Xms2500m -Xmx2500m -XX:NewSize=600m -
    XX:MaxNewSize=600m -XX:SurvivorRatio=20 -
    Dweblogic.PosixSocketReaders=8"
    ###JAVA_OPTION="-hotspot -Xms200m -Xmx200m"
    LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${WL_HOME}/server/lib/
    linux/i686"
    LD_LIBRARY_PATH="${WL_HOME}/server/lib/linux/i686"
    PATH="${WL_HOME}/server/lib/linux/i686:${PATH}"
  9. Edit the ECperf domain's configuration to add your host names and ports:
    1. Navigate to the ECperf domain directory:

      cd $ECPERF_HOME/wlsdomain/wls70/ecperfdomain/
    2. Back up config.xml:

      cp config.xml config.xml.orig
    3. Copy config.xml.dualinst to config.xml:

      cp config.xml.dualinst config.xml
    4. Open the replaced config.xml and set the ECperf listen address, port, and URL to match this sample:

      ListenAddress="WebLogicHost"
      ListenPort="ECperfPort"
      URL="jdbc:oracle:thin:@//OracleHost:JDBCport/
      OracleServiceNam
      e"
  10. Open the file $ECPERF_HOME/bin/driver.wls.sh, and change the script as follows to use awk instead of nawk, which is not available:

    JAVA_HOME=`awk -F"=" '{ if ($1 == "JAVA_HOME") { print $2 }}' ${ENVFILE}`

top

Step 3: Build the ECperf and emulator applications

  1. Log on to a node in the WebLogic tier.
  2. Navigate to the $ECPERF_HOME/bin directory:

    cd $ECPERF_HOME/bin/
  3. Run the build script:

    sh build.wls.sh
  4. Copy the new emulator application to the WebLogic domain directory:

    cp $ECPERF_HOME/jars/Emulator.ear $ECPERF_HOME/wlsdomain/wls70/ emulatordomain/applications
  5. Copy the new ECperf application to the WebLogic domain directory:

    cp $ECPERF_HOME/jars/ecperf.ear $ECPERF_HOME/wlsdomain/wls70/ ecperfdomain/applications

top

Step 4: Set up the database

  1. Log on to a node in the Oracle tier as the oracle user.
  2. Navigate to the $ECPERF_HOME/schema/oracle directory and untar the file ecperf.9i_rac.tar.
  3. Navigate to the $ECPERF_HOME/schema/oracle/9i_rac/sql directory:

    cd $ECPERF_HOME/schema/oracle/9i_rac/sql/
  4. Use Oracle’s dbca tool to create a cluster database for ECperf.
  5. Set up the database by running the following scripts:

    schema_C.sh $ORACLE_SID datafile_path
    schema_O.sh $ORACLE_SID datafile_path
    schema_M.sh $ORACLE_SID datafile_path
    schema_S.sh $ORACLE_SID datafile_path
  6. Create the sequence tables used to generate primary keys by running the following script:

    schema_U.sh $ORACLE_SID datafile_path

top

Step 5: Load the database

  1. Log on to a node in the WebLogic tier.
  2. Navigate to the $ECPERF_HOME/bin directory:

    cd $ECPERF_HOME/bin/
  3. Run the load script:

    sh loaddb.wls.sh

Step 6: Run the ECperf container

  1. Log on to a node in the WebLogic tier.
  2. Navigate to the ECperf domain directory:

    cd $ECPERF_HOME/wlsdomain/wls_70/ecperfdomain/
  3. Run the script to start WebLogic:

    sh startWebLogic.sh

    As WebLogic starts, ignore the following warning messages:

    Public ID references the old version of the Servlet DTD.
    You must change the public ID in web.xml file to
    "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN".>

    The Node Manager should be running on each of the WebLogic nodes. If not, start the node manager on each of the nodes using startNodeManager, as follows. For hostname, specify the host name of the node:
    $WL_HOME/server/bin/startNodeManager.sh hostname 5555

  4. Log in to the WebLogic Console. A sample console is shown in the next figure.

    WebLogic Console
  5. Start the ECperf managed servers:
    1. In the left navigation pane, select Servers.
    2. Select a managed server to start.
    3. From the control tab at the top of the main page, select "Start this server..."

      Repeat this step for all nodes in the tier.

top

Step 7: Run the emulator

  1. Log on to node in the WebLogic tier.
  2. Navigate to the emulator domain directory:

    cd $ECPERF_HOME/wlsdomain/wls_70/emulatordomain/
  3. Run the script to start WebLogic:

    sh startWebLogic.sh

    As WebLogic starts, ignore the following warning messages:

    Public ID references the old version of the Servlet DTD.
    You must change the public ID in web.xml file to
    "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN".>

top

Step 8: Verify the ECperf setup

Follow these steps to verify that the application is ready for the benchmark test.

  1. Start a web browser.
  2. Test the delivery servlet by going to the following URL:

    http://WebLogicHost:ECperfPort/Supplier/DeliveryServlet

    The following text is displayed:

    Servlet seems to work OK
    Number of Transactions : 0
    Servlet invoked without command specified
  3. Test the emulator servlet by going to the following URL:

    http://WebLogicHost:EmulatorPort/Emulator/EmulatorServlet

    The following text is displayed:

    Emulator Servlet seems to work OK
    ECPERF_HOST : WebLogicHost
    ECPERF_PORT : EmulatorPort
    Servlet URL : Supplier/DeliveryServlet

    Number of Transactions : 0
    Servlet invoked without command specified
  4. Test ECperf by going to the following URL:

    http://WebLogicHost:ECperfPort/ECperf

    The ECperf home page is displayed, as shown in the following figure.

    ECperf Home Page

    This completes the ECperf setup. Next, run ECperf to exercise the Cassatt Active Response environment.

top

Step 9: Run ECperf

  1. Log on to a node in the WebLogic tier.
  2. Navigate to the $ECPERF_HOME/bin directory:

    cd $ECPERF_HOME/bin/
  3. Run the following script to start ECperf:

    sh driver.wls.sh
  4. View the output at:

    $ECPERF_HOME/output
  5. If ECperf fails, or if you need to optimize the Oracle database and the WebLogic server, refer to the following information:
    • See Sun's ECperf README.html for creating and configuring the RDBMS database.
    • See BEA WebLogic ECperf README_WLS.html for configuration tips and setting to optimize the WebLogic server.
    • Before rerunning ECperf, manually trigger a database checkpoint using the following sqlplus commands:

      sqlplus /nolog
      sql> connect / as sysdba;
      sql> alter system switch logfile;
      sql> alter system switch logfile;
      sql> alter system switch logfile;
      sql> alter system checkpoint;
      sql> exit;

This completes the procedure to install and run ECperf.