Bugzilla (bugzilla.redhat.com) will be under maintenance for infrastructure upgrades and will not be available on July 31st between 12:30 AM - 05:30 AM UTC. We appreciate your understanding and patience. You can follow status.redhat.com for details.
Bug 588313 - rpmdev-setuptree should set a better default for %_smp_mflags in .rpmmacros
Summary: rpmdev-setuptree should set a better default for %_smp_mflags in .rpmmacros
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: rpmdevtools
Version: 13
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Ville Skyttä
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-05-03 13:14 UTC by Thorsten Leemhuis
Modified: 2010-10-08 20:44 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-05-07 11:01:21 UTC
Type: ---


Attachments (Terms of Use)

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.


Note You need to log in before you can comment on or make changes to this bug.