wiki:SyntheticBenchmarks

Version 17 (modified by faltet, 3 years ago) (diff)

--

Synthetic Benchmarks

In order to assess the performance of Blosc in different situations, a handy bench/bench.c standalone program is provided. Here it is an example on how to compile the benchmark.

GCC (Unix) or MINGW (Windows):

$ cd your_blosc_sources/bench
$ gcc -O3 -msse2 -o bench bench.c ../src/blosc.c ../src/blosclz.c ../src/shuffle.c -lpthread

MSVC (Windows):

> cd your_blosc_sources\bench
> cl /Ox /Febench.exe bench.c ..\src\blosc.c ..\src\blosclz.c ..\src\shuffle.c /link pthreadvc2.lib

Then, if you pass the 'suite' parameter followed by the number of cores in your machine, i.e. something like:

$ bench suite [nthreads]

then a small suite will be run that checks the speed of Blosc for the specified number of threads. Given this output, you can convert it into a plot by using the bench/plot-speeds.py scripts (you will need the  matplotlib library installed). You can print a small online help for this script usage:

$ python plot-speeds.py -?
usage: plot-speeds.py [-o outfile] [-t title ] [-c] [-d] filename
 -o filename for output (many extensions supported, e.g. .png, .jpg, .pdf)
 -t title of the plot
 -c plot compression speed
 -d plot decompression speed (default)

For example, if you have, say, 6 cores in your machine, and want to get the plots interactively, proceed like this:

$ ./bench suite 6 > mysuite.out
$ python plot-speeds.py -c mysuite.out   # get the compression plot
$ python plot-speeds.py -d mysuite.out   # get the decompression one

Alternatively, you can straight get a plot file by using the -o flag.

If you want to help with the fine-tuning of Blosc for other processors, please send your own output of this suite to blosc@…. Please be sure that you also provide the next information:

CPU info: (vendor, model or cache sizes)
Operating System: (Linux/Windows/MacOSX and version)
Compiler used: (GCC/MSVC/MINGW and version)

That info will be extremely useful for allowing allow better compression ratios and performance in future versions. Thanks!

See below for some contributed outputs and plots:


Processor model: Intel Core2 Duo Q8400 @ 2.66 GHz

Compiler: gcc version 4.4.1

OS: openSUSE 11.2, 64-bit

Suite output (4 threads)


Attachments