Monday, January 5, 2009

Lassen Performance Testing Framework

1. Overview

Currently, The framework does the following

  1. Reads the properties file
  2. Checks the machine availability, aborts if any other java process is found running
  3. Starts the Terracotta server
  4. Starts the tomcat servers
  5. Checks that each server is started
  6. Starts the examinator load test using Jmeters
  7. Collects the results
SVN URL : https://svn.terracotta.org/repo/forge/projects/exam-perf-test/LassenPerfFramework

2. lassen_perf.properties

The following properties file is being used to configure the testing environment. Perf# are the machine hostnames.

#################### Notes #########################
- Avoid using "
- keep these scripts on a shared drive
####################################################

BASE_DIR = /shares/perf/hsingh/lassen_perf
JAVA_HOME = /usr/java/default/

# apache tomcat
# CATALINA_HOME : The installation path for apache tomcat
# CATALINA_OPTS : Set JVM arguments for tomcat servers

CATALINA_HOME = /shares/perf/hsingh/apache-tomcat-6.0.18
CATALINA_OPTS = -Duse.async.processing=true -Dasync.concurrency=5 -Dcom.tc.l1.cachemanager.enabled=false -Duse.pojoizer=false -XX:NewSize=512m -XX:MaxNewSize=512m -Xms1024m -Xmx1024m -server -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -verbose:gc

# terracotta server
# TC_CONFIG_PATH : The path to tc-config.xml file for terracotta server
# TC_HOME : The installation path for Terracotta server
# TC_OPTS : Set JVM arguments for terracotta server here

TC_CONFIG_PATH = /shares/perf/hsingh/examinator/branches/tc-2.7/tc-config.xml
TC_HOME = /shares/perf/hsingh/terracotta-co/2.7/code/base/build/dist/terracotta-2.7.2-snapshot/
TC_OPTS = -Xms1g -Xmx1g -Dcom.tc.l2.objectmanager.fault.logging.enabled=true -Dcom.tc.l2.cachemanager.logging.enabled=true -Dcom.tc.l2.berkeleydb.je.maxMemoryPercent=15

# Jmeter
# JMETER_DIR : The installation path for Jmeter
# JMETER_NODES : Set machines to be used to run JMeter. Syntax: :. Each JMeter consumes 4 GB of RAM

JMETER_DIR = /shares/perf/hsingh/LassenPerfFramework/jakarta-jmeter-2.3.2
JMETER_NODES = perf01:3 perf37:5

# list of servers to be used to set the testing environment

L1_NODES = perf21 perf22 perf23 perf24 perf25 perf26 perf27 perf28 perf29 perf30 perf31 perf32 perf33 perf34 perf35 perf36
L2_NODE = perf02
MYSQL = perf28

3. Directory Listing

ScriptDirectoryComments
clean_mysql.sh scripts/Deletes the previous exam results from the mysql database
kill-server.sh scripts/Kills all the tomcat and terracotta server
lb-status.sh scripts/ CL tool to check the number of concurrent requests being processed by the Load Balancer
machine-status.sh scripts/Checks the java process running on the machines
set-env.sh scripts/ Reads and parses the Variables being used in the scripts
start-tomcat.sh scripts/Builts DSO boot jar and starts tomcat server
startAll-tomcat.sh scripts/Starts all the tomcat server
tc-server.sh scripts/starts terracotta server
GC scripts/results/Analyzes the verbose GC output
collectAll-tomcatlogs.pl scripts/results/collects all tomcat logs
latency.sh scripts/results/prints out the average server latency calculated using the response time tracking valve logs
results/.sh scripts/results/Master script for resutls


4. How to run the test

  1. Add or modify the machines to be used for the test in the lassen_perf.properties.
  2. Configure the Load balancer to use the tomcat machines specified in the properties file. Need to comment or uncomment specific tomcat servers in the httpd.conf (perf.conf).
  3. Restart the Load Balancer. /sbin/service apache2 restart on SLES 10. It requires root access.
  4. Clean the MySQL db using "scripts/clean_mysql.sh ."
  5. Start the test using masterRun.sh
  6. To abort the test stop the masterRun.sh script and kill all servers using "scripts/kill-server.sh"