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