...
top Anchor
Warning |
---|
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.1, but the updating process is not yet complete. |
Running SPECjAppServer2004 benchmark on Geronimo
...
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.1. 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, v2.0.2.
The described configuration uses as many Geronimo components as possible, including the built-in Derby database and the built-in Jetty or Tomcat servlet container. In fact, the configuration only uses Java, Geronimo, an external servlet container (e. g. Tomcat) and SPECjAppServer2004. To plug external components (most probably, a database), you have to change your configuration accordingly.
...
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/GMOxDOC21/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.1 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 proxy options to the Geronimo startup line:
-Dhttp.proxyHost=
...
PROXY_HOST -Dhttp.proxyPort
...
=PROXY_PORT -Dhttp.nonProxyHosts="127.0.0.1|localhost|geronimo.host|emulator.host"
This problem is caused by OPENEJB-700 bug which is already fixed and the fix should make it to
...
Geronimo v2.1.1.
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:noformat
If you get a different 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.
...
Use forward slashes ( / ) as directory separators!
...
Edit the <SPEC>/config/run.properties
file. Note that it will be used on the driver.host
and make sure the following variables have correct values:
researchMode = true # Turns EAStress mode on
Url = http:/
/geronimo.host:8080/SPECjAppServer/app?
outDir = <OUTPUT>
dumpDir = <DUMP>
...
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.
...
ant/bin/ant -Dappserver=geronimo loaddb
...
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 ...
...
java -jar bin/deployer.jar -u system -p manager login
...
java -jar bin/deployer.jar deploy repository/org/tranql/tranql-connector-derby-embed-xa/1.3/tranql-connector-derby-embed-xa-1.3.rar <KIT>/sjas-db.xml
...
java -jar bin/deployer.jar deploy repository/org/apache/geronimo/modules/geronimo-activemq-ra/2.1/geronimo-activemq-ra-2.1.rar <KIT>/sjas-jms.xml
...
java -jar bin/deployer.jar deploy <SPEC>/jars/SPECjAppServer.ear <KIT>/sjas-app.xml
...
At this stage you may check that the deployment has been done correctly and that SPECjAppServer2004 is operational.
Manual transactions
Delivery servlet
Go to the page Open the deployed SPECjAppServer2004 page: http://geronimo.host:8080/SPECjAppServer/
In the left-hand menu, click the Go Trade Autos! or Go Build Cars! link.
Log in with the default credentials (1
) by clicking Log in.
You should see the program interface and be able to perform transactions.
Atomicity tests
Supplier/
. It should load normally and contain a single directory, dtd
, with two files inside, delivery.dtd
and po.dtd
.
Go to the page Open the deployed SPECjAppServer2004 page: http://geronimo.host:8080/SPECjAppServer/
In the left-hand menu, click the Atomicity Tests link.
You will see the results of three atomicity tests' runs. If all three of them are marked as PASSED, your deployment is correct.
Deploying the Supplier Emulator
To deploy the SPECjAppServer2004 Supplier Emulator at the emulator.host
, use one of the following:
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
.
Info |
---|
Note that SPECjAppServer2004 documentation requires that the Supplier Emulator servlet container should have the |
Supplier/DeliveryServlet
. You should see a page with text like this:
...
Servlet seems to work OK
Number of Transactions : 0
Servlet invoked without command specified
...
Manual transactions
Open the deployed SPECjAppServer2004 page: http://geronimo.host:8080/SPECjAppServer/
In the left-hand menu, click the Go Trade Autos! or Go Build Cars! link.
Log in with the default credentials (1
) by clicking Log in.
You should see the program interface and be able to perform transactions.
Atomicity tests
Open the deployed SPECjAppServer2004 page: http://geronimo.host:8080/SPECjAppServer/
In the left-hand menu, click the Atomicity Tests link.
You will see the results of three atomicity tests' runs. If all three of them are marked as PASSED, your deployment is correct.
Deploying the Supplier Emulator
To deploy the SPECjAppServer2004 Supplier Emulator at the emulator.host
, use one of the following:
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 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.
...
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.
...
...
borderStyle | solid |
---|
...
bin/catalina run
...
Emulator Servlet seems to work OK
JAS_HOST : geronimo.host
JAS_PORT : 8080
Servlet URL : Supplier/DeliveryServlet
Number of Transactions : 0
Servlet invoked without command specified
...
bin/setenv.bat
...
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.
...
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 like these may appear in the Driver windowoutput and Geronimo shell:
No Format
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
...
used in Geronimo v2.1 does not provide the necessary transaction isolation level. Hopefully, this problem will be fixed in
...
future versions.
After the run has completed successfuly, you will see the output like this:
No Format
The number of JOPS HASOPM is a final EAStress benchmark metric.
...
You would get a JOPS result instead if you attempt a full SPECjAppServer2004 run.
...
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
...