How to benchmark a linux server using UnixBench

Unixbench is the most used benchmarking software tool. It can measure the performance of bash scripts, CPUs in multithreading and single threading. It can also measure the performance for parallel taks. Also, specific disk IO for small and large files are performed. You can use it to measure either linux dedicated servers and linux vps servers, running CentOS, Debian, Ubuntu, Fedora and other distros.

benchmarking a linux server with unixbench

It is based in the BYTE UNIX benchmarking algorythm, which has been updated oftenly over years. It uses the hi-res time functions form Perl, and calculates the time difference between the beginning and the end of such testing processes.

Preparing the server

For CentOS

yum -y install gcc gcc-c++ make libXext-devel perl perl-Time-HiRes
yum -y groupinstall "Development Tools"
yum -y install libX11-devel mesa-libGL-devel perl-Time-HiRes

For Debian

apt-get install libx11-dev libgl1-mesa-dev libxext-dev perl perl-modules make

Now, download and execute Unixbench

yum install zip unzip -y
wget https://github.com/kdlucas/byte-unixbench/archive/master.zip
unzip master.zip
cd ./master/byte-unixbench-master/UnixBench
./Run

Here’s a sample output, as we tested the performance of a vps server from Copahost:

Version 5.1.2 Based on the Byte Magazine Unix Benchmark

Multi-CPU version Version 5 revisions by Ian Smith,
Sunnyvale, CA, USA
December 22, 2007 johantheghost at yahoo period com


1 x Dhrystone 2 using register variables 1 2 3 4 5 6 7 8 9 10

1 x Double-Precision Whetstone 1 2 3 4 5 6 7 8 9 10

1 x Execl Throughput 1 2 3

1 x File Copy 1024 bufsize 2000 maxblocks 1 2 3

1 x File Copy 256 bufsize 500 maxblocks 1 2 3

1 x File Copy 4096 bufsize 8000 maxblocks 1 2 3

1 x Pipe Throughput 1 2 3 4 5 6 7 8 9 10

1 x Pipe-based Context Switching 1 2 3 4 5 6 7 8 9 10

1 x Process Creation 1 2 3

1 x System Call Overhead 1 2 3 4 5 6 7 8 9 10

1 x Shell Scripts (1 concurrent) 1 2 3

1 x Shell Scripts (8 concurrent) 1 2 3

8 x Dhrystone 2 using register variables 1 2 3 4 5 6 7 8 9 10

8 x Double-Precision Whetstone 1 2 3 4 5 6 7 8 9 10

8 x Execl Throughput 1 2 3

8 x File Copy 1024 bufsize 2000 maxblocks 1 2 3

8 x File Copy 256 bufsize 500 maxblocks 1 2 3

8 x File Copy 4096 bufsize 8000 maxblocks 1 2 3

8 x Pipe Throughput 1 2 3 4 5 6 7 8 9 10

8 x Pipe-based Context Switching 1 2 3 4 5 6 7 8 9 10

8 x Process Creation 1 2 3

8 x System Call Overhead 1 2 3 4 5 6 7 8 9 10

8 x Shell Scripts (1 concurrent) 1 2 3

8 x Shell Scripts (8 concurrent) 1 2 3

========================================================================
BYTE UNIX Benchmarks (Version 5.1.2)

System: testserver.copahost.com: GNU/Linux
OS: GNU/Linux -- 2.6.32-573.22.1.el6.x86_64 -- #1 SMP Wed Mar 23 03:35:39 UTC 2016
Machine: x86_64 (x86_64)
Language: en_US.utf8 (charmap="UTF-8", collate="UTF-8")
CPU 0: Intel Xeon E312xx (Sandy Bridge) (6784.6 bogomips)
x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET
CPU 1: Intel Xeon E312xx (Sandy Bridge) (6784.6 bogomips)
x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET
CPU 2: Intel Xeon E312xx (Sandy Bridge) (6784.6 bogomips)
x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET
CPU 3: Intel Xeon E312xx (Sandy Bridge) (6784.6 bogomips)
x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET
CPU 4: Intel Xeon E312xx (Sandy Bridge) (6784.6 bogomips)
x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET
CPU 5: Intel Xeon E312xx (Sandy Bridge) (6784.6 bogomips)
x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET
CPU 6: Intel Xeon E312xx (Sandy Bridge) (6784.6 bogomips)
x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET
CPU 7: Intel Xeon E312xx (Sandy Bridge) (6784.6 bogomips)
x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET
17:49:21 up 1 min, 1 user, load average: 0.06, 0.03, 0.01; runlevel 3

------------------------------------------------------------------------
Benchmark Run: Sun Apr 24 2016 17:49:21 - 18:17:29
8 CPUs in system; running 1 parallel copy of tests

Dhrystone 2 using register variables 40207636.4 lps (10.0 s, 7 samples)
Double-Precision Whetstone 4302.8 MWIPS (10.0 s, 7 samples)
Execl Throughput 2165.9 lps (30.0 s, 2 samples)
File Copy 1024 bufsize 2000 maxblocks 1152392.2 KBps (30.0 s, 2 samples)
File Copy 256 bufsize 500 maxblocks 320023.0 KBps (30.0 s, 2 samples)
File Copy 4096 bufsize 8000 maxblocks 2674296.3 KBps (30.0 s, 2 samples)
Pipe Throughput 2249089.3 lps (10.0 s, 7 samples)
Pipe-based Context Switching 418217.3 lps (10.0 s, 7 samples)
Process Creation 6138.1 lps (30.0 s, 2 samples)
Shell Scripts (1 concurrent) 3866.5 lpm (60.0 s, 2 samples)
Shell Scripts (8 concurrent) 3080.1 lpm (60.0 s, 2 samples)
System Call Overhead 2819371.3 lps (10.0 s, 7 samples)

System Benchmarks Index Values BASELINE RESULT INDEX
Dhrystone 2 using register variables 116700.0 40207636.4 3445.4
Double-Precision Whetstone 55.0 4302.8 782.3
Execl Throughput 43.0 2165.9 503.7
File Copy 1024 bufsize 2000 maxblocks 3960.0 1152392.2 2910.1
File Copy 256 bufsize 500 maxblocks 1655.0 320023.0 1933.7
File Copy 4096 bufsize 8000 maxblocks 5800.0 2674296.3 4610.9
Pipe Throughput 12440.0 2249089.3 1807.9
Pipe-based Context Switching 4000.0 418217.3 1045.5
Process Creation 126.0 6138.1 487.2
Shell Scripts (1 concurrent) 42.4 3866.5 911.9
Shell Scripts (8 concurrent) 6.0 3080.1 5133.5
System Call Overhead 15000.0 2819371.3 1879.6
========
System Benchmarks Index Score 1601.9

------------------------------------------------------------------------
Benchmark Run: Sun Apr 24 2016 18:17:29 - 18:45:58
8 CPUs in system; running 8 parallel copies of tests

Dhrystone 2 using register variables 165868452.9 lps (10.0 s, 7 samples)
Double-Precision Whetstone 27304.7 MWIPS (9.9 s, 7 samples)
Execl Throughput 28968.2 lps (29.9 s, 2 samples)
File Copy 1024 bufsize 2000 maxblocks 957427.7 KBps (30.0 s, 2 samples)
File Copy 256 bufsize 500 maxblocks 251262.0 KBps (30.0 s, 2 samples)
File Copy 4096 bufsize 8000 maxblocks 2748781.0 KBps (30.0 s, 2 samples)
Pipe Throughput 9492288.9 lps (10.0 s, 7 samples)
Pipe-based Context Switching 1753727.5 lps (10.0 s, 7 samples)
Process Creation 82010.9 lps (30.0 s, 2 samples)
Shell Scripts (1 concurrent) 32494.6 lpm (60.0 s, 2 samples)
Shell Scripts (8 concurrent) 4351.1 lpm (60.1 s, 2 samples)
System Call Overhead 10662363.1 lps (10.0 s, 7 samples)

System Benchmarks Index Values BASELINE RESULT INDEX
Dhrystone 2 using register variables 116700.0 165868452.9 14213.2
Double-Precision Whetstone 55.0 27304.7 4964.5
Execl Throughput 43.0 28968.2 6736.8
File Copy 1024 bufsize 2000 maxblocks 3960.0 957427.7 2417.7
File Copy 256 bufsize 500 maxblocks 1655.0 251262.0 1518.2
File Copy 4096 bufsize 8000 maxblocks 5800.0 2748781.0 4739.3
Pipe Throughput 12440.0 9492288.9 7630.5
Pipe-based Context Switching 4000.0 1753727.5 4384.3
Process Creation 126.0 82010.9 6508.8
Shell Scripts (1 concurrent) 42.4 32494.6 7663.8
Shell Scripts (8 concurrent) 6.0 4351.1 7251.9
System Call Overhead 15000.0 10662363.1 7108.2
========
System Benchmarks Index Score 5466.1

Was this helpful?

Thanks for your feedback!

Gustavo Carvalho

Leave a Reply

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