I am using Ubuntu's Archive Manager (file-roller) to compress (tar.gz) some large files and directories.

Often this takes a long time, because this program uses just one of my eight CPU cores.

Is there a way to force Archive Manager to use all my CPU cores?

  • Can you launch multiple instances on different directories? There would be lots of head thrashing on HDDs but SSDs would be OK I think. Oct 26 '16 at 14:51
  • Yes, this would be possible, but seems for me too complicated. On an Octacore CPU I would need to launch eight instances manually. Furthermore I would have eight archives as result. This is not what I am looking for.
    – eDeviser
    Oct 27 '16 at 11:20

I've been trying to find an answer to this question myself, and I can report a partial success: p7zip, while not maxing out all cores, seems to make quite a bit of use of more than one, at least while compressing. On my dual-core system, it just about maxes out both cores, and on a family member's quad-core, it maxes out one core and runs the other three at about half load, varying between 30% and 80% or so. Extraction seems not to be multi-threaded at all, though, as it maxes out one core and the rest idle along.

I've tried installing various of the multi-core capable compressors and creating links to them from /usr/bin, but file roller ignored them. All I could find in my research is a hint on some german forum (if the goog's translation is accurate) that there are apparently hard-coded paths in the file-roller source, so it was suggested to replace the original binaries in /bin with links to the (theoretically command-line-compatible) multi-core replacements like pigz, but I haven't felt daring enough to try that yet myself.

  • Cool, that sounds interesting. Would you please add the link to the german forum thread?
    – eDeviser
    Nov 14 '16 at 11:03
  • Sure, it's at forum.ubuntuusers.de/topic/… but translate seemed to give up halfway through the first message for some reason, so I had to copy and paste the whole page into the translate input box, and then it seemed to work.
    – MoTLD
    Nov 14 '16 at 12:08
  • On re-reading that german forum post, it seems I was mistaken, the paths aren't hard-coded, at least according to the last commenter, who seems to be surprised that the links from /usr/bin or elsewhere in the path don't work (the original poster tried something similar). And the suggestion to replace the original binaries with links isn't from that discussion, apparently, who knows where I read that. I might try it if nothing else seems to work.
    – MoTLD
    Nov 14 '16 at 12:15
  • German is my native language, so I think I am going to post a translated version of the solution mentioned in the forum, soon. ;-)
    – eDeviser
    Nov 14 '16 at 14:34

The forum thread from 2012, which was mentioned by MoTLD tells the fallowing solution:

Create some softlinks in /usr/override to use pigz and lbzip2 instead of the normal common binarys. This could look like this:

ls -l /usr/override
total 0
lrwxrwxrwx 1 root root 17 Oct 23 21:20 bunzip2 -> /usr/bin/lbunzip2
lrwxrwxrwx 1 root root 15 Oct 23 21:20 bzcat -> /usr/bin/lbzcat
lrwxrwxrwx 1 root root 15 Oct 23 21:19 bzip2 -> /usr/bin/lbzip2
lrwxrwxrwx 1 root root 15 Oct 23 21:19 gunzip -> /usr/bin/unpigz
lrwxrwxrwx 1 root root 13 Oct 23 21:19 gzip -> /usr/bin/pigz

Thus programs like tar -cz are using multiple cores. Nevertheless file-roller seems not to use these symbolic links, but you can use xarchiver, which then uses multiple cores, too.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.