Skip to content

Commit

Permalink
Prepare Benchmarks for Perf Testing (#1351)
Browse files Browse the repository at this point in the history
• Changed wget to curl to fetch benchmark binaries for Dacapo & Renaissance
		○ Curl is preferred over wget to reduce machine tool dependencies
	• Added maxparallel attribute to chmod command in Liberty build file to avoid "argument list too long" error on Mac
	• Removed the hard-coded location for bash to avoid failures on Windows
		○ Location of bash executable could be different and it doesn't have be under `/bin`. Bash is just expected to be on the $PATH.
	• Removed x86 Linux specific affinity command to allow Liberty to run on different platforms
		○ Avoid exiting the benchmark run if affinity isn't set for now
	• Removed the path before `uname` in Liberty since its location could vary from platform to platform

Closes #1207
Related Issue: #1127

Signed-off-by: Piyush Gupta <piyush286@gmail.com>
  • Loading branch information
piyush286 authored and Shelley Lambert committed Sep 20, 2019
1 parent 70dfb37 commit 440f91b
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 14 deletions.
9 changes: 5 additions & 4 deletions perf/dacapo/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,13 @@
</target>

<target name="getDacapoSuite" depends="init">
<echo message="wget -q https://sourceforge.net/projects/dacapobench/files/latest/download" />
<exec executable="wget" failonerror="true">
<arg line="-q -O dacapo.jar https://sourceforge.net/projects/dacapobench/files/latest/download" />
<var name="curl_options" value="-Lks https://sourceforge.net/projects/dacapobench/files/latest/download -o dacapo.jar"/>
<echo message="curl ${curl_options}" />
<exec executable="curl" failonerror="true">
<arg line="${curl_options}" />
</exec>
</target>

<target name="dist" depends="getDacapoSuite" description="generate the distribution">
<copy todir="${DEST}">
<fileset dir="${src}"/>
Expand Down
4 changes: 2 additions & 2 deletions perf/liberty/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@
<copy todir="${DEST}">
<fileset dir="${src}"/>
</copy>
<chmod file="${DEST}/**" perm="a+x"/>
<chmod file="${DEST}/**" perm="a+x" maxparallel="10"/>
</target>
<target name="configure" depends="dist" description="configure Liberty">
<if>
Expand All @@ -121,7 +121,7 @@
</then>
<else>
<echo message="${DEST}/libertyBinaries/${BM_VERSION}/usr/shared/resources/data/tradedb7/service.properties doesn't exist. Configuring database." />
<exec executable="/bin/bash">
<exec executable="bash">
<env key="DB_SETUP" value="1"/>
<arg value="${DEST}/configs/benchmark.sh"/>
<arg value="${DEST}"/>
Expand Down
2 changes: 1 addition & 1 deletion perf/liberty/configs/benchmark.sh
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,6 @@ export APP_VERSION="daytrader-ee7"
export WLP_SKIP_MAXPERMSIZE="1"

#TODO: Need to soft-code these configs. Need to add various affinity tools in the perf pre-reqs ()
export AFFINITY="numactl --physcpubind=0-3 --membind=0"
export AFFINITY=""

bash ${1}/scripts/bin/sufp_benchmark.sh
6 changes: 3 additions & 3 deletions perf/liberty/scripts/bin/common_utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ setMachinePlatform()
.--------------------------
| Setting Machine Platform
"
export PLATFORM=`/bin/uname | cut -f1 -d_`
export PLATFORM=`uname | cut -f1 -d_`
echo "Platform identified as: ${PLATFORM}"
}

Expand Down Expand Up @@ -112,9 +112,9 @@ checkAndSetCommonEnvVars()
echo "AFFINITY not set. On Sun/HP so is ok"
;;
*)
echo "AFFINITY not set"
echo "!!! WARNING !!! AFFINITY not set"
usage
exit
#exit
;;
esac
fi
Expand Down
9 changes: 5 additions & 4 deletions perf/renaissance/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,12 @@
</target>

<target name="getRenaissanceSuite" depends="init">
<echo message="wget -q https://github.com/renaissance-benchmarks/renaissance/releases/download/v0.9.0/renaissance-mit-0.9.0.jar" />
<exec executable="wget" failonerror="true">
<arg line="-q -O renaissance-mit.jar https://github.com/renaissance-benchmarks/renaissance/releases/download/v0.9.0/renaissance-mit-0.9.0.jar" />
<var name="curl_options" value="-Lks https://github.com/renaissance-benchmarks/renaissance/releases/download/v0.9.0/renaissance-mit-0.9.0.jar -o renaissance-mit.jar"/>
<echo message="curl ${curl_options}" />
<exec executable="curl" failonerror="true">
<arg line="${curl_options}" />
</exec>
</target>
</target>

<target name="dist" depends="getRenaissanceSuite" description="generate the distribution">
<copy todir="${DEST}">
Expand Down

0 comments on commit 440f91b

Please sign in to comment.