1 |
On Fri, Jan 19, 2018 at 12:26 AM, victor romanchuk <rom@××××××××××.net> wrote: |
2 |
> local:jumbo-build:www-client/chromium: Combine source files to speed up build process. |
3 |
> |
4 |
> setting that significantly speeds up emerge time (tried it twice; the second attempt had the flag set) |
5 |
> |
6 |
> $ qlop -gHv -d `date +%Y-%m-%d` chromium |
7 |
> chromium-63.0.3239.132: Fri Jan 19 03:15:43 2018: 1 hour, 47 minutes, 28 seconds |
8 |
> chromium-63.0.3239.132: Fri Jan 19 06:11:06 2018: 1 hour, 16 minutes, 14 seconds |
9 |
> chromium: 2 times |
10 |
> |
11 |
|
12 |
There is a CPU-memory tradeoff here. Combining source files reduces |
13 |
duplication of #include directives which greatly cuts down on the |
14 |
number of lines of code going into the compiler, but the individual |
15 |
files being compiled are larger. |
16 |
|
17 |
I have a 12 SMT-core Ryzen 5-1600, and 16GB of RAM. I can't even |
18 |
build chromium on a tmpfs because the RAM+space requirements have |
19 |
grown, so I build on an SSD. Even without the tmpfs I have to reduce |
20 |
make to -j11 or it will OOM during a build WITHOUT the jumbo-build |
21 |
flag. So, I'm already hitting RAM limitations on build time. |
22 |
|
23 |
That said, I've experimented with some build times and I found that I |
24 |
can build chromium faster with -j8 using jumbo-build (the max # jobs I |
25 |
can run reliably without OOM) than I can build it with -j11 without |
26 |
using the new feature. I'll also note that to do this I have to make |
27 |
sure nothing else is compiling at the same time, and sometimes I end |
28 |
up stopping a container that runs mono for good measure. |
29 |
|
30 |
I do use ccache in general with chromium but I did my benchmarking without it. |
31 |
|
32 |
I suggest experimenting with jumbo-build, and consider reducing |
33 |
parallel jobs if you run into OOM, but depending on your system you |
34 |
might find it not worth the trouble. |
35 |
|
36 |
One thing I haven't experimented with is reducing -j even further and |
37 |
then moving back to a tmpfs. I could easily see a tmpfs for building |
38 |
outperforming jumbo-build even if I end up at -j4 or less. Then |
39 |
again, the SSD probably isn't as bad a drag as a spinning disk would |
40 |
be. |
41 |
|
42 |
I was chatting with somebody (I think on reddit) who mentioned |
43 |
jumbo-build worked fine on a threadripper with 64GB of RAM (that would |
44 |
be -j32 I suppose). I bet that with even a few more GB of RAM I could |
45 |
probably max out my 12 SMT cores. |
46 |
|
47 |
I can't wait to see how chromium-64 behaves. The RAM requirements |
48 |
have been steadily going up. I have an older system with only 4GB RAM |
49 |
and it struggles to even build chromium at all. |
50 |
|
51 |
-- |
52 |
Rich |