ObjectWeb Consortium
Print

Advanced Search - Powered by Google

  Consortium     Activities     Projects     Forge     Events 

RUBiS


Project Links
· Home
· Download
· Documentation
· Mailing List
· Experimental Results
· License
· History

Developers' Corner
· Getting Involved
· ObjectWeb Forge Site
· CVS Repository

About
· Contacts
· Team
· JMOB

Compiling and running RUBiS

Software Requirements

For all the versions of the auction site benchmark:

  • MySQL v.3.23.43-max (for both MyIsam and BDB support) or compatible
  • Sun JDK 1.3.1 (even with PHP since the client is written in Java) or compatible
  • Apache v.1.3.22
  • Sysstat utility
  • Gnuplot (on main client node)
  • Bash 2.04 (on main client node)

For the EJB version :

  • Jakarta Tomcat v3.2.4 or compatible
  • EJB server JOnAS v2.x, v3.0, 3.1 or JBoss v2.x, v3.0, 3.2
  • Java servlets extension for Java platform (JSDK)
  • Enterprise Java Beans extension for Java platform
  • MySQL JDBC driver (successfully tested with mm-mysql JDBC driver)
  • EJB versions now support PostgreSQL v7.1 with the provided type 4 JDBC driver

For the Java servlets version:

For the PHP version:

  • PHP v.4.0.6 module for Apache

Setting up the make process (config.mk file)

Various environment variables are defined in the config.mk file. Each directory contains its own Makefile that includes values defined in the top config.mk file. You have to set the value to match your configuration:

JAVA = path to the program execution tool (java)

JAVAC = path to the java compiler (javac or jikes)

RMIC = path to the stub generator (rmic)

CLASSPATH = your classpath including path to j2ee.jar and servlet.jar.

JAVADOC = path to javadoc, the documentation generator

JAR = path to the jar util

EJB_SERVER = choose the EJB Server you want to use (either jonas or jboss) - Warning, this value is case sensitive.

DB_SERVER = choose the Database server you will use (either MySQL or PostgreSQL) - Warning, this value is case sensitive.

Setting up the build process for Ant (build.properties file)

Various environment variables are defined in the build.properties file. Each directory contains its own build.xml file that includes values defined in the top build.properties file. You have to set the value to match your configuration:

src = directory containing the source files

classes.dir = directory in which the .class files will be created

dist = directory in which the jar and war files will be created

web.dir = directory containing the html files for building a war file

ejb.server = choose the EJB Server you want to use (either jonas or jboss) - Warning, this value is case sensitive.

db.server = choose the Database server you will use (either MySQL or PostgreSQL) - Warning, this value is case sensitive.

Compiling and Running

From the top directory (/RUBiS/Makefile or /RUBiS/build.xml), you can use:

make world or ant allbuild everything (EJB, Servlets, documentation, ...)

EJB version

Setup the environment variables for the EJB server and the database server in the config.mk file for make or in the build.properties file for Ant then go in the subdirectory of the version you are interested in (/RUBiS/EJB_VersionName). Available commands are:

make all or ant distcompile the beans, the servlets for the EJB version and the client, then copy the appropriate deployment descriptor in the META-INF directoty and generate the corresponding jar files
make clean or ant cleanremove class and jar files
make doc or ant docgenerate the javadoc documentation

To use the EJB version of RUBiS you first have to configure and start the Apache HTTP server, JOnAS EJB server or JBoss EJB server and Tomcat.

Servlets version

Go in the subdirectory of the servlets version (/RUBiS/Servlets). Available commands are:

make servlets or ant distcompile the servlets
make clean or ant cleanremove class files
make doc or ant docgenerate the javadoc documentation

To use the servlet version of RUBiS, you first have to configure and start the Apache HTTP server and Tomcat.

PHP version

To use the PHP version of RUBiS, you just have to configure and start the Apache HTTP server.

Client emulator

From the top directory (/RUBiS), you can use:

make client or ant clientcompile the client
make emulator or ant emulatorrun the client
make initDBgenerate data to initialize the database

To select the workload and the version to use, you have to setup properly your rubis.properties file.

API documentation

From the top directory (/RUBiS), you can use:

make docgenerate the javadoc documentation for the java client, the servlets version and each EJB versions.

EJB server : JOnAS

Go in the subdirectory of the version you are interested in:

/RUBiS/VersionName/jonas_start.shstart the EJB server
/RUBiS/VersionName/jonas_stop.shstop the EJB server

Servlets server : Tomcat

Go in the subdirectory of the version you are interested in:

/RUBiS/VersionName/tomcat_start.shstart Tomcat to be used with the EJB version of RUBiS. You may have to alter this script to specify the node JOnAS is running on (see Tomcat configuration).
/RUBiS/VersionName/tomcat_stop.shstop Tomcat

Performance Tuning Notes

Here are some hints if you want to handle a high number of clients with RUBiS:

  • increase the number of threads in Tomcat server.xml configuration file. Here is an example:

<Connector className="org.apache.tomcat.service.PoolTcpConnector">
<Parameter name="handler" value="org.apache.tomcat.service.connector.Ajp12ConnectionHandler"/>
<Parameter name="port" value="8007"/>
<Parameter name="max_threads" value="1024"/>
<Parameter name="min_spare_threads" calue="5"/>
<Parameter name="max_spare_threads" calue="20"/>
</Connector>

  • increase the number of connections accepted by MySQL and also cache sizes when using BDB tables.

Example for MyIsam non-transactional tables: bin/safe_mysqld --user=mysql --set-variable max_connections=800 &
Example for BDB transactional tables: bin/safe_mysqld --user=mysql --set-variable max_connections=600 -O bdb_cache_size=256M -O bdb_log_buffer_size=1M -O key_buffer_size=256M -O bdb_max_lock=2000000 -O sort_buffer=32M &

  • check the size of the database connection pool of the EJB server in mysql.properties.

Copyright © 1999-2009, OW2 Consortium | contact | webmaster | Last modified at 2009-10-07 08:43 PM