Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 580934

Summary: sys-apps/portage: buildpkg should support multithreaded bzip2 compressors
Product: Portage Development Reporter: Lars Wendler (Polynomial-C) (RETIRED) <polynomial-c>
Component: Enhancement/Feature RequestsAssignee: Portage team <dev-portage>
Status: RESOLVED INVALID    
Severity: normal    
Priority: Normal    
Version: 2.2   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2016-04-23 11:55:37 UTC
Running "emerge -ev --buildpkg --keep-going @world" right now shows that portage only utilizes one CPU core when creating the binpackages.
From what I see in the process list it seems portage is doing something similar like

  tar -cf ... | bzip2

which of course results in the compression being single-threaded because app-arch/bzip2 is not SMP capable.

I'd like to request the possibility to create binary packages with full utilization of as much CPU cores as possible when being on multicore systems. We already have two bzip2 compresors in the portage tree that have SMP support:

  app-arch/lbzip2
  app-arch/pbzip2
Comment 1 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2016-04-23 12:43:19 UTC
Turns out I'm just too stupid to read man pages.

mgorny told me about PORTAGE_BZIP2_COMMAND variable which indeed serves my needs.