Markus Trippelsdorf wrote: > On 2016.09.26 at 09:42 +0200, Richard Biener wrote: > > 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:
> > > 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: If certain applications swap with 8 partitions, other applications that are 4 times larger will still swap with 32 partitions, agreed? Ie. it implies the max partition size is way too large, not that 32 partitions is best. You'd set it as large as possible to avoid the overhead of having lots of partitions, but small enough so that a typical machine wouldn't swap. > Also see the comment in gcc/lto/lto-partition.c: 428 We compute the expected size of a partition as: 429 430 max (total_size / lto_partitions, min_partition_size) That looks a bit too simplistic with current default settings... So up to 32000 instructions (ie. binary size of ~130KB) it uses as many partitions as possible of 10000 insns, after that it uses 32 partitions until 32000000 instructions... Wilco