Bug 588313

Summary: rpmdev-setuptree should set a better default for %_smp_mflags in .rpmmacros
Product: [Fedora] Fedora Reporter: Thorsten Leemhuis <fedora>
Component: rpmdevtoolsAssignee: Ville Skyttä <ville.skytta>
Status: CLOSED UPSTREAM QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 13CC: ville.skytta
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-05-07 11:01:21 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Thorsten Leemhuis 2010-05-03 13:14:53 UTC
Description of problem:
When rpmdev-setuptree creates a ~/.rpmmacros file than it sets "%_smp_mflags  -j3" by default -- that's not wrong, but hardly ideal these days, as quad-core CPUs are nothing unusual anymore and even hexa-core CPUs are not that expensive anymore.

I'm willing to sent a patch, but I'm not sure what the best default setting is. I tend to say it's something ugly looking like this:
 
%_smp_mflags  -j%(echo $(($(grep -c '^processor' /proc/cpuinfo 2> /dev/null || echo 4)*2)))

(there might be a better way to write this, haven't checked (yet)). 

Version-Release number of selected component (if applicable):
rpmdevtools-7.8-1.fc13.noarch

Comment 1 Ville Skyttä 2010-05-07 10:36:28 UTC
You're right, thanks for pointing this out.

http://git.fedorahosted.org/git/?p=rpmdevtools.git;a=commitdiff;h=e899bc22dad072fe0334ebfdf0b0fa439980822b

I took the same approach as rpm/redhat-rpm-config does, but modified it to return -j3 for < 3 processor machines.  WDYT?

Comment 2 Thorsten Leemhuis 2010-05-07 11:01:21 UTC
(In reply to comment #1)
> You're right, thanks for pointing this out.

I had to compile a kernel and wondered why it took so long on a hexa-core ;-)

> http://git.fedorahosted.org/git/?p=rpmdevtools.git;a=commitdiff;h=e899bc22dad072fe0334ebfdf0b0fa439980822b
> 
> I took the same approach as rpm/redhat-rpm-config does, but modified it to
> return -j3 for < 3 processor machines.  WDYT?    

Looks good, thx!

Comment 3 Fedora Update System 2010-09-27 18:47:25 UTC
rpmdevtools-7.10-1.fc13 has been submitted as an update for Fedora 13.
https://admin.fedoraproject.org/updates/rpmdevtools-7.10-1.fc13

Comment 4 Fedora Update System 2010-10-08 20:44:45 UTC
rpmdevtools-7.10-1.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.