On Sat, Sep 24, 2016 at 10:52 AM, Markus Trippelsdorf
<mar...@trippelsdorf.de> wrote:
> On 2016.09.23 at 15:29 +0200, Richard Biener wrote:
>> >
>> > So 50000 looks too big to me.
>>
>> I think the issue is that the default number of partitions is too high
>> (32) which pessimizes 4-core machines if the units are too small.
>
> The more partitions are used the less memory is required at LTRANS time.
>
> If for example you limit partitions to 4 on a 4-core machine with 8GB
> memory, you would start swapping when building Firefox.
>
> And even lto-partitions=8 is slower than the default of 32:
>
> (Firefox libxul build times with gcc-6.)
>
> --param=lto-partitions=8 -flto=4:
> 1670.19s user 23.39s system 305% cpu 9:14.13 total
>
> default -flto=4:
> 1668.94s user 32.51s system 320% cpu 8:50.36 total
>
> If someone wants fewer partitions he can use -flto-partition=one/none
> or --param=lto-partitions=1.

I know all this.  But then we seem to be stuck at 32 partitions from
an input size of 32 * lto-partition-min up to 32 * lto-partition-max
which is currently two orders of magnitude of difference in input size!

That can't be a good heuristic.

It's also about temporary disk space of which we use more the more
partitions we use (because we essentially duplicate the whole global
types/decls section for each partition).

I'm not saying increasing lto-partition-min is the best solution but it
certainly looks like the most appealing one to me.

Richard.

> --
> Markus

Reply via email to