Ask The Real Tom

May 14, 2008



Multi CPU bzip2

Filed under: operating system — Tags: , , , , — admin @ 9:08 pm

Not really oracle related, but a interesting thing and it’s performance related (which is my nr.1 passion)

Haven’t you been upset that bzip2 takes sooo long? Is CPU intensive but just uses 1 CPU (or core).

The solution is pbzip2 which can use multiple cpu’s

My Teste:

CPU: ntel(R) Core(TM)2 CPU 4400 @ 2.00GHz (cache: 2048 KB)

FIle: (mysql dump)

562M 2008-05-14 21:30 shopprod200805132200.dmp

bzip2 run

time bzip2 shopprod200805132200.dmp

real 3m23.115s
user 3m14.252s
sys 0m2.632s

time bunzip2 shopprod200805132200.dmp.bz2

real 1m43.184s
user 1m38.118s
sys 0m2.748s

pbzip2 run

time pbzip2 shopprod200805132200.dmp
real 2m29.084s
user 4m0.855s
sys 0m8.561s
time pbzip2 -d shopprod200805132200.dmp.bz2

real 0m59.406s
user 1m46.087s
sys 0m5.744s

So on my machine compression is about 36% faster. Decompression about 76 % faster.

Powered by WordPress