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

Bug 507840

Summary: sys-apps/portage: FEATURES=distcc uses different DISTCC_DIRs unnecessarily when PORTAGE_TMPDIR changes
Product: Portage Development Reporter: Michał Górny <mgorny>
Component: UnclassifiedAssignee: Portage team <dev-portage>
Status: CONFIRMED ---    
Severity: normal CC: cluster
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-04-16 18:00:40 UTC
With FEATURES=distcc, portage creates DISTCC_DIR as $PORTAGE_TMPDIR/.distcc. When different values of PORTAGE_TMPDIR are used (e.g. set via package.env for packages that need more build space than /tmp offers), this results in two different DISTCC_DIRs being used.

Since DISTCC_DIR contains lock files that are used to limit the number of jobs distcc spawns, using two separate directories in parallel builds results in unexpectedly spawning double the expected number of compiler jobs which is bad for performance and memory consumption.

I don't feel like there's a good reason to place DISTCC_DIR in $PORTAGE_TMPDIR. Wouldn't it be better to use a shared location, e.g. /run/distcc?
Comment 1 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-04-16 18:01:30 UTC
(CC-ing distcc maintainers in case they have an opinion on the shared DISTCC_DIR idea)