Skip to contentSkip to conversation

Performance regression (binutils and gold)

DISCUSSION Richard Purdie 3 participants 3 messages Apr 12, 2015

lore
Share & tools
lore
#0 lore raw

To allow us to upgrade to the latest binutils we ended up enabling building of gold. Unfortunately this is clearly visible on our performance benchmarks, it leads to a 3-4 minute speed loss in overall build time :(.

Locally, benchmarks for building binutils-cross show:

Just ld:

95.87user 48.36system 1:05.66elapsed 219%CPU (0avgtext+0avgdata 162480maxresident)k
0inputs+1030184outputs (0major+7753895minor)pagefaults 0swaps

with gold:

366.22user 67.25system 1:14.29elapsed 583%CPU (0avgtext+0avgdata 435488maxresident)k
248inputs+1205792outputs (1major+12572236minor)pagefaults 0swaps richard@dax:/media/build1/poky/build2$

So whilst it only takes 10 seconds longer overall for me on what is a pretty powerful machine, you can see a huge increase in user time and CPU usage. I believe that on our slower quad core performance benchmark machine, this equates to a few minutes.

The question is therefore, do we have a better way to fix things? Is this performance drop acceptable?

Cheers,

Richard

#1 lore raw
Quoted 2 lines · Richard Purdie

The question is therefore, do we have a better way to fix things? Is this performance drop acceptable?

binutils being part of toolchains is hardly rebuilt so often in practice. it will be reused from sstate so I am less worried, what will worry me more
is if ld and gold itself have regressed in linking speed.

We can make it so that we only enable gold for cross build but it will make it more complex to remember whats enabled where

#2 lore raw
In reply to Richard Purdie
Quoted 20 lines · Richard Purdie

To allow us to upgrade to the latest binutils we ended up enabling building of gold. Unfortunately this is clearly visible on our performance benchmarks, it leads to a 3-4 minute speed loss in overall build time :(.

Locally, benchmarks for building binutils-cross show:

Just ld:

95.87user 48.36system 1:05.66elapsed 219%CPU (0avgtext+0avgdata 162480maxresident)k
0inputs+1030184outputs (0major+7753895minor)pagefaults 0swaps

with gold:

366.22user 67.25system 1:14.29elapsed 583%CPU (0avgtext+0avgdata 435488maxresident)k
248inputs+1205792outputs (1major+12572236minor)pagefaults 0swaps richard@dax:/media/build1/poky/build2$

Quoted 7 lines

So whilst it only takes 10 seconds longer overall for me on what is a pretty powerful machine, you can see a huge increase in user time and CPU usage. I believe that on our slower quad core performance benchmark machine, this equates to a few minutes.

The question is therefore, do we have a better way to fix things? Is this performance drop acceptable?

It's acceptable for me, I think most people with slower machines (with less ram) are already using ls-is-gold, so it won't make any difference for them.

Regards,

Signature · 1 line
Martin 'JaMa' Jansa     jabber: [email protected]