wiki:SyntheticBenchmarks

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

Corrected the amount of data compressed/decompressed

Synthetic Benchmarks

In order to assess the performance of Blosc in different situations, a handy bench/bench.c standalone program is provided. This page is about instructions on how to compile, run and report back the results of this benchmark. If you want to contribute your results for your computer, keep reading.

First, checkout the trunk version from:

 http://blosc.pytables.org/svn/blosc/trunk

Then, compile the sources:

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

[For those that are using Windows and do not have a compiler installed (I strongly recommend using the free MINGW), you can use the next binary for Windows 64-bit Download. No 32-bit version yet, sorry]

Now, if you pass the 'suite' parameter followed by the number of cores in your machine to the bench program, 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, 4 cores in your machine, and want to get the plots interactively, proceed like this:

$ ./bench suite 4 > 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.

Also, if you have spare CPU cycles available, you may want to run the hardsuite, which is a series of tests that are much more comprehensive (and costly) than the suite above. It will take between 1 and 6 hours to run, depending on your machine and the number of cores, and will compress/decompress around 4 TB of data, checking that it has had a good round-trip. Running it is easy:

$ ./bench hardsuite 4 > myhardsuite.out
$ gzip -9 < myhardsuite.out > myhardsuite.out.gz    # use zip or 7z compressors if on Windows

You cannot use plot-speeds.py to plot the results of the hardsuite, as it is only meant for plotting suite ouput purposes.

IMPORTANT: In order to get fine results, please be sure that you are not running other heavy process while running the suites.

If you want to help with the fine-tuning of Blosc for other processors, please send your own output of these suites (either suite, hardsuite or both) to blosc@…. That info will be extremely useful for allowing allow better compression ratios and performance in future versions. 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)

Thanks!

-- Francesc Alted


Contributed outputs

See below for some contributed outputs and plots.


Processor model: AMD Phenom II X6 @ 3.7 GHz

Compiler: MINGW64/GCC version 4.4.5

OS: Windows 7, 64-bit

Suite output (6 threads) Download


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) Download


Attachments