Re: Multi-Threaded make

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Thu, 29 Nov 2012, David G. Miller wrote:

> Setting -j to be equal to the number of cores/CPUs is just playing it 
> safe.
Yes, this is the default behavior of rpmbuild:

%_smp_mflags is defined in /usr/lib/rpm/redhat/macros:

%_smp_mflags %([ -z "$RPM_BUILD_NCPUS" ] \\\
	&& RPM_BUILD_NCPUS="`/usr/bin/getconf _NPROCESSORS_ONLN`"; \\\
        if [ "$RPM_BUILD_NCPUS" -gt 16 ]; then echo "-j16"; \\\
        elif [ "$RPM_BUILD_NCPUS" -gt 1 ]; then echo "-j$RPM_BUILD_NCPUS"; fi)

> This is especially true when building a rpm which involves not just 
> compiles and link but also packaging, dependency resolution and 
> documentation tasks which are even more disk I/O intensive than 
> compiles.  Chances are that several of these operations that not 
> dependent on successfully compiling the code are fired off in parallel 
> rather than doing them sequentially and that old workhorse make gets the 
> task of managing each of these tasks.
I disagree with you here. You build a rpm in stages: "%prep", "%build", 
"%install", "list check for %files" and packaging (dependency 
resolution/debug-info/etc). Each stage is dependent on the previous one.
All the stages are run sequentially.
make (%build stage) and make install (%install stage) may run things in 
parallel. But this is something else (as I understand the process).

> Thus, you end up with multiple copies of make running at the same time 
> even on a single core/CPU system to perform these tasks.
Exactly. This is what I was trying to explain to JD( jd1008@).
make != cc1.
make can spawn more make processes which eventually can run cc1. 

Sorry but English is not my first language.

> My best results were with -j 12.
Wow! :-)


Gabriel

- -- 

// Gabriel VLASIU
//
// OpenGPG-KeyID      : 44952F15
// OpenGPG-Fingerprint: 4AC5 7C26 2FE9 02DA 4906  24B2 D32B 7ED7 4495 2F15
// OpenGPG-URL        : http://www.vlasiu.net/public.key


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iQIcBAEBAgAGBQJQt/nwAAoJENMrftdElS8VxKgP+wcnGdrorvYioNl8m/QSfROa
ZXU5e3rkbIfRPBTMNusnwTu5ngiIs9N03jTZKdrgvRftyYWrDAI+QB0JSGZfO7X4
waeI80sgDnr4Km4zluw67RLpP7h3UNQomMgYX9CSL0gsXlou5MpvxV5lO/sDM4HH
hLAa2+cL2TCf/sL6jKbSrvmCgxQhAquMrfLb3JigGUDDDW8LXqOz0yq5rl0Yu37a
ZnVJ003dGkgIxs3g27ZFmuEWQpV7nro6JGZDhYemuPGRMLK2psbCfJwpM/tG+KPZ
W9h7ZA1+J1XUmZ9T/Ejv5AFO2CiF9QG5GedjSYV2DTc0DMKwX/70iugoSpy3qa/l
y40v6+lP1UkLYjL1HpUvhcxZjIJJlt8qG/VlZwjby011S7xOZZpyOiRIy+52Gq9p
w3kEE8MciHc8rpEV11d+gKj38rTA3kLlNgb69PlGk3nvk7Ce9nD0Kpj7ZM7LE+5r
cmRn/8U5is28lq+FnSjihDKOEXCX0raFB85i/sh6nUnSyRzUPHUu8AJPnjlckJqB
WlUn5wxmaeERtzLrDOIzu3w3wstmpx/wb/rKShRBhftTXclYUCfkHF4BR2aUvGk/
5BGJ95/2qnQZryk1yaCoz8c8jsz/0iCHkeN1cjKK5DolXMxkCs4xEeZ7/cmHKOlr
jVUsu1Mp0Ri3nxGKcLf0
=NwWn
-----END PGP SIGNATURE-----
-- 
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org


[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux