Simics Workloads

SPECjbb2000

Overview

SPECjbb2000 is SPEC's first benchmark for evaluating the performance of server-side Java. It can be purchased from http://www.spec.org. Although SPECjbb2000 has recently retired and was replaced by SPECjbb2005, it is still very popular and widely used.

Signaling transaction end

We are using a magic instruction to signal to Simics the end of every transaction. To facilitate this, we are using the Java JNI to add a call to the magic instruction from within the benchmark. The only change is in the file src/spec/jbb/TransactionManager.java, which you can find under file/magic. Hence, we have to compile the benchmark and rebuild jar.jbb. (This is done by the as part of the run on the simulated machine). To change the magic call, all you have to do is modify the file/magic/MagicInsImp.c file. The script will (hopefully) take care of all the rest for you (compiling the C file, building jbb.jar, etc.)

Prerequisites

  1. A SPARC Solaris disk image for Simics. (with java and gcc. Please refer to the main simics workload page for details).
  2. Specjbb200 benchmark.

Setup

  1. Download and unpack the specjbb kit (specjbb_kit.tar.gz) into your chosen directory. For the following instructions, it is assumed that the kit is unpacked into a library called specjbb.
    tar -zxvf specjbb_kit.tar.gz specjbb/
  2. Create proper links to SPECjbb2000 benchmarks and to Gems' gen_script directory from within the new kit directory (i.e., from within specjbb). We actually only need the mfacet.py script from Gems, so you can simply copy only that library (no need for the entire Gems package).
    ln -s <path to your SPECjbb directory> SPECjbb2000    
    ln -s <path to your GEMS directory/gen-scripts> gen-scripts
    Now inside specjbb directory we have a link named SPECjbb2000/ that points to the java benchmark, and a link named gen-scripts/ that points to Gems' gen-scripts directory.
  3. Copy your preferable SPECjbb parameters file into the specjbb/files directory and name it sim_SPECjbb.props. This file is used to control the way specjbb runs. As en example, a simple parameter file is provided. Notice that the "input.ramp_up_seconds" parameter is set to 1. This is done to accelerate the ramp-up phase. (Choosing 30 as specorg suggests will cause the simulation ro run forever).
    cp <your SPECjbb.props file> specjbb/files/sim_SPECjbb.props
  4. In the directory on the host machine where simics is going to be run from, create a link name specjbb_kit that points to our java kit directory. For example, if simics resides under /home/users/zguz/simics-2.0.25/sarek and the java kit resides under specjbb do:
    cd /home/users/zguz/simics-2.0.25/sarek; 
    ln -s specjbb/ specjbb_kit

Customize build_jbb.simics script

Several parameters within this specjbb/build_jbb.simics script should be configured:

  1. target_directory - the target directory on the disk image in which specjbb will be installed. This is the directory on the simulated machine, not to be confused with the directory on the host machine. For example, to install specjbb in /space/ use:
    @target_directory = "/space/"
  2. warmup_transactions - set this number to the number of transactions you want to run before creating the checkpoint.
    @warmup_transaction = 100
  3. specjbb_run_command - set this string to the command you want to use to run the specjbb (including your appropriate flags. Notice that the call to sim_SPECjbb.props is added by the script and hence should be omitted here.
    @specjbb_run_command = "java -ms256m -mx256m spec.jbb.JBBmain"

Running simics

  1. Run Simics with your Solaris disk image and call build_jbb.simics. When simulation is over the new checkpoint will reside under specjbb/checkpoint/jbb_checkpoint.simics. Runtime may vary according the specific host and the number of transactions you simulate before creating the checkpoint. On our system it takes about 20 minutes to get the checkpoint when setting warmup_transaction to 100.
    cd /home/users/zguz/simics-2.0.25/sarek; 
    simics -fast -c checkpoint/my_image.simics -x specjbb_kit/build_jbb.simics

Questions?

If you find bugs/inconsistencies within the code or the wiki, and with questions, please contact Zvika Guz (zguz@tx.technion.ac.il).