| Version 15 (modified by faltet, 3 years ago) (diff) |
|---|
Synthetic Benchmarks
Here it is an example on how to compile and run the simple benchmark that comes with Blosc.
Unix (gcc):
$ cd src $ gcc -O3 -o bench bench.c blosc.c blosclz.c shuffle.c -msse2 -lpthread $ ./bench [nthreads]
Windows (MSVC):
> cd src > cl /Ox /Febench.exe bench.c blosc.c blosclz.c shuffle.c /link pthreadvc2.lib > bench.exe [nthreads]
Below are some outputs when using a different number of threads with the next setup:
Processor model: Intel Core2 Duo Q8400 @ 2.66 GHz
L1 cache size (per core): 32 KB
L2 cache size (shared): 4 MB
Compiler: gcc version 4.4.1
OS: openSUSE 11.2, 64-bit
For 1 thread:
********************** Setup info ***************************** Blosc version: 0.9.0 (2010-05-04) Using random data with 20 significant bits (out of 32) Dataset size: 1048576 bytes Type size: 4 bytes Shuffle active? Yes Number of threads: 1 ********************** Running benchmarks ********************* memcpy(write): 352.3 us, 2838.1 MB/s memcpy(read): 287.5 us, 3478.3 MB/s Compression level: 1 compression(write): 835.6 us, 1196.7 MB/s Final bytes: 293072 Compr ratio: 3.58 decompression(read): 453.1 us, 2207.0 MB/s OK Compression level: 2 compression(write): 918.1 us, 1089.2 MB/s Final bytes: 293072 Compr ratio: 3.58 decompression(read): 453.1 us, 2207.1 MB/s OK Compression level: 3 compression(write): 998.8 us, 1001.2 MB/s Final bytes: 293072 Compr ratio: 3.58 decompression(read): 453.0 us, 2207.7 MB/s OK Compression level: 4 compression(write): 1844.0 us, 542.3 MB/s Final bytes: 334768 Compr ratio: 3.13 decompression(read): 641.0 us, 1560.0 MB/s OK Compression level: 5 compression(write): 2170.0 us, 460.8 MB/s Final bytes: 244432 Compr ratio: 4.29 decompression(read): 1026.7 us, 974.0 MB/s OK Compression level: 6 compression(write): 2170.2 us, 460.8 MB/s Final bytes: 244432 Compr ratio: 4.29 decompression(read): 1027.5 us, 973.2 MB/s OK Compression level: 7 compression(write): 2123.7 us, 470.9 MB/s Final bytes: 209544 Compr ratio: 5.00 decompression(read): 1190.3 us, 840.1 MB/s OK Compression level: 8 compression(write): 2123.8 us, 470.9 MB/s Final bytes: 209544 Compr ratio: 5.00 decompression(read): 1190.4 us, 840.0 MB/s OK Compression level: 9 compression(write): 1882.9 us, 531.1 MB/s Final bytes: 186216 Compr ratio: 5.63 decompression(read): 1073.4 us, 931.6 MB/s OK
For 4 threads:
********************** Setup info ***************************** Blosc version: 0.9.0 (2010-05-04) Using random data with 20 significant bits (out of 32) Dataset size: 1048576 bytes Type size: 4 bytes Shuffle active? Yes Number of threads: 4 ********************** Running benchmarks ********************* memcpy(write): 345.4 us, 2895.2 MB/s memcpy(read): 284.1 us, 3520.5 MB/s Compression level: 1 compression(write): 317.2 us, 3152.3 MB/s Final bytes: 293072 Compr ratio: 3.58 decompression(read): 144.4 us, 6923.8 MB/s OK Compression level: 2 compression(write): 306.0 us, 3267.9 MB/s Final bytes: 293072 Compr ratio: 3.58 decompression(read): 144.1 us, 6942.0 MB/s OK Compression level: 3 compression(write): 354.4 us, 2821.3 MB/s Final bytes: 293072 Compr ratio: 3.58 decompression(read): 152.3 us, 6565.3 MB/s OK Compression level: 4 compression(write): 567.8 us, 1761.2 MB/s Final bytes: 334768 Compr ratio: 3.13 decompression(read): 197.2 us, 5070.8 MB/s OK Compression level: 5 compression(write): 627.1 us, 1594.5 MB/s Final bytes: 244432 Compr ratio: 4.29 decompression(read): 284.6 us, 3514.2 MB/s OK Compression level: 6 compression(write): 627.2 us, 1594.4 MB/s Final bytes: 244432 Compr ratio: 4.29 decompression(read): 284.5 us, 3514.9 MB/s OK Compression level: 7 compression(write): 619.2 us, 1614.9 MB/s Final bytes: 209544 Compr ratio: 5.00 decompression(read): 325.7 us, 3069.9 MB/s OK Compression level: 8 compression(write): 620.0 us, 1613.0 MB/s Final bytes: 209544 Compr ratio: 5.00 decompression(read): 325.8 us, 3069.6 MB/s OK Compression level: 9 compression(write): 592.2 us, 1688.6 MB/s Final bytes: 186216 Compr ratio: 5.63 decompression(read): 316.3 us, 3162.0 MB/s OK
As you can see, using 4 threads on a Quad-core processor makes the compression/decompression to go faster by a 3.4x (!). More importantly, we can see there that threading actually can make Blosc to go faster for both writing to memory (1.12x faster) and reading (up to 2x!).
These results definitely open the door to perform computations faster by using compression, and I foresee that this technique will be increasingly useful with processors with more cores (which seems the trend for future computing).
If you want to help with the fine-tuning of Blosc for other processors, please send the output of this benchmark and processor details to blosc@…. Thanks!
Attachments
-
compr-4t-linux64-small.png
(38.7 KB) -
added by faltet 3 years ago.
-
compr-6t-wingw64-small.png
(46.2 KB) -
added by faltet 3 years ago.
-
decompr-4t-linux64-small.png
(41.3 KB) -
added by faltet 3 years ago.
-
decompr-6t-wingw64-small.png
(51.9 KB) -
added by faltet 3 years ago.
-
suite-linux-core2.out
(7.0 KB) -
added by faltet 3 years ago.
-
suite-windows7-amdx6.out
(10.7 KB) -
added by faltet 3 years ago.
-
mysuite-powerpc-g4.out
(1.7 KB) -
added by faltet 3 years ago.
-
compr-8t-osx-nehalem-small.png
(46.1 KB) -
added by faltet 3 years ago.
-
decompr-8t-osx-nehalem-small.png
(51.0 KB) -
added by faltet 3 years ago.
-
suite-nehalem-gcc45.out
(14.0 KB) -
added by faltet 3 years ago.
-
suite-core2-ubuntu-gcc44.out
(3.2 KB) -
added by faltet 3 years ago.
-
bench-win32.zip
(27.3 KB) -
added by faltet 3 years ago.
-
bench-win64.zip
(35.9 KB) -
added by faltet 3 years ago.
-
compr-2t-linux32-pentium4-ht-small.png
(28.8 KB) -
added by faltet 3 years ago.
-
decompr-2t-linux32-pentium4-ht-small.png
(31.1 KB) -
added by faltet 3 years ago.
-
suite-2t-linux32-pentium4-ht.out
(3.5 KB) -
added by faltet 3 years ago.
-
compr-4t-win64-core2-quad-small.png
(35.7 KB) -
added by faltet 3 years ago.
-
decompr-4t-win64-core2-quad-small.png
(39.1 KB) -
added by faltet 3 years ago.
-
suite-4t-win64-core2-quad.out
(7.0 KB) -
added by faltet 3 years ago.
-
compr-ubuntu-opteron-2t-small.png
(29.0 KB) -
added by faltet 3 years ago.
-
decompr-ubuntu-opteron-2t-small.png
(33.8 KB) -
added by faltet 3 years ago.
-
mysuite-ubuntu-opteron-2t.out
(3.6 KB) -
added by faltet 3 years ago.
-
compr-1t-osx-powerpc-G4-small.png
(24.9 KB) -
added by faltet 3 years ago.
-
decompr-1t-osx-powerpc-G4-small.png
(24.8 KB) -
added by faltet 3 years ago.
-
compr-2t-linux-core2-small.png
(30.3 KB) -
added by faltet 3 years ago.
-
decompr-2t-linux-core2-small.png
(33.7 KB) -
added by faltet 3 years ago.
-
suite-core2-opensuse-gcc44.out
(3.5 KB) -
added by faltet 3 years ago.
-
suite-2t-linux32-atom-ht.out
(3.5 KB) -
added by faltet 3 years ago.
-
compr-ubuntu-atom-2t-small.png
(28.0 KB) -
added by faltet 3 years ago.
-
decompr-ubuntu-atom-2t-small.png
(29.9 KB) -
added by faltet 3 years ago.
-
suite-2t-linux32-atom-ht.2.out
(3.5 KB) -
added by faltet 3 years ago.
-
linux-i7-980x-6-compr.png
(85.5 KB) -
added by faltet 21 months ago.
-
linux-i7-980x-6-decompr.png
(102.3 KB) -
added by faltet 21 months ago.
-
linux-i7-980x-6.out
(11.1 KB) -
added by faltet 21 months ago.
-
linux-i7-980x-6-compr-small.png
(54.7 KB) -
added by faltet 21 months ago.
-
linux-i7-980x-6-decompr-small.png
(61.0 KB) -
added by faltet 21 months ago.
-
intel-atom-330-suite-decompression.png
(75.7 KB) -
added by faltet 15 months ago.
-
intel-atom-330-suite-compression.png
(66.3 KB) -
added by faltet 15 months ago.
-
intel-atom-330-suite-compression-small.png
(55.1 KB) -
added by faltet 14 months ago.
-
intel-atom-330-suite-decompression-small.png
(58.6 KB) -
added by faltet 14 months ago.
-
intel-atom-330-suite.out
(7.0 KB) -
added by faltet 14 months ago.
-
four-six-opteron-suite.out
(42.0 KB) -
added by faltet 14 months ago.
-
four-six-opteron-suite-decompression-small.png
(181.5 KB) -
added by faltet 14 months ago.
-
four-six-opteron-suite-compression-small.png
(168.4 KB) -
added by faltet 14 months ago.
-
viznode07.out
(21.1 KB) -
added by vhaenel 14 months ago.
-
viznode07-compression-small.png
(66.7 KB) -
added by vhaenel 14 months ago.
-
viznode07-decompression-small.png
(85.7 KB) -
added by vhaenel 14 months ago.
-
linux-3930K.out
(21.1 KB) -
added by faltet 14 months ago.
-
linux-3930K-compr-small.png
(80.3 KB) -
added by vhaenel 14 months ago.
-
linux-3930K-decompr-small.png
(102.7 KB) -
added by vhaenel 14 months ago.
![(please configure the [header_logo] section in trac.ini)](/images/blosc-logo-small.png)