How long should the profiles be to use with Profile-Guided Optimization (PGO)?

134 views
Skip to first unread message

Agustin Horacio Urquiza Toledo

unread,
Jan 22, 2024, 10:21:51 AM1/22/24
to golang-nuts
Hello,

I am trying to use PGO in my project and I would like to know how well it works. I have collected 10 minutes of CPU profiling data from production. Is this enough? I’m asking because it’s very difficult to change my code in production and I want to be sure that my code, compiled with PGO, was sufficient to see an improvement.

Could someone please help me? I can’t find this information anywhere.

Thanks,
Agustin

qiulaidongfeng

unread,
Jan 23, 2024, 3:13:52 AM1/23/24
to golang-nuts
In my experience, if defult.pgo shows hot path.   30s can have a good optimization.

Agustin Horacio Urquiza Toledo

unread,
Jan 23, 2024, 5:28:36 PM1/23/24
to golang-nuts

Great, I will try with 5 minutes just in case given that the compilation overhead is null. But I have observed that the profiles converge on the hot paths and not exist difference between 2 and 5 minutes.

Thanks.
Reply all
Reply to author
Forward
0 new messages