LLVM build times

Your post explains my experiences. I have "ALLOW_MAKE_JOBS=yes" & "PARALLEL_JOBS=numberofcores+1".
llvm takes 16 hours for me. But that's ok , because on the other cores other packages are being compiled simultaneously.

But in my case other ports complete compilation way before LLVM finish, so even if I take parallel jobs still LLVM will take at least 12 to 14 hours more.

I think both setting minimal options for the port config and using multiple threads brought down the compiling time.
 
After posting earlier today about my port upgrading practices I decided to take a look at poudriere. llvm12 seems to also only use one job for me:
[130i386-default] [2021-11-05_18h19m44s] [parallel_build:] Queued: 108 Built: 103 Failed: 0 Skipped: 0 Ignored: 0 Tobuild: 5 Time: 05:52:41
[04]: devel/llvm12 | llvm12-12.0.1_6 build (05:04:48 / 05:17:12)
[05:53:15] Logs: /usr/local/poudriere/data/logs/bulk/130i386-default/2021-11-05_18h19m44s

(Me trying to copy top output, LOL)
CPU: 25.4% user, 0.0% nice, 2.4% system, 0.7% interrupt, 71.5% idle

At one point it was building gcc10 simultaneously but GCC finished hours before, so I dunno.

Did you use the -J flag in the command line?
 
I'd rather build ports sequentially, one after another. Of course, deps need to be taken care of first. Unfortunately, make is not smart enough to balance (dependency resolving) with the idea that (several ports can be compiled at the same time on different CPU cores). And at this time, I haven't studied parallel computing enough to use terms like "parallellism" or "concurrency" with any kind of confidence that the terms are used correctly. But even with that level of knowledge, I'm seeing a conflation of what can be expected from a batch compilation, and the resulting confusion when looking at available numbers. 😩
 
I don't know anything about parallelized compilation.

But an experiment is the following.
In make.conf
Code:
MAKE_JOBS_NUMBER=555
When you do ps you will see no 555 c++ processes.
Can anyone explain.

Ooh when you put
in poudriere.conf
Code:
PARALLEL_JOBS=555
Poudriere will spawn 555 builders. ... And each builder might contain a c++ proces
 
In make.conf
Code:
MAKE_JOBS_NUMBER=555
When you do ps you will see no 555 c++ processes.
Can anyone explain.
your i7 only has 8 cores. So the -j flag can only be set to the max value of 8, not 555.


Ooh when you put
in poudriere.conf
Code:
PARALLEL_JOBS=555
Poudriere will spawn 555 builders. ... And each builder might contain a c++ proces
PARALLEL_JOBS=555 means processes will be spawned, but they will still be competing for one of your 8 cores. NOT the same thing as the -j flag.

This is why I keep saying, make is not that smart.
 
Here's some statistic of building LLVM13 with and without ccache on synth

LLVM on parallel build with rust ~39min with j4 without ccache (16GB ram / 12 vCPU 13th gen) (hyper-v guest)

1668088350386.png



standalone build of llvm13 j8 with clean ccache (24GB RAM / 24vCPU i7-13700k @ 5.4) ~50% load 8 threads (hyper-v guest)

1668088429315.png


Second build of llvm13 with ccache. (24GB RAM (5GB ccache) / 24vCPU i7-13700k @ 5.4) ~50% load 8 threads (hyper-v guest)

1668088472642.png


And here's some interesting reading for AWS

 
On my old i7-2600k @ 3.4GHz /12GB RAM the build time was ~6hours

14 hours on i7-3770 is too much maybe you have another bottleneck. I'm building on top of regular HDD in raid5 4disk/500GB WD Gold so they are not performing fast as the cheapest SSD and also slow down the build process especially if you are using poudriere with zfs.
 
Back
Top