News: 0001574370

  ARM Give a man a fire and he's warm for a day, but set fire to him and he's warm for the rest of his life (Terry Pratchett, Jingo)

GCC 16 Increasing Its Default LTO Partition Count Due To Today's High Core Count CPUs

([GNU] 3 Hours Ago Link Time Optimizations)


GCC's --param lto-partitions= compiler flag is used for controlling the number of partitions used during Link Time Optimization (LTO). It had defaulted to 128 for a number of years but given today's rising core counts especially for servers and HEDT/workstation processors, that default partition count is being quadrupled.

GNU Compiler Collection developer Jan Hubicka has raised the default LTO partition size for next year's GCC 16 compiler release. Users can easily override the value via the --param lto-partitions= compiler flag but given today's increasingly high core count systems, the default is shifting from 128 to 512.

Hubicka reasoned in [1]the commit bumping the default size:

"Increase default number of LTO partitions

The number of LTO partitions should exceed number of CPUs (or hyper-threads) of commonly used CPUs. I think it is time to increase it again and as discussed in the LTO and toplevel asm thread, doing so scales quite well. Tmp file usage grows from 2.7 to 2.9MB which seems acceptable. Overall build time on machine with 256 hyperthreads is comparable."

By increasing the default LTO partition count there will be greater parallelism in splitting the LTO process into smaller elements.

With the likes of the [2]Threadripper 9995WX featuring 96 cores / 192 threads for workstations and the [3]EPYC 9965 hitting 192 cores / 384 threads per socket, it was well past time for increasing the default number of LTO partitions since 128. We'll see how long this 512 default value lasts with next-gen processors expected to push core counts even higher.



[1] https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=7e2fdee3e29019b10251d85880053170154776de

[2] https://www.phoronix.com/review/amd-threadripper-9995wx-trx50

[3] https://www.phoronix.com/search/EPYC+9965



edxposed

caligula

Kjell

intelfx

fulalas

There was once a programmer who worked upon microprocessors. "Look at
how well off I am here," he said to a mainframe programmer who came to visit,
"I have my own operating system and file storage device. I do not have to
share my resources with anyone. The software is self-consistent and
easy-to-use. Why do you not quit your present job and join me here?"
The mainframe programmer then began to describe his system to his
friend, saying: "The mainframe sits like an ancient sage meditating in the
midst of the data center. Its disk drives lie end-to-end like a great ocean
of machinery. The software is a multi-faceted as a diamond and as convoluted
as a primeval jungle. The programs, each unique, move through the system
like a swift-flowing river. That is why I am happy where I am."
The microcomputer programmer, upon hearing this, fell silent. But the
two programmers remained friends until the end of their days.
-- Geoffrey James, "The Tao of Programming"