How to test VPS Speed and Performance? Install and Run UnixBench & sysbench

How to test VPS Speed and Performance? Install and Run UnixBench & sysbench

VPS hosting services eliminate many of the problems associated with shared servers including system slowdowns caused by other users on the servers.But when you purchased the VPS and want to know its performance, then you can simply perform the benchmark test yourself.

In this simple article I will tell you the magic command how to find out your server’s disk performance (I/O – write and read speed),CPU performance etc. .These two free tools allow you to conduct quick test on your server to easily find out its general info and performance.

 

There is more than one way to check the performance available on a VPS Server.If you are looking for great performance and ease of use, then you should look into Following :

  1. Linode VPS Review-How to Create a Linode Server
  2. host1plus VPS Review-Affordable & Quick VPS Hosting RAM 256 MB Only $2.00/mo
  3. BandwagonHost VPS Review -Cheap SSD VPS 256 MB RAM Only $2.99/m

How To Benchmark VPS System (CPU, File IO) With sysbench

Installing sysbench

For CentOS:

apt-get install sysbench
man sysbench

For Debian/Ubuntu:

wget http://nchc.dl.sourceforge.net/project/sysbench/sysbench/0.4.12/sysbench-0.4.12.tar.gz
tar zxvf sysbench-0.4.12.tar.gz
cd sysbench-0.4.12/
mkdir /usr/sysbench/
apt-get install automake
apt-get install libtool
./autogen.sh

 

How to Test VPS CPU Performance

The faster your CPU performs, the faster your server can process tasks. Just use the command(Note that this CPU measure is by no means comprehensive. but it does give an overall look at how CPU-bound workloads will be handled by the different VPSes.)

sysbench --test=cpu --cpu-max-prime=20000 run

File IO Benchmark

IOPS (input/output operations per second) are a metric that are commonly used to measure disk I/O performance.To measure file IO performance, we first need to create a test file that is much bigger than your RAM – 150GB is a good value:

sysbench --test=fileio --file-total-size=150G prepare

Afterwards, we can run the benchmark:

sysbench --test=fileio --file-total-size=150G --file-test-mode=rndrw --init-rng=on --max-time=300 --max-requests=0 run

How to Test VPS Disk I/O Performance

Disk performance is important.High disk IO is important to ensure your server works efficiently and your web applications do not slow down.This script is the one I see a lot in many forums and blogs.Just do the following

dd if=/dev/zero of=test bs=64k count=16k conv=fdatasync

HDPARM

hdparm can be used to get/set the disk information, if you don’t have it, you can install by using:

sudo apt-get install hdparm
#yum install hdparm

You need to specify which hard disk partition, the first HDD is usually /dev/sda1, the second is /dev/sda2 or /dev/sdb1 etc.

hdparm -tT /dev/sda1

There is a big difference regarding to the disk performance between HDD and SD Card. Remember to remove the file by rm -f test after you finish the test.

 

Test VPS upload/download speed

We can use Matt Martz python script speedtest-cli to Test VPS upload/download speed.just do the following :

wget -O speedtest-cli https://raw.github.com/sivel/speedtest-cli/master/speedtest_cli.py
chmod +x speedtest-cli
python speedtest-cli --share

Or

wget freevps.us/downloads/bench.sh -O - -o /dev/null|bash

heres an example ran from a Linode VPS

Install and Run UnxBench

UnixBench is a popular server benchmarking tool,its results depend not only on your hardware, but on your operating system, libraries, and even compiler.This tutorial will cover how to  install and run UnixBench on a VPS.

To install and run UnixBench, follow the instructions related to the Linux distribution you are using :

For CentOS:

yum install gcc gcc-c++ make libXext-devel
yum groupinstall "Development Tools"
yum install libX11-devel mesa-libGL-devel perl-Time-HiRes
wget -c http://byte-unixbench.googlecode.com/files/unixbench-5.1.3.tgz
tar xvzf unixbench-5.1.3.tgz
cd unixbench-5.1.3
make
./Run

For Debian/Ubuntu:

apt-get install libx11-dev libgl1-mesa-dev libxext-dev perl  perl-modules make
wget http://byte-unixbench.googlecode.com/files/unixbench-5.1.3.tgz
tar xvf unixbench-5.1.3.tgz
cd unixbench-5.1.3
./Run

My Conclusion

However those two tools are not the only script to perform benchmark but I consider it as the quickest and simplest available.Sysbench is one of the most common benchmarking utilities.

As for UnixBench: if it does encourage you to switch to a new system because it has a higher UnixBench Index Score, you might want to try upgrading your compiler first!

One thought on “How to test VPS Speed and Performance? Install and Run UnixBench & sysbench”

Leave a Reply

Your email address will not be published. Required fields are marked *