Benchmark for Linux

Here are a few CPU oriented benchmarks for Linux.

I am not sure if they are available in packages for CentOS, so I have only given the Ubuntu packages:

(Please note that you will have to enable the community repositories for these)

sudo apt-get -y install hardinfo
#this is a gui, but can be run from the command line:
sudo apt-get -y install sysbench
sysbench --test=cpu run
# it is useful to compare with a larger number of threads:
sysbench --test=cpu --num-threads=6 run
# this test takes a bit longer (fails on machines with a lot of ram if total size is too high):
sysbench --test=memory --memory-total-size=1000000000 run

For a more comprehensive real-world test that also exercises the HD, then have a look at the MySQL test suite

An excellent hard drive benchmark is bonnie++ Install with :

  • apt-get install bonnie++
  • wget

or compile (as root) with:

yum install gcc gcc-c++ autoconf automake
cd /tmp
tar -zxvf bonnie++-$VER.tgz
cd bonnie++-$VER
make install

Suggested run with: bonnie++ -u root -b -f -n 1 -d /root

and then replace the /root with other parts of the disk system as required

The -b option forces re-sync which is appropriate to some database and mailservers.


  • more comprehensive than bonnie++ and less likely to report anomalous result
  • see
  • Install on Debian/Ubuntu with apt-get install iozone3
  • to install and run on CentOS 64bit with 6GB RAM
ARCH=linux-AMD64 #or linux
tar -xf iozone$IOVER.tar
cd iozone$IOVER/src/current/
make $ARCH
mv iozone ~
cd ~
rm -f iozone$IOVER.tar
rm -Rf iozone$IOVER
./iozone -Ra -i 0 -i 1 -g 8G -b iozone.wks
  • Check the first four tables (-i 0 -i 1)
  • Chart with line/3D; 1st row and col as labels
  • the column with 128 record size is a good one to look at. It’s important to see what it looks like after caching has stopped working.


A quick and simple test that will give the write speed is:

dd if=/dev/zero of=/tmp/test.dat bs=1G count=1 oflag=direct

Internet speed test

  • Downloads a 10Mb file. Speed is given in MBytes/second
wget -O /dev/null