tech-pkg archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: zig 0.17.1 ignores MAKE_JOBS
ivan%ivanpollak.com@localhost writes:
> I noticed that the latest zig version ignores the 10 cores that I've set for
> pkgsrc but rather uses all my 12 cores. I'm pretty sure that this shouldn't
> be like that.
Determining parallelism of 10 vs 12 seems very difficult, and you didn't
explain how you reached this conclusion. Did you see 12 build jobs in
ps?
I suggest that you build it with MAKE_JOBS=1 and then it will be
clearer.
It's a modern disease (in the same vein as languages thinking it's good
to have their own packaging systems and vendor things in) for
langauges/systems to think they should determine how many cpus exist and
use them. This is narcissistic of the language culture, assuming it is
the only thing that matters. Traditionally, make ran one job, and -jN
told it to run N, and this was straightforward.
In pkgsrc, we have been detecting the bad behvaior of "default
equiv-of-jN to number of CPUs" and patching it out, typically needing
language-specific mechanisms (e.g. GOMAXPROC). It is possible zig needs
this too.
I suggest that you:
- do builds with MAKE_JOBS=1 and see what happens, to confirm there
is a problem
- read zig's build documentation to see what it says
- search in zig mailinglists or whatever
- if it's not documented clearly, and running more than one thread,
file a bug with zig
- if it is documented clearly and there is a way to set parallelism,
then either edit it into the Makefile or send a very concise
statement of what to do here
> Also the package takes quite some while for the installation
> process (and also all the 12 cores). This seems a bit weird because I thought
> that installing something most times is just copying files over to another
> directory, I might be wrong about this though.
In general install can be parallelized too. You are saying "takes all
the 12 cores", but that sounds funny to me as install should be mostly
IO bound. How are you determining this? ("Load Average" is some
combination of running/runnable processes including those blocked on
IO.)
Home |
Main Index |
Thread Index |
Old Index