pbzip2 decompress does not appear to use multiple cores in some cases
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
pbzip2 |
Invalid
|
Undecided
|
Unassigned |
Bug Description
I have a tbz file that doesn't use multiple cores when decompressing with pbzip2.
I haven't dug into the code, but when I run pbzip2 to decompress any of these tar files (via the -d flag) I see it using 8 threads, but only a single core (max CPU is 102.9%).
If I do a compress with pbzip2 then I see it using 8 threads and 350-370% (which is all 4 cores on this Core i5 iMac). This is what I expect to see.
If I re-compress the uncompressed tar file with pbzip2 and then run pbzip2 -d on the version that was compressed by pbzip2 then pbzip2 will use all the cores to decompress it as I'd expect.
So something about a file compressed by this other person makes it not be decompressed by pbzip2. Very odd.
Unfortunately I can't upload this particular test file but I'll try to see if I can construct one that exhibits the same issue.
pbzip2 is able to decompress in parallel only if the archive is in a format like [bz2 chunk1][bz2 chunk2][bz2 chunk3]...
pbzip2 is producing such kind of archives. However if archive has been created with another utility - e.g. bzip2 - it may end up having a single monolitic [bz2 chunk]. pbzip2 is not presently parallelizing decompression of such single-chunk archives.