pbzip2 isn't faster

Ryan Schmidt ryandesign at macports.org
Fri Apr 4 01:19:05 PDT 2014


While waiting minutes for clang-3.5 to install (compress) and then activate (decompress) a 600MB archive, I wondered why I was sitting here waiting for a single-threaded process to complete when I have a multi-core Mac.

A quick search led to pbzip2, a parallel implementation of bzip2 which we’ve had in MacPorts for 10 years already. I wondered why we’re not having MacPorts use this instead.

I installed it and tried it out. It correctly detected my 8 CPUs (4 real CPU cores, hyperthreaded), but decompression took just as long as it did with bzip2. CPU use never rose above 101% (of one core), even if I specified a number of cores manually. Memory usage never rose above 29MB, even if I manually specified a memory limit of 1GB, nor if I instructed the program to read the entire archive into memory first.

Has anybody successfully achieved the promised parallel operation of pbzip2 on OS X? If so, I wonder if it depends on the OS X version or the compiler used. I’m on OS X 10.9.2 with Xcode 5.1’s Apple LLVM version 5.1 (clang-503.0.38) (based on LLVM 3.4svn).



More information about the macports-users mailing list