brave / brave-browser

Brave browser for Android, iOS, Linux, macOS, Windows.
https://brave.com
Mozilla Public License 2.0
17.53k stars 2.27k forks source link

ThinLTO cache pruning warning during Release linking #40455

Open atuchin-m opened 1 month ago

atuchin-m commented 1 month ago

Description

Both for CI and locally. This could affect performance. An example build: https://ci.brave.com/job/brave-browser-build-macos-arm64/4077/

[2024-08-13T18:43:28.609Z] [1 processes, 71461/71679 @ 8.1/s : 8851.446s ] SOLINK 'obj/chrome/chrome_framework_shared_library/Brave Browser Nightly Framework' 'obj/chrome/chrome_framework_shared_library/Brave Browser Nightly Framework.TOC' 'Brave Browser Nightly Framework.dSYM/Contents/Info.plist' 'Brave Browser Nightly Framework.dSYM/Contents/Resources/DWARF/Brave Browser Nightly Framework'
[2024-08-13T18:43:28.610Z] warning: ThinLTO cache pruning happens since the total size of the cache files consumed by the current link job (28801511016  bytes) exceeds maximum cache size (24326351420 bytes); consider adjusting --thinlto-cache-policy
atuchin-m commented 1 month ago

Hm, it's like the result of lacking of free disk space. The current total cache is 16GB. The policy is Limit the size of the ThinLTO cache to the lesser of 10% of available disk space, 40GB and 100000 files.

It means that the build machine should have at >160GB free space to not hit the limit. Better to have at least 200GB, otherwise we likely to hit it in the future.