OS benchmark

Is application used for comparing performance of various operating systems. Measurement is realized by measuring the execution time of some basic OS operations. Size of used files and memory blocks are random - different in each operation. Consists mostly from C source codes which should be compiled under measuread operating system.

Measured bacis OS operations are

  • Filesystem functions:
    • Creating files
    • Writing to file
    • Appending to file
    • Reading files
    • Removing files
  • Process functions:
    • Forking process1)
    • Executing new process by function system()
  • Memory management:
    • Memory allocation
    • Writing to memory
    • Memory reallocation (changind size of allocated memory block)
    • Reading from memory
    • Freeing memory

Modes

Program is able to work in both deterministic and stochastic (random mode)

  • In deterministic more order of operations is fixed.
  • In stochastic mode operations are executed in random order.

Randomization

Randomization is based on standard C pseudo random generator defaultly initialized by value zero, but can be set new random seed by parameter -s. (!)It is very important that random seed has to be the same on all compared systems (so it's recommended to not chande that parameter).

Installation

  1. Download this.
  2. For Linux run this:
tar -xf benchmark.tar
gcc dummy.c -o dummy
gcc -O0 benchmark.c linux.c -o benchmark
./benchmark

This should work on all UNIX based operating systems. For other operating systems use your creativity. For windows first2) uncomment #define command at the beginning of benchmark.h. After that it should looks like:

// Operating system under which program should be compiled and used
//#define LINUX		
#define WINDOWS

Usage

Usage:

benchmark [-ARDh] [-r random cycles] [-p process count] [-f files count]
    [-F max files size] [-m memory operations count] [-M max memory blocks count]
    [-s randseed] [-w working directory] [-d path to dummy program]

Parameters:

-A automatic mode (default values)
-R random mode (random order of operations)
-D deterministric mode (fixed order of operations)
-r <random cycless> count of random cycles in random mode (default p + m + f)
-p <process count> count of runned processes (they will not run all at the same time) (default 100)
-f <files count> maximum number of created files (default 500)
-F <file size in kB> maximum size of created file (default 1000)
-m <memory operations count> maximum number of memory blocks allocated at the same time (default 100)
-M <file size in kB> maximum size of allocated memory block (default 1000)
-s <randseed> decimal number used for random generator initialization (default 0)
-w <working directory> working directory (default current)
-d <path to dummy program> program used for testing the execution of new processes (default ./dummy)
-h print this help

Example

Recommended usage:

./benchmark -A

You should see something like:

Mode: deterministic
Maximum memory size: 1000
Count of memory operations: 1000
Maximum file size: 1000
Count of files: 1000
Count of processes: 1000
Conut of random cycles: 3000
Random seed: 0
Working directory: .
Realizer count of process operations: 1000
Realizer count of files operations: 6000
Realizer count of memory operations: 5000
File Create:    0.496967        0.000497
File Write:     0.260162        0.000260
File Append:    0.096181        0.000096
File Open, close:       0.034297        0.000034
File Read:      0.029261        0.000029
File Remove:    0.179036        0.000179
Filesystem operations:  1.095903        0.000183
Memory Alloc:   0.007484        0.000007
Memory Write:   0.649963        0.000650
Memory Resize:  0.038801        0.000039
Memory Read:    0.001687        0.000002
Memory Free:    0.025262        0.000025
Memory operations:      0.723197        0.000145
Process Fork, wait:     0.000000        nan
Process System: 2.597937        0.002598
Process operations:     2.597937        0.002598
Overall test time:      4.417037        0.000368

Mode: stochastic (random)
Maximum memory size: 1000
Count of memory operations: 1000
Maximum file size: 1000
Count of files: 1000
Count of processes: 1000
Conut of random cycles: 3000
Random seed: 0
Working directory: .
Realizer count of process operations: 2173
Realizer count of files operations: 12934
Realizer count of memory operations: 10796
File Create:    0.045668        0.000039
File Write:     0.007599        0.000007
File Append:    0.006188        0.000005
File Open, close:       0.002366        0.000002
File Read:      0.004997        0.000004
File Remove:    0.005341        0.000005
Filesystem operations:  0.072159        0.000006
Memory Alloc:   0.001878        0.000002
Memory Write:   0.108863        0.000094
Memory Resize:  0.018846        0.000016
Memory Read:    0.000279        0.000000
Memory Free:    0.002959        0.000003
Memory operations:      0.132825        0.000012
Process Fork, wait:     0.082398        0.000525
Process System: 0.511539        0.000436
Process operations:     0.511539        0.000235
Overall test time:      0.716523        0.000028
1) only in UNIX based systems
2) before compilation
 
osbenchmark.txt · Last modified: 31.03.2010 17:51 (external edit)
 
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki