How to check your Linux server CPU benchmark

A Benchmark is use to find the CPU, memory, I/O and Database  performance testing.  Most of the time Benchmark is use to measure the system’s performance. A Benchmark is also find the  problem with your system.

though, and improve weak points for a smoother and more efficient experience and also help to possible software issues and problematic upgrades with regressions

How to install 

Ubuntu/Debian

$ sudo apt install sysbench

Fedora

# dnf install sysbench

OpenSUSE

# zypper in sysbench

Centos 7 

# yum install epel-release -y
# yum install sysbench -y

 

How to check in Linux 

CPU

# sysbench --test=cpu run

Memory

$ sysbench --test=memory run

I/O

$ sysbench --test=fileio --file-test-mode=seqwr run

Mysql

$ sysbench --test=oltp –oltp-table-size=50000 --mysql-db=test --mysql-user=root --mysql-password=passwd prepare
or 
$ 
$ sysbench --test=oltp --oltp-table-size=500000 --mysql-db=test --mysql-user=root --mysql-password=yourrootsqlpassword --max-time=60 --oltp-read-only=on --max-requests=0 --num-threads=8 run

Bash file

#!/bin/bash
printf "\n"
echo "CPU"
sysbench cpu --cpu-max-prime=20000 --threads=4 --time=60 run | grep "events per second:" | awk '{print "Events per second: "$4}'
printf "\n"
echo "MEMORY"
sysbench memory --memory-oper=write --memory-block-size=1K --memory-scope=global --memory-total-size=100G --threads=4 --time=30 run | grep -o "[0-9]*\.[0-9]* MiB/sec" | awk '{print "Throughput: " $0}'
printf "\n"
echo "FILEIO"
sysbench fileio --file-total-size=15G prepare > /dev/null 2>&1
sysbench fileio --file-test-mode=rndrd --file-total-size=10G --file-block-size=4K --threads=4 --time=60 run | grep "read, MiB/s:" | awk '{print "Read: " $3 " MiB/sec"}'
sysbench fileio --file-test-mode=rndwr --file-total-size=10G --file-block-size=4K --threads=4 --time=60 run | grep "written, MiB/s:" | awk '{print "Write: " $3 " MiB/sec"}'
printf "\n"
sysbench --test=fileio --file-total-size=15G cleanup > /dev/null 2>&1

Let ‘s see how Cantech is far better then most of the Cloud providers.

Configuration used on Digital Ocean:
1vCPU, 2GB, 50GB SSD SERVER LOCATION: Bangalore

Configuration used on AWS:
1vCPU, 2GB, 30GB SSD SERVER LOCATION: Mumbai

Configuration used on Amazon Lightsail:
1vCPU, 2GB, 60GB SSD SERVER LOCATION: Mumbai

Configuration used on Cantech Networks:
1vCPU, 2GB, 60GB SSD SERVER LOCATION: Noida

 

If you need any help contact our support, Open support ticket from client area

Was this article helpful?

Related Articles