Skip to content

Commit

Permalink
Merge "Created new single vm workload sample script using linpack"
Browse files Browse the repository at this point in the history
  • Loading branch information
Jenkins authored and openstack-gerrit committed Jan 16, 2015
2 parents abd734a + 8794b4b commit ebec66f
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
11 changes: 11 additions & 0 deletions doc/samples/tasks/support/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
instance_linpack.sh
=============
instance_linpack.sh, will kick off a CPU intensive workload within a OpenStack instance.
This script will return the avg gflops and max gflops Linpack reports in a JSON format.
To run this workload, the VM must have linpack installed prior to running.

instance_dd_test.sh
=============
instance_dd_test.sh, will kick off a IO intesnive workload within a OpenStack instance.
This script will return the write and read performance dd was able to achieve in a
JSON format.
25 changes: 25 additions & 0 deletions doc/samples/tasks/support/instance_linpack.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/bin/sh
# Location of Linpack binary
LINPACK='/opt/linpack/xlinpack_xeon64'
type -P $LINPACK &>/dev/null && continue || { echo "Linpack Not Found"; exit 1 }

# Location to create linpack dat file
LINPACK_DAT='~/linpack.dat'

NUM_CPU=`cat /proc/cpuinfo | grep processor | wc -l`
export OMP_NUM_THREADS=$NUM_CPU
echo "Sample Intel(R) LINPACK data file (from lininput_xeon64)" > ${LINPACK_DAT}
echo "Intel(R) LINPACK data" >> ${LINPACK_DAT}
echo "1 # number of tests" >> ${LINPACK_DAT}
echo "10514 # problem sizes" >> ${LINPACK_DAT}
echo "20016 # leading dimensions" >> ${LINPACK_DAT}
echo "2 # times to run a test " >> ${LINPACK_DAT}
echo "4 # alignment values (in KBytes)" >> ${LINPACK_DAT}
OUTPUT=$(${LINPACK} < ${LINPACK_DAT} | grep -A 1 Average | grep 20016)
AVERAGE=$(echo $OUTPUT | awk '{print $4}')
MAX=$(echo $OUTPUT | awk '{print $5}')

echo "{
\"average_gflops\": $AVERAGE,
\"max_gflops\": $MAX
}"

0 comments on commit ebec66f

Please sign in to comment.