#!/bin/bash # # run Run script for selected benchmarks # # author: Joe Burnett # description: Run selected benchmarks after system startup. The benchmarking software was acquired and installed as follows: # -Sysbench https://github.com/akopytov/sysbench/archive/1.0.11.tar.gz # yum -y install make automake libtool pkgconfig libaio-devel mariadb-devel # -C-ray http://www.futuretech.blinkenlights.nl/depot/c-ray-1.1.tar.gz # Calculate number of CPU cores for benchmarks CORES=`/bin/lscpu | grep 'per socket' | awk '{print $4}'` CPUS=`/bin/lscpu | grep -e '^CPU(s):' | awk '{print $2}'` THREADS=`/bin/echo "$CORES * $CPUS" | /bin/bc -l` echo "*** This machine has $CPUS CPU(s) and $CORES cores (benchmarks will utilize $THREADS threads)" # # C-Ray Raytracing Benchmark # cd /usr/benchmarks/c-ray-1.1 cat scene | ./c-ray-mt > benchmark.ppm 2>../c-ray.txt # # Sysbench Benchmark # cd /tmp # The Events Per Second measurement is taken as the key measurement for Sysbench CPU /usr/local/bin/sysbench --threads=$THREADS cpu run 1>/usr/benchmarks/sysbench_cpu.txt # The Total Number of Events measurement is taken as the key measurement for Sysbench Memory /usr/local/bin/sysbench --threads=$THREADS memory run 1>/usr/benchmarks/sysbench_memory.txt # The Total Number of Events measurement is taken as the key measurement for Sysbench Mutex /usr/local/bin/sysbench --threads=$THREADS mutex run 1>/usr/benchmarks/sysbench_mutex.txt # The Total Number of Events measurement is taken as the key measurement for Sysbench Threads /usr/local/bin/sysbench --threads=$THREADS threads run 1>/usr/benchmarks/sysbench_threads.txt /usr/local/bin/sysbench --threads=$THREADS --file-test-mode=seqrewr fileio prepare # The read, MiB/s measurement is taken as the key measurement for Sysbench FileIO Read /usr/local/bin/sysbench --threads=$THREADS --file-test-mode=seqrd fileio run 1>/usr/benchmarks/sysbench_fileio_rd.txt # The written, MiB/s measurement is taken as the key measurement for Sysbench FileIO Write /usr/local/bin/sysbench --threads=$THREADS --file-test-mode=seqwr fileio run 1>/usr/benchmarks/sysbench_fileio_wr.txt