How to benchmark a linux server

A Benchmark is a test that checks the performance of varying factors and can be compared. A server benchmark tests the i/o speed (read and write speed), internet speed and checks what sort of system, memory and cpu the server has.

There are many or a handful of server benchmark scripts which can easily be started with one simple line. Bench.sh and nench.sh are two of the more popular ones. I am going to look at Bench.sh for this post.

To run Bench.sh on your server you need to SSH into it, Putty is a program to do this.

Once connected to your server via SSH in Putty paste and run either of these two commands:

wget -qO- bench.sh | bash
curl -Lso- bench.sh | bash

It will run through the benchmark and this will be the output shown:

Benchmark started on Tue Nov 28 23:17:31 EST 2017
Full benchmark log: /root/bench.log

System Info
-----------
Processor	: QEMU Virtual CPU version (cpu64-rhel6)
CPU Cores	: 1
Frequency	: 2199.998 MHz
Memory		: 992 MB
Swap		:  MB
Uptime		: 4 days, 1:53,

OS		: \S
Arch		: x86_64 (64 Bit)
Kernel		: 3.10.0-514.2.2.el7.x86_64
Hostname	: HeartyPiercing-VM


Speedtest (IPv4 only)
---------------------

Location		Provider	Speed
CDN			Cachefly	41.8MB/s

Atlanta, GA, US		Coloat		17.4MB/s 
Dallas, TX, US		Softlayer	15.3MB/s 
Seattle, WA, US		Softlayer	8.47MB/s 
San Jose, CA, US	Softlayer	9.09MB/s 
Washington, DC, US	Softlayer 	11.6MB/s 

Tokyo, Japan		Linode		11.4MB/s 
Singapore 		Softlayer	3.90MB/s 

Rotterdam, Netherlands	id3.net		2.97MB/s
Haarlem, Netherlands	Leaseweb	15.8MB/s 


Disk Speed
----------
I/O (1st run)	: 140 MB/s
I/O (2nd run)	: 210 MB/s
I/O (3rd run)	: 167 MB/s
Average I/O	: 172.333 MB/s

It starts of with listing the processor, cores and the speed. After that we have the memory (ram) available and your servers uptime. You then get some operating systems and kernel information then comes the speed tests.

It lists the locations, provider and the speed it took your server to download a file from that location. Depending on your servers location, network port and peering is what speed you will get.

Finally the Disk speed, this is the speed of reading/writing files. A SSD or NVMe will have a high-speed, HDD not so much.

Thats the run down on doing a basic benchmark test on your linux VPS.