...
toptop Anchor
...
This article is a copy of the version for SPECjAppServer2004 v1.05 and Geronimo v1.2. It's now being updated for SPECjAppServer2004 v1.08 and Geronimo v2.0.2, but the updating process is not yet complete.
...
Running SPECjAppServer2004 benchmark on Geronimo
...
This article shows how to measure the performance of the Geronimo application server using the industry standard SPECjAppServer2004 benchmark.
...
...
Issues still exist that prevent SPECjAppServer2004 from running on Geronimo.
This article is not a success story, but a collection of notes on the progress that has been made in this direction.
Current issue that requires your help is: #Running the benchmark
...
Disclaimer: This article is created to write down the existing experience and to make it reproducible. It is not targeted to be a comprehensive guide on either product or on merging them together. It's not also a replacement to the products' documentation, but just a step-by-step guide on how to make things work in a simple configuration, as it worked for me. Make sure you at least look through the documentation on both products before you proceed.
...
...
SPECjAppServer is a trademark of the Standard Performance Evaluation Corp. (SPEC). The official web site for SPECjAppServer2004 is located at http://www.spec.org/jAppServer2004/.
SPECjAppServer2004 version 1.08 introduces a reduced workload called EAStress2004 that relaxes run and reporting rules, enabling informal results to be shared more easily in open-source research and development projects.
The EAStress2004 workload in SPECjAppServer2004 v1.08 can be used as a tool to optimize performance of products under development and to share results in public forums. Unlike SPECjAppServer2004 results, testing results from the EAStress2004 workload do not need to be reviewed by SPEC prior to being made public.
Results from the EAStress2004 workload cannot be used for marketing purposes, and comparisons to other SPECjAppServer2004 results are not permitted.
See full press release on SPECjAppServer2004/EAStress2004 v1.08 here: http://www.spec.org/jAppServer2004/jAppServer2004v108.html.
All logs, stacks and result files in this article are extracted from EAStress2004 v1.08 runs.
...
This article is written for SPECjAppServer2004 v1.08 and Geronimo v2.0.2. For other versions some stages may be different. Older versions of this article for SPECjAppServer2004 v1.05 and older versions of Geronimo can be found here: v1.0, v1.1, v1.2.
...
The geronimo.host
and the driver.host
may be the same machine, but you have to adjust the Geronimo configuration, as both Geronimo and the SPECjAppServer2004 Driver create RMI Registry on the default port (1099) and would conflict on that.
...
...
Sharing geronimo.host
with emulator.host
or driver.host
is contradicting with the SPECjAppServer2004 documentation and would impact the performance severely and invalidate the benchmark results. However technically this is possible.
...
Directories
This section lists important directories that are further addressed in this article. They can be chosen arbitrary, but should not overlap.
...
<DUMP>
– directory at thedriver.host
where the SPECjAppServer2004 Driver will store its temporal files.Note
On Windows some components may work incorrectly if working paths are too long or contain spaces. So it's recommended that you avoid long paths and spaces in them.
Installing products
...
Installing SPECjAppServer2004
Run:
...
...
java -jar SPECjAppServer2004-Kit-v1.08.jar
...
Click Next, read and accept the license agreement, and type in the directory you want the SPECjAppServer2004 to be installed to. This directory will be your <SPEC>
directory.
...
Go to your <GERONIMO>
directory.
Start Geronimo by typing:
...
...
java -Djava.endorsed.dirs=lib/endorsed -javaagent:bin/jpa.jar -Dopenejb.jndiname.failoncollision=true -Dopenejb.jndiname.format={ejbName} -jar bin/server.jar
...
Please note the two OpenEJB settings, they're necessary to tune Geronimo to the simple format of EJB JNDI names SPECjAppServer2004 uses.
See details at http://cwiki.apache.org/GMOxDEV/client-jndi-names.html and http://cwiki.apache.org/OPENEJB/service-locator.html.
...
You may also use <GERONIMO>/bin/geronimo.sh
or <GERONIMO>/bin/geronimo.bat
scripts instead, after appropriate adjustments.
...
...
Geronimo v2.0.2 needs access to Internet for SPECjAppServer2004 application to be deployed – it tries to fetch XML schemas from http://java.sun.com site.
So if you're behind a firewall, add the appropriate -Dhttp.proxyHost=
and -Dhttp.proxyPort=
options to the Geronimo startup line.
This problem is caused by OPENEJB-700 bug which is already fixed and the fix should make it to the next version of Geronimo.
If your installation of Geronimo has no access to Internet at all, or your proxy requires authentication, you may use the following workarounds (thanks to Konstantin Malynkin for describing them). You may download the necessary DTDs to your local drive and specify the local path to them in your deployment descriptors (see <SPEC>/src/deploy/geronimo
directory). For example, you could use <!DOCTYPE ejb-jar SYSTEM "C:/DTD/ejb-jar_2_0.dtd">
instead of <!DOCTYPE ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN' 'http://java.sun.com/dtd/ejb-jar_2_0.dtd'>
. Another way is to omit verification at all by deleting or commenting out the references to DTDs in the deployment descriptors. Note that in both cases you would have to rebuild and redeploy the SPECjAppServer2004 application for the changes to take effect.
...
It will take some time to start. After that, you will see: bgColor No Format
black
If you get another result, particularly, if network errors show up, then something has gone wrong.
...
...
Sometimes, the startup fails because some local network addresses are inaccessible. This could happen, for example, if you have used a VPN interface that is disconnected now. By default, Geronimo uses the first local address it comes across to access its components, and may try to use a stale address, causing startup errors.
You may try disabling and then re-enabling the unused network interfaces to resolve such issues.
...
Accessing the console
Open your web browser and connect to the Geronimo Console at http://geronimo.host:8080/console/
...
Edit the deployment plans in <SPEC>/src/geronimo
, remove all message-driven-destination
tags from mfg.xml
, orders.xml
and supplier.xml
– Geronimo v2.0.2 doesn't handle those tags correctly.
Instead of removing those tags, you also can replace them with <message-destination-type>javax.jms.Queue</message-destination-type>
.
This problem is caused by OPENEJB-701 bug and should disappear after that bug is fixed.
...
JAS_HOME=<SPEC>
JAVA_HOME=<JAVA_HOME>
J2EE_HOME=<GERONIMO>
JAS_HOST=geronimo.host
EMULATOR_HOST=emulator.host
...
...
Use forward slashes ( / ) as directory separators!
...
You may leave the other variables intact.
...
Clean-up your installation:
...
...
ant/bin/ant clean
...
Build the application and configure it for Geronimo:
...
...
ant/bin/ant -Dappserver=geronimo
...
You will get the BUILD SUCCESSFUL diagnostic.
...
Go to the <SPEC>/config
directory. Replace the content of each of the *db.properties
files you find there with the contents of the attached db.properties template file. Make sure the pipeDir
variable there points to a valid temporary directory, adjust if necessary.
Loading the tables
Run:
...
...
ant/bin/ant -Dappserver=geronimo loaddb
...
After some time, you will get the BUILD SUCCESSFUL diagnostic.
...
Note that if your geronimo.host
and your driver.host
are the same machine, and you changed the port number of the Geronimo RMI Registry, you should specify that port number in all deployer commands, like this:
...
...
java -jar bin/deployer.jar -port 1199 ...
...
To avoid specifying login credentials on any call to deployer, you can login first:
...
...
java -jar bin/deployer.jar -u system -p manager login
...
Deploying database connector
To deploy a connector to the Derby SPECDB database you created earlier, go to the <GERONIMO>
directory and run:
...
...
java -jar bin/deployer.jar deploy repository/org/tranql/tranql-connector-derby-embed-xa/1.4/tranql-connector-derby-embed-xa-1.4.rar <KIT>/sjas-db.xml
...
You will get the SPECjAppServer2004/DB/1.08/rar diagnostic.
...
To deploy an ActiveMQ JMS connector for SPECjAppServer2004, go to the <GERONIMO>
directory and run:
...
...
java -jar bin/deployer.jar deploy repository/org/apache/geronimo/modules/geronimo-activemq-ra/2.0.2/geronimo-activemq-ra-2.0.2.rar <KIT>/sjas-jms.xml
...
You will get the SPECjAppServer2004/JMS/1.08/rar diagnostic.
...
Go to the <GERONIMO>
directory and run:
...
...
java -jar bin/deployer.jar deploy <SPEC>/jars/SPECjAppServer.ear <KIT>/sjas-app.xml
...
You will get the SPECjAppServer2004/Application/1.08/ear diagnostic.
...
The Geronimo built-in servlet container (in case the emulator.host
and the geronimo.host
are the same machine); or a stand-alone servlet container on the emulator.host
.
...
...
Note that SPECjAppServer2004 documentation requires that the Supplier Emulator servlet container should have the keep-alive
option turned off. You can ignore this requirement, but that would impact the performance severely.
...
Using the Geronimo servlet container
Go to the <GERONIMO>
directory and run:
...
...
java -jar bin/deployer.jar deploy <SPEC>/jars/Emulator.war <KIT>/sjas-emulator.xml
...
You will get the SPECjAppServer2004/Emulator/1.08/war @ /Emulator diagnostic.
...
Install Tomcat to your <TOMCAT>
directory on the emulator.host
.
...
...
Do not bother editing <SPEC>/config/tomcat.env
file or running ant/bin/ant -f tomcat.xml
.
Both files are obsolete, they generate the Emulator.war
file, which has already been created at #Building the application phase.
...
Copy the <SPEC>/jars/Emulator.war
file to the <TOMCAT>/webapps
directory and remove the <TOMCAT>/webapps/Emulator
directory if it exists.
Go to the <TOMCAT>
directory on the emulator.host
and start Tomcat:
...
...
bin/catalina run
...
Veryfying the deployment
Go to the page http://emulator.host:8080/Emulator/
. It should load normally and contain a single directory, dtd
, with two files inside, delivery.dtd
and po.dtd
.
Go to the page http://emulator.host:8080/Emulator/EmulatorServlet
. You should see a page with text like this:
...
...
Emulator Servlet seems to work OK
JAS_HOST : emulator.host
JAS_PORT : 8080
Servlet URL : Supplier/DeliveryServlet
Number of Transactions : 0
Servlet invoked without command specified
...
Running the benchmark
...
Go to the <DRIVER>
directory on the driver.host
and run:
...
...
bin/setenv.bat
...
This configures the environment to run the Driver.
To start the Driver itself, run:
...
...
bin/driver.bat
...
If you wish to run a distributed load with multiple Drivers, then after the Driver is started on the first host (the master.host
), start the Driver on other driver hosts like this:
...
...
bin/driver.bat master.host
...
After starting the Driver, you should see the output like this:noformat
This means the Driver started normally.
Note the times for Rampup, SteadyState, Rampdown and Finish to figure out the time needed for the benchmark to complete.
...
...
You can interrupt the run at any time with Ctrl-C
.
...
Sometimes binding exceptions or other problems may occur at the Driver startup. In such a case, interrupt the test run with Ctrl-C
and rerun it again. Sometimes it helps.
...
...
It's recommended to reload the database tables before each run, particularly if previous run was not finished correctly. Otherwise, errors like this may occur:
...
black
...
solid
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
During the run, the following diagnostics may appear in the Driver window:
blacksolid No Format
bgColor | black |
---|---|
borderStyle | solid |
and in the same time, various TransactionRolledback
and other exceptions of the same kind are being printed in the Geronimo shell.
...
...
These diagnostics are probably caused by the fact that TranQL version 1.3 is used in Geronimo v2.0.2 does not provide the necessary transaction isolation level. Hopefully, this problem will be fixed in TranQL version 1.3.1.
...
After the run has completed successfuly, you will see the output like this: bgColor No Format
black
The number of JOPS is a final benchmark metric.
...
...
For now these values for Geronimo are terribly low, and don't depend on the hardware being used. Probably this is due to some configuration issues that still exist or due to the TranQL issue mentioned above.
...
Processing results
...
Run the following command to generate an HTML benchmark report, it would be named Your_Submission.report.html
:
...
...
java -cp reporter.jar reporter Your_Submission.txt
...
Run the following command to generate a text-only benchmark report, it would be named Your_Submission.report.txt
:
...
...
java -cp reporter.jar reporter -a Your_Submission.txt
...
For the details on how yo submit your results, see SPECjAppServer2004 User's Guide :: Section 5.3 – Submitting the Results
...