Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RFC] xbps-src: default XBPS_MAKEJOBS to nproc #40331

Merged
merged 2 commits into from Dec 23, 2022

Conversation

classabbyamp
Copy link
Member

@classabbyamp classabbyamp commented Nov 5, 2022

previously this defaulted to 1. In some rare cases, nproc is not desirable, but that can be easily overriden in the standard ways, etc/conf or -jN.

For compatibility with other distros, it defaults to 1 when nproc is not available.

Testing the changes

  • I tested the changes in this PR: YES

previously this defaulted to 1. In some rare cases, nproc is not
desirable, but that can be easily overriden in the standard ways,
etc/conf or -jN.

For compatibility with other distros, it defaults to 1 when nproc
is not available.
@abenson
Copy link
Contributor

abenson commented Nov 5, 2022

I kind of support this. I just wonder what the default should be; all cores, some cores, or specified cores.

@dataCobra
Copy link
Contributor

Could we use the amount of cores divided by two?

I support this also, but I feel like defaulting to all cores is a bit too much?

@jcgruenhage
Copy link
Contributor

I think nproc would be a good default. I usually run with -j 16 on my laptop, and it's rarely a problem. The only times when I run into trouble is not due to CPU load either, but because I'm exhausting memory (which has been solved by going 16->64gig) or exhausting disk space.

@classabbyamp classabbyamp changed the title xbps-src: default XBPS_MAKEJOBS to nproc [RFC] xbps-src: default XBPS_MAKEJOBS to nproc Nov 5, 2022
@ahesford
Copy link
Member

ahesford commented Nov 6, 2022

I've seen plenty of historical recommendation for spawning twice as many jobs as CPUs with make, so defaulting to nproc seems reasonable. People with SMT CPUs will have the "right" value, and those without get a reduced "compromise" value.

@dataCobra
Copy link
Contributor

Most of the time I'm building stuff while doing other things on my machines. As I mentioned above I still feel like defaulting to all cores is a bit too much.

On some of my machines multi tasking would no longer be possible.

@ahesford
Copy link
Member

Compilation is I/O bound, which is why the usual recommendation is to use twice as many processes as you have CPUs. There's no need to try to get clever setting this. You can always override the parallelism if you find it too intensive, just as you have to override it now to get any parallelism.

@vincele
Copy link
Contributor

vincele commented Dec 22, 2022

Was wondering the other day why this defaults to no parallelism (void newbie here).
LGTM

@classabbyamp classabbyamp merged commit d69dc91 into void-linux:master Dec 23, 2022
@classabbyamp classabbyamp deleted the xbps-src/j-auto branch October 11, 2023 21:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
xbps-src xbps-src related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants