vps-benchmark/sysbench.sh

31 lines
796 B
Bash
Raw Permalink Normal View History

2017-07-01 01:44:58 +02:00
#!/bin/bash
2018-01-24 11:59:18 +01:00
2020-11-03 14:10:30 +01:00
if [ ! -f /etc/apt/sources.list.d/akopytov_sysbench.list ]; then
echo "#################################"
echo "installing sysbench"
echo "#################################"
{
curl -sL https://packagecloud.io/install/repositories/akopytov/sysbench/script.deb.sh | bash
apt update && apt install -y sysbench
} >/dev/null 2>&1
2018-08-13 06:09:48 +02:00
fi
2020-11-03 14:10:30 +01:00
echo "" >sysbench.log
2018-08-15 13:53:06 +02:00
2020-11-03 14:10:30 +01:00
echo "#################################"
echo "CPU Benchmark"
2018-08-13 06:09:48 +02:00
echo "#################################"
echo ""
2020-11-03 15:10:28 +01:00
echo "starting Single thread CPU Benchmark"
2018-08-15 13:53:06 +02:00
2020-11-03 14:10:30 +01:00
sysbench cpu --cpu-max-prime=20000 run
2018-08-13 06:09:48 +02:00
2020-11-03 15:10:28 +01:00
echo "Single thread CPU Benchmark : [OK]"
2018-08-13 06:09:48 +02:00
echo ""
2020-11-03 15:10:28 +01:00
echo "starting Multi threads CPU Benchmark"
sysbench cpu --threads="$(nproc)" --cpu-max-prime=20000 run
2018-08-15 13:53:06 +02:00
2020-11-03 15:10:28 +01:00
echo "Multi threads CPU Benchmark : [OK]"