Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial support for the SPECjbb perf testing benchmark #4363

Merged
merged 29 commits into from
Mar 7, 2023
Merged
Show file tree
Hide file tree
Changes from 17 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
91033f5
initial commit
ahmedmuhsin Dec 2, 2022
9edb5b6
complete build config for specjbb
ahmedmuhsin Dec 2, 2022
f260e08
add run scripts
ahmedmuhsin Dec 13, 2022
70e3c94
move build script and update locations in build file
ahmedmuhsin Dec 13, 2022
b18ffb3
add playlist file for specjbb
ahmedmuhsin Dec 13, 2022
69fb268
remove comment
ahmedmuhsin Dec 13, 2022
9e8cef2
remove quotes from JAVA env var
ahmedmuhsin Dec 13, 2022
90dd9fa
move test env make file into run dir
ahmedmuhsin Jan 23, 2023
22205ea
update perf readme to include specjbb
ahmedmuhsin Jan 25, 2023
33ab2aa
add a readme for the specjbb benchmark
ahmedmuhsin Jan 26, 2023
611148e
fix formatting for xml files
ahmedmuhsin Feb 1, 2023
4a1324d
clean up shell script comments
ahmedmuhsin Feb 1, 2023
8059554
remove unnessasary step of checking current dst since the build dir i…
ahmedmuhsin Feb 1, 2023
a8666db
change rsync command to cp since we always start with a clean build dir
ahmedmuhsin Feb 1, 2023
46dce79
change SPEC_OPTS to SPECJBB_OPTS
ahmedmuhsin Feb 1, 2023
eb61386
reword comments to match the action that they are describing
ahmedmuhsin Feb 1, 2023
44cd1df
add comments to describe shell scripts
ahmedmuhsin Feb 1, 2023
a5b33ef
update SpecJBB job from initial TRSS testing (#5)
gdams Mar 2, 2023
41d868f
elaborate on the reasoning for the jvm options that were used
ahmedmuhsin Mar 2, 2023
9e4ed3f
Update perf/specjbb/README.md
karianna Mar 2, 2023
14e7a27
Update perf/specjbb/README.md
karianna Mar 2, 2023
5e28714
Update perf/specjbb/README.md
karianna Mar 2, 2023
090be8a
Update perf/specjbb/run/run_multi.sh
karianna Mar 2, 2023
55f5568
Update perf/specjbb/run/run_multi.sh
karianna Mar 4, 2023
a81df48
update perf/specjbb/README.md
ahmedmuhsin Mar 6, 2023
7d7d63e
add test to the dev level so it will never get included as a necessar…
ahmedmuhsin Mar 6, 2023
d06909c
update perf/specjbb/README.md
ahmedmuhsin Mar 6, 2023
1c35d71
specify microsoft as the vendor that this test should run for
ahmedmuhsin Mar 6, 2023
02ddaca
fix playlist.xml formatting
ahmedmuhsin Mar 6, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions perf/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,7 @@ Liberty benchmarks from https://github.com/OpenLiberty - including liberty-dt7-s
#### renaissance
Renaissance benchmarks from https://github.com/renaissance-benchmarks/renaissance - including renaissance-akka-uct, renaissance-als, renaissance-chi-square, renaissance-db-shootout, renaissance-dec-tree, renaissance-finagle-chirper, renaissance-finagle-http, renaissance-fj-kmeans, renaissance-future-genetic, renaissance-gauss-mix, renaissance-log-regression, renaissance-mnemonics, renaissance-movie-lens, renaissance-naive-bayes, renaissance-par-mnemonics, renaissance-philosophers and renaissance-scala-kmeans

#### specjbb [licence required]
SPECjbb 2015 benchmark from https://www.spec.org/jbb2015/

Additional benchmarks are being reviewed for addition and if you wish to include more, please comment in the open performance benchmarks [issue 1112](https://github.com/adoptium/aqa-tests/issues/1112).
34 changes: 34 additions & 0 deletions perf/specjbb/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<!--
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
[1]https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
-->


## SPECjbb 2015

SPECjbb is a Java Client/Server performance testing benchmark.
Please visit its product page for more information, including a user guide: https://www.spec.org/jbb2015/


karianna marked this conversation as resolved.
Show resolved Hide resolved
## Prerequisites
Since SPECjbb requires a license to run, this aqa-test config requires that a licensed copy of the benchmark already exists on the machine that you are running on.

## Setup

Set the `SPECJBB_SRC` environment variable to the absolute path of your SPECjbb benchmark directory
karianna marked this conversation as resolved.
Show resolved Hide resolved
```
karianna marked this conversation as resolved.
Show resolved Hide resolved
export SPECJBB_SRC=/Users/aqa-tester/SPECjbb2015-1.03
```

## Run

The configuration currently includes one group, `extended`, and that group contains one test, `specjbb-multijvm-simple`. You can use the following commands to run it:
```
make _testList TESTLIST=specjbb-multijvm-simple
```
66 changes: 66 additions & 0 deletions perf/specjbb/build.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
<?xml version="1.0"?>

<!--
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
-->

<project name="Specjbb suite" default="build" basedir=".">
<taskdef resource="net/sf/antcontrib/antlib.xml" />
<description>Specjbb suite</description>

<!-- set global properties for this build -->
<property name="DEST" value="${BUILD_ROOT}/perf/specjbb" />
<property name="SRC" location="." />

<target name="init">
<mkdir dir="${DEST}" />
</target>

<target name="getSpecjbbSuite" depends="init">

<property environment="env"/>
<property name="SPECJBB_DEST" value="${DEST}/suite" />
<property name="SPECJBB_SRC" value="${env.SPECJBB_SRC}" />
<property name="JAVA_BIN" value="${env.TEST_JDK_HOME}/bin/java"/>
<property name="SPECJBB_JAR" value="specjbb2015.jar"/>
<property name="SCRIPT_LOG" value="${DEST}/getSpecjbbSuite.log"/>
<property name="SCRIPT_SUCCESS" value="0"/>

<exec executable="bash" failifexecutionfails="true" output="${SCRIPT_LOG}" resultproperty="SCRIPT_RESULT">
<env key="SPECJBB_DEST" value="${SPECJBB_DEST}"/>
<env key="SPECJBB_SRC" value="${SPECJBB_SRC}"/>
<env key="JAVA_BIN" value="${JAVA_BIN}"/>
<env key="SPECJBB_JAR" value="${SPECJBB_JAR}"/>
<arg value="${SRC}/build/getSpecjbbSuite.sh"/>
</exec>

<fail message="Failed to get SPECjbb suite. See the following file for more info: ${SCRIPT_LOG}">
<condition>
<not>
<equals arg1="${SCRIPT_RESULT}" arg2="${SCRIPT_SUCCESS}"/>
</not>
</condition>
</fail>

</target>

<target name="dist" depends="getSpecjbbSuite" description="generate the distribution">
<copy todir="${DEST}/run">
<fileset dir="${SRC}/run"/>
</copy>
</target>

<target name="build">
<antcall target="dist" inheritall="true" />
</target>
</project>
77 changes: 77 additions & 0 deletions perf/specjbb/build/getSpecjbbSuite.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
#!/usr/bin/env bash
# Validate and copy the directory containing the SPECjbb jar file SPECJBB_SRC to the build directory SPECJBB_DEST

SUCCESS=0
ERROR=1

exists() {
local specjbb_dir=$1
return $(test -f "${specjbb_dir}/${SPECJBB_JAR}")
}

isRunnable() {
local specjbb_dir=$1
result=$(${JAVA_BIN} -jar ${specjbb_dir}/${SPECJBB_JAR} -v | grep -q "SPECjbb2015") > /dev/null 2>&1
return $result
}

dirIsValid(){
local specjbb_dir=$1

if exists $specjbb_dir; then
if isRunnable $specjbb_dir; then
return $SUCCESS
fi
fi

return $ERROR
}

dstIsValid(){
echo "##### Validating destination SPECjbb dir"
return $(dirIsValid $SPECJBB_DEST)
}

srcIsValid(){
echo "##### Validating source SPECjbb dir"
return $(dirIsValid $SPECJBB_SRC)
}

copySrcToDst(){
echo "##### Copying contents of source SPECjbb dir to destination SPECjbb dir"
cp -a $SPECJBB_SRC/. $SPECJBB_DEST
}

succeed(){
echo "##### SUCCESS"
exit $SUCCESS
}

fail(){
echo "##### FAIL"
exit $ERROR
}

main(){
if srcIsValid; then
copySrcToDst
if dstIsValid; then
succeed
fi
else
echo "##### Source suite is not valid"
fi

fail
}

printInput(){
echo "++ SPECJBB_SRC ${SPECJBB_SRC}"
echo "++ SPECJBB_DEST ${SPECJBB_DEST}"
echo "++ SPECJBB_JAR ${SPECJBB_JAR}"
echo "++ JAVA_BIN ${JAVA_BIN}"
}

printInput
main

27 changes: 27 additions & 0 deletions perf/specjbb/playlist.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?xml version='1.0' encoding='UTF-8'?>
<!--
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
-->
<playlist xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../TKG/playlist.xsd">
<include>run/testenv.mk</include>
<test>
<testCaseName>specjbb-multijvm-simple</testCaseName>
<command>source $(RUN_OPTIONS)/specjbb-multijvm-simple.sh; bash $(RUN_SCRIPTS)/run_multi.sh; $(TEST_STATUS)</command>
<levels>
<level>extended</level>
ahmedmuhsin marked this conversation as resolved.
Show resolved Hide resolved
</levels>
<groups>
<group>perf</group>
</groups>
ahmedmuhsin marked this conversation as resolved.
Show resolved Hide resolved
</test>
</playlist>
21 changes: 21 additions & 0 deletions perf/specjbb/run/options/specjbb-multijvm-simple.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/usr/bin/env bash
# This will configure a basic run of SPECjbb in multi-jvm mode
# Therefore, the topography of the run includes 1 group consisting of
# 1 TransactionInjector and 1 Backend

export GROUP_COUNT=1
karianna marked this conversation as resolved.
Show resolved Hide resolved
export TI_JVM_COUNT=1
export NUM_OF_RUNS=1

export SPECJBB_OPTS_C="-Dspecjbb.group.count=$GROUP_COUNT -Dspecjbb.txi.pergroup.count=$TI_JVM_COUNT"
export SPECJBB_OPTS_TI=""
export SPECJBB_OPTS_BE=""

export JAVA_OPTS_C="-Xms2g -Xmx2g -Xmn1536m -XX:+UseParallelGC -XX:ParallelGCThreads=2 -XX:CICompilerCount=4"
export JAVA_OPTS_TI="${JAVA_OPTS_C}"
export JAVA_OPTS_BE="-Xms4g -Xmx4g -Xmn3g -XX:+UseParallelGC -XX:ParallelGCThreads=4 -XX:-UseAdaptiveSizePolicy"

export MODE_ARGS_C=""
export MODE_ARGS_TI=""
export MODE_ARGS_BE=""

80 changes: 80 additions & 0 deletions perf/specjbb/run/run_multi.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
#!/bin/bash
karianna marked this conversation as resolved.
Show resolved Hide resolved


echo "Backend opts: $JAVA_OPTS_BE"
echo "Number of runs: ${NUM_OF_RUNS}"
echo "Results dir: ${RESULTS_DIR}"

for ((n=1; $n<=$NUM_OF_RUNS; n=$n+1)); do
gdams marked this conversation as resolved.
Show resolved Hide resolved

# Create result directory
temp="${RESULTS_DIR%\"}"
temp="${temp#\"}"
timestamp=$(date '+%y-%m-%d_%H%M%S')
result="${temp}/${timestamp}"
mkdir -pv $result


karianna marked this conversation as resolved.
Show resolved Hide resolved
# Copy current config to the result directory
cp -r $SPECJBB_CONFIG $result

cd $result

echo "Run $n: $timestamp"
echo "Launching SPECjbb2015 in MultiJVM mode..."
echo

JAVA="${JAVA%\"}"
JAVA="${JAVA#\"}"
echo "Start Controller JVM"
$JAVA $JAVA_OPTS_C $SPECJBB_OPTS_C -jar $SPECJBB_JAR -m MULTICONTROLLER $MODE_ARGS_C 2>controller.log > controller.out &

CTRL_PID=$!
echo "Controller PID = $CTRL_PID"

sleep 3

for ((gnum=1; $gnum<$GROUP_COUNT+1; gnum=$gnum+1)); do

GROUPID=Group$gnum
echo -e "\nStarting JVMs from $GROUPID:"

for ((jnum=1; $jnum<$TI_JVM_COUNT+1; jnum=$jnum+1)); do

JVMID=txiJVM$jnum
TI_NAME=$GROUPID.TxInjector.$JVMID

echo " Start $TI_NAME"
$JAVA $JAVA_OPTS_TI $SPECJBB_OPTS_TI -jar $SPECJBB_JAR -m TXINJECTOR -G=$GROUPID -J=$JVMID $MODE_ARGS_TI > $TI_NAME.log 2>&1 &
echo -e "\t$TI_NAME PID = $!"
sleep 1
done

JVMID=beJVM
BE_NAME=$GROUPID.Backend.$JVMID

# Add GC logging to the backend's JVM options
JAVA_OPTS_BE_WITH_GC_LOG="$JAVA_OPTS_BE -Xlog:gc*:file=${BE_NAME}_gc.log"
echo " Start $BE_NAME"
$JAVA $JAVA_OPTS_BE_WITH_GC_LOG $SPECJBB_OPTS_BE -jar $SPECJBB_JAR -m BACKEND -G=$GROUPID -J=$JVMID $MODE_ARGS_BE > $BE_NAME.log 2>&1 &
echo -e "\t$BE_NAME PID = $!"
sleep 1

done

echo
echo "SPECjbb2015 is running..."
echo "Please monitor $result/controller.out for progress"

wait $CTRL_PID
echo
echo "Controller has stopped"

echo "SPECjbb2015 has finished"
echo

cd $WORKING_DIR

done

exit 0
10 changes: 10 additions & 0 deletions perf/specjbb/run/testenv.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/usr/bin/env bash

SPECJBB_BUILD=$(JVM_TEST_ROOT)/perf/specjbb

export JAVA=$(JAVA_COMMAND)
export SPECJBB_JAR=$(SPECJBB_BUILD)/suite/specjbb2015.jar
export SPECJBB_CONFIG=$(SPECJBB_BUILD)/suite/config
export RUN_SCRIPTS=$(SPECJBB_BUILD)/run
export RUN_OPTIONS=$(SPECJBB_BUILD)/run/options
export RESULTS_DIR=$(REPORTDIR)