Blog

UnixBench: Find your system performance.

Tags: measure linux performanceunix performanceUnixBench

Published on: August 7, 2010 by Faheem P.

UnixBench: Find your system performance.

Scenario:

UnixBench is an OpenASource GPLv2 licensed tool that provides a basic indicator of the performance of a Unix-like system. This is especially useful in the linux performance monitoring of VPS’s since the resources for them are limited when compared to a dedicated server. Multiple tests are used to test various aspects of the system’s performance and these test results are then compared to the scores from a baseline system to produce an index value, which is generally easier to handle than the raw scores.

UnixBench can test basic graphics including 2D and 3D performance and Multi-CPU systems are also handled. If your system has multiple CPUs, the default behaviour is to run the selected tests twice, once with one copy of each test program running at a time, and once with N copies, where N is the number of CPUs. This is designed to allow you to assess:

  • the performance of your system when running a single task
  • the performance of your system when running multiple tasks
  • the gain from your system’s implementation of parallel processing

What all could be tested using UnixBench:

Dhrystone :

This benchmark is used to measure and compare the performance of computers. The test focuses on string handling, as there are no floating point operations. It is heavily influenced by hardware and software design, compiler and linker options, code optimization, cache memory, wait states, and integer data types.

Whetstone:

Measures the speed and efficiency of floating-point operations. This test contains several modules that are meant to represent a mix of operations typically performed in scientific applications. A wide variety of C functions including sin, cos, sqrt, exp, and log are used as well as integer and floating-point math operations, array accesses, conditional branches, and procedure calls. This test measure both integer and floating-point arithmetic.

Execl Throughput:

This test measures the number of execl calls that can be performed per second. Execl is part of the exec family of functions that replaces the current process image with a new process image. It and many other similar commands are front ends for the function execve().

File Copy:

This measures the rate at which data can be transferred from one file to another, using various buffer sizes. The file read, write and copy tests capture the number of characters that can be written, read and copied in a specified time (default is 10 seconds).

Pipe Throughput:

A pipe is the simplest form of communication between processes. Pipe throughtput is the number of times (per second) a process can write 512 bytes to a pipe and read them back. The pipe throughput test has no real counterpart in real-world programming.

Pipe-based Context Switching:

This test measures the number of times two processes can exchange an increasing integer through a pipe. The pipe-based context switching test is more like a real-world application. The test program spawns a child process with which it carries on a bi-directional pipe conversation.

Process Creation:

This test measure the number of times a process can fork and reap a child that immediately exits. Process creation refers to actually creating process control blocks and memory allocations for new processes, so this applies directly to memory bandwidth. Typically, this benchmark would be used to compare various implementations of operating system process creation calls.

Shell Scripts:

The shells scripts test measures the number of times per minute a process can start and reap a set of one, two, four and eight concurrent copies of a shell scripts where the shell script applies a series of transformation to a data file.

System Call Overhead:

Estimates the cost of entering and leaving the operating system kernel, i.e. the overhead for performing a system call. It consists of a simple program repeatedly calling the getpid (which returns the process id of the calling process) system call. The time to execute such calls is used to estimate the cost of entering and exiting the kernel.

Graphical Tests:

Both 2D and 3D graphical tests are provided; at the moment, the 3D suite in particular is very limited, consisting of the “ubgears” program. These tests are intended to provide a very rough idea of the system’s 2D and 3D graphics performance. Bear in mind, of course, that the reported performance will depend not only on hardware, but on whether your system has appropriate drivers for it.

You can download the latest version from here : http://code.google.com/p/byte-unixbench/downloads/list

Installation and Running tests:

For Centos/RedHat machines:

Install the required libraries:

Find your machine architecture:

root@server12 [~]# getconf LONG_BIT
64

My system is 64 bit and hence installing libraries for 64bit architecture.

yum install libX11-devel.x86_64 perl perl-modules.noarch make

For Ubuntu/Debain machines,

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

Download the package:

wget -c http://byte-unixbench.googlecode.com/files/unixbench-5.1.2.tar.gz

tar -xzf unixbench-5.1.2.tar.gz

cd unixbench-5.1.2/

<code>./Run 

This is check all the parametres, if you just want to check specific parametres, you can spacify this on ./Run command, like

./Run dhry2reg whetstone-double syscall pipe context1 spawn execl shell1 shell8 shell16

A sample output has been given below.:-

[root@temp unixbench-5.1.2]#./Run dhry2reg whetstone-double syscall pipe context1 spawn execl shell1 shell8 shell16
make all
make[1]: Entering directory `/usr/src/unixbench-5.1.2′
Checking distribution of files
./pgms  exists
./src  exists
./testdir  exists
./tmp  exists
./results  exists
make[1]: Leaving directory `/usr/src/unixbench-5.1.2′
sh: 3dinfo: command not found

#    #  #    #  #  #    #          #####   ######  #    #   ####   #    #
#    #  ##   #  #   #  #           #    #  #       ##   #  #    #  #    #
#    #  # #  #  #    ##            #####   #####   # #  #  #       ######
#    #  #  # #  #    ##            #    #  #       #  # #  #       #    #
#    #  #   ##  #   #  #           #    #  #       #   ##  #    #  #    #
####   #    #  #  #    #          #####   ######  #    #   ####   #    #

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 System Call Overhead  1 2 3 4 5 6 7 8 9 10

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 Execl Throughput  1 2 3

1 x Shell Scripts (1 concurrent)  1 2 3

1 x Shell Scripts (8 concurrent)  1 2 3

1 x Shell Scripts (16 concurrent)  1 2 3

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

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

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

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

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

4 x Process Creation  1 2 3

4 x Execl Throughput  1 2 3

4 x Shell Scripts (1 concurrent)  1 2 3

4 x Shell Scripts (8 concurrent)  1 2 3

4 x Shell Scripts (16 concurrent)  1 2 3

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

System: temp.xen.com: GNU/Linux
OS: GNU/Linux — 2.6.18-194.8.1.el5xen — #1 SMP Thu Jul 1 19:41:05 EDT 2010
Machine: x86_64 (x86_64)
Language: en_US.utf8 (charmap=”UTF-8″, collate=”UTF-8″)
CPU 0: Intel(R) Core(TM) i7 CPU 920 @ 2.67GHz (6685.4 bogomips)
Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSCALL/SYSRET
CPU 1: Intel(R) Core(TM) i7 CPU 920 @ 2.67GHz (6685.4 bogomips)
Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSCALL/SYSRET
CPU 2: Intel(R) Core(TM) i7 CPU 920 @ 2.67GHz (6685.4 bogomips)
Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSCALL/SYSRET
CPU 3: Intel(R) Core(TM) i7 CPU 920 @ 2.67GHz (6685.4 bogomips)
Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSCALL/SYSRET
06:59:48 up 34 min,  1 user,  load average: 4.05, 2.22, 1.20; runlevel 3

————————————————————————
Benchmark Run: Wed Aug 04 2010 06:59:48 – 07:23:56
4 CPUs in system; running 1 parallel copy of tests

Dhrystone 2 using register variables       15391672.9 lps   (10.0 s, 7 samples)
Double-Precision Whetstone                     3051.5 MWIPS (9.9 s, 7 samples)
Execl Throughput                               1688.3 lps   (30.0 s, 2 samples)
Pipe Throughput                              434843.9 lps   (10.0 s, 7 samples)
Pipe-based Context Switching                 113665.2 lps   (10.0 s, 7 samples)
Process Creation                               4275.5 lps   (30.0 s, 2 samples)
Shell Scripts (1 concurrent)                   4460.3 lpm   (60.0 s, 2 samples)
Shell Scripts (16 concurrent)                   573.8 lpm   (60.0 s, 2 samples)
Shell Scripts (8 concurrent)                   1088.8 lpm   (60.0 s, 2 samples)
System Call Overhead                         551580.7 lps   (10.0 s, 7 samples)

System Benchmarks Partial Index              BASELINE       RESULT    INDEX
Dhrystone 2 using register variables         116700.0   15391672.9   1318.9
Double-Precision Whetstone                       55.0       3051.5    554.8
Execl Throughput                                 43.0       1688.3    392.6
Pipe Throughput                               12440.0     434843.9    349.6
Pipe-based Context Switching                   4000.0     113665.2    284.2
Process Creation                                126.0       4275.5    339.3
Shell Scripts (1 concurrent)                     42.4       4460.3   1052.0
Shell Scripts (16 concurrent)                     —        573.8      —
Shell Scripts (8 concurrent)                      6.0       1088.8   1814.7
System Call Overhead                          15000.0     551580.7    367.7
========
System Benchmarks Index Score (Partial Only)                          574.3

————————————————————————
Benchmark Run: Wed Aug 04 2010 07:23:56 – 07:48:15
4 CPUs in system; running 4 parallel copies of tests

Dhrystone 2 using register variables       60140037.8 lps   (10.1 s, 7 samples)
Double-Precision Whetstone                    12184.4 MWIPS (9.9 s, 7 samples)
Execl Throughput                               4342.6 lps   (30.0 s, 2 samples)
Pipe Throughput                             1718444.4 lps   (10.0 s, 7 samples)
Pipe-based Context Switching                 447592.9 lps   (10.0 s, 7 samples)
Process Creation                               7228.8 lps   (30.0 s, 2 samples)
Shell Scripts (1 concurrent)                   8807.4 lpm   (60.0 s, 2 samples)
Shell Scripts (16 concurrent)                   663.0 lpm   (60.1 s, 2 samples)
Shell Scripts (8 concurrent)                   1317.0 lpm   (60.1 s, 2 samples)
System Call Overhead                        2058385.7 lps   (10.1 s, 7 samples)

System Benchmarks Partial Index              BASELINE       RESULT    INDEX
Dhrystone 2 using register variables         116700.0   60140037.8   5153.4
Double-Precision Whetstone                       55.0      12184.4   2215.3
Execl Throughput                                 43.0       4342.6   1009.9
Pipe Throughput                               12440.0    1718444.4   1381.4
Pipe-based Context Switching                   4000.0     447592.9   1119.0
Process Creation                                126.0       7228.8    573.7
Shell Scripts (1 concurrent)                     42.4       8807.4   2077.2
Shell Scripts (16 concurrent)                     —        663.0      —
Shell Scripts (8 concurrent)                      6.0       1317.0   2195.0
System Call Overhead                          15000.0    2058385.7   1372.3
========
System Benchmarks Index Score (Partial Only)                         1587.3

Category : Howtos, Linux

Faheem P.

Faheem P.

Faheem enjoys learning new technologies and loves to implement cutting edge solutions. He is one of the most active member in various technical forums and is a familiar face in various brain storming sessions. He takes great pride in being an explorer and the best thing you can be sure about in his room is the backpack!!

You may also read:

Comments

Add new commentSIGN IN

Let's Connect

Categories

Your Cart

Cart is empty.

Subtotal
₹0.00
APPLY
0
Send this to a friend