-
Notifications
You must be signed in to change notification settings - Fork 18.1k
cmd/compile, x/build/cmd/relui: update compiler's PGO profile as part of rc1 relui flow #60234
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
We discussed this in the release team meeting today. The plan is to add this as a relui step, to be performed as part of creating rc1. We can also run the step as a one-off if necessary (e.g., after any major compiler refactoring). Ideally we can shrink the profile a little. Currently it's ~350K, which is just big enough to be a little annoying to update regularly in git. cc @golang/release |
We should discuss whether to try to get it done for this cycle. On the one hand it's not very necessary, but on the other it might be best to strike while the iron is hot. |
When I did it I put GOROOT in /tmp so the file paths are short. We could probably also trim cold nodes from the profile to reduce size. |
Change https://go.dev/cl/546337 mentions this issue: |
Since the default.pgo profile is collected, there has been a lot of development and refactoring in the compiler. It's time to refresh the compiler's PGO profile. As we are in the freeze, there will probably not be many major changes to the compiler, so this should be good for Go 1.22. Profile collected by running the cmd/compile/profile.sh script on the linux-amd64-perf gomote. Benchmark results on Linux/AMD64: │ nopgo.txt │ old.txt │ new.txt │ │ sec/op │ sec/op vs base │ sec/op vs base │ Template 127.4m ± 0% 125.3m ± 0% -1.65% (p=0.000 n=20) 123.5m ± 0% -3.07% (p=0.000 n=20) Unicode 105.94m ± 0% 100.77m ± 0% -4.87% (p=0.000 n=20) 99.26m ± 0% -6.30% (p=0.000 n=20) GoTypes 798.2m ± 1% 784.4m ± 0% -1.73% (p=0.000 n=20) 769.4m ± 1% -3.61% (p=0.000 n=20) Compiler 85.10m ± 0% 82.03m ± 1% -3.61% (p=0.000 n=20) 79.77m ± 1% -6.26% (p=0.000 n=20) SSA 6.054 ± 0% 5.945 ± 0% -1.81% (p=0.000 n=20) 5.811 ± 0% -4.03% (p=0.000 n=20) Flate 75.37m ± 1% 74.11m ± 0% -1.66% (p=0.000 n=20) 73.02m ± 1% -3.12% (p=0.000 n=20) GoParser 144.6m ± 1% 141.7m ± 1% -1.95% (p=0.000 n=20) 140.5m ± 1% -2.83% (p=0.000 n=20) Reflect 312.9m ± 1% 304.9m ± 1% -2.56% (p=0.000 n=20) 300.4m ± 0% -4.00% (p=0.000 n=20) Tar 115.8m ± 0% 113.6m ± 0% -1.88% (p=0.000 n=20) 111.9m ± 1% -3.33% (p=0.000 n=20) XML 145.9m ± 1% 143.6m ± 0% -1.58% (p=0.000 n=20) 141.3m ± 1% -3.15% (p=0.000 n=20) geomean 224.1m 218.9m -2.34% 215.2m -3.98% This also shows that a stale profile (the old one) still brings a speedup, but smaller, as expected. As before, the profile is transferrable. Benchmark results on Darwin/ARM64: │ nopgo.txt │ old.txt │ new.txt │ │ sec/op │ sec/op vs base │ sec/op vs base │ Template 71.31m ± 34% 68.97m ± 1% -3.28% (p=0.000 n=20) 68.66m ± 38% -3.71% (p=0.030 n=20) Unicode 58.70m ± 1% 55.64m ± 1% -5.20% (p=0.000 n=20) 53.05m ± 1% -9.61% (p=0.000 n=20) GoTypes 422.9m ± 0% 412.7m ± 0% -2.43% (p=0.000 n=20) 406.0m ± 1% -4.01% (p=0.000 n=20) Compiler 45.89m ± 1% 42.67m ± 2% -7.00% (p=0.000 n=20) 42.96m ± 1% -6.38% (p=0.000 n=20) SSA 3.190 ± 0% 3.090 ± 0% -3.15% (p=0.000 n=20) 3.007 ± 1% -5.74% (p=0.000 n=20) Flate 42.02m ± 1% 41.09m ± 1% -2.20% (p=0.000 n=20) 40.58m ± 1% -3.43% (p=0.000 n=20) GoParser 75.75m ± 1% 73.84m ± 1% -2.52% (p=0.000 n=20) 72.66m ± 1% -4.08% (p=0.000 n=20) Reflect 163.7m ± 1% 158.1m ± 1% -3.39% (p=0.000 n=20) 155.3m ± 1% -5.10% (p=0.000 n=20) Tar 62.03m ± 1% 60.15m ± 0% -3.02% (p=0.000 n=20) 59.74m ± 1% -3.69% (p=0.000 n=20) XML 79.38m ± 1% 77.32m ± 1% -2.59% (p=0.000 n=20) 75.05m ± 2% -5.45% (p=0.000 n=20) geomean 120.9m 116.6m -3.49% 114.6m -5.14% For #60234. Change-Id: I4ead6158f835c2e69c0f51ea24d044b82a7320cb Reviewed-on: https://go-review.googlesource.com/c/go/+/546337 Reviewed-by: Dmitri Shuralyov <[email protected]> Reviewed-by: Michael Pratt <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]>
Since the default.pgo profile is collected, there has been a lot of development and refactoring in the compiler. It's time to refresh the compiler's PGO profile. As we are in the freeze, there will probably not be many major changes to the compiler, so this should be good for Go 1.22. Profile collected by running the cmd/compile/profile.sh script on the linux-amd64-perf gomote. Benchmark results on Linux/AMD64: │ nopgo.txt │ old.txt │ new.txt │ │ sec/op │ sec/op vs base │ sec/op vs base │ Template 127.4m ± 0% 125.3m ± 0% -1.65% (p=0.000 n=20) 123.5m ± 0% -3.07% (p=0.000 n=20) Unicode 105.94m ± 0% 100.77m ± 0% -4.87% (p=0.000 n=20) 99.26m ± 0% -6.30% (p=0.000 n=20) GoTypes 798.2m ± 1% 784.4m ± 0% -1.73% (p=0.000 n=20) 769.4m ± 1% -3.61% (p=0.000 n=20) Compiler 85.10m ± 0% 82.03m ± 1% -3.61% (p=0.000 n=20) 79.77m ± 1% -6.26% (p=0.000 n=20) SSA 6.054 ± 0% 5.945 ± 0% -1.81% (p=0.000 n=20) 5.811 ± 0% -4.03% (p=0.000 n=20) Flate 75.37m ± 1% 74.11m ± 0% -1.66% (p=0.000 n=20) 73.02m ± 1% -3.12% (p=0.000 n=20) GoParser 144.6m ± 1% 141.7m ± 1% -1.95% (p=0.000 n=20) 140.5m ± 1% -2.83% (p=0.000 n=20) Reflect 312.9m ± 1% 304.9m ± 1% -2.56% (p=0.000 n=20) 300.4m ± 0% -4.00% (p=0.000 n=20) Tar 115.8m ± 0% 113.6m ± 0% -1.88% (p=0.000 n=20) 111.9m ± 1% -3.33% (p=0.000 n=20) XML 145.9m ± 1% 143.6m ± 0% -1.58% (p=0.000 n=20) 141.3m ± 1% -3.15% (p=0.000 n=20) geomean 224.1m 218.9m -2.34% 215.2m -3.98% This also shows that a stale profile (the old one) still brings a speedup, but smaller, as expected. As before, the profile is transferrable. Benchmark results on Darwin/ARM64: │ nopgo.txt │ old.txt │ new.txt │ │ sec/op │ sec/op vs base │ sec/op vs base │ Template 71.31m ± 34% 68.97m ± 1% -3.28% (p=0.000 n=20) 68.66m ± 38% -3.71% (p=0.030 n=20) Unicode 58.70m ± 1% 55.64m ± 1% -5.20% (p=0.000 n=20) 53.05m ± 1% -9.61% (p=0.000 n=20) GoTypes 422.9m ± 0% 412.7m ± 0% -2.43% (p=0.000 n=20) 406.0m ± 1% -4.01% (p=0.000 n=20) Compiler 45.89m ± 1% 42.67m ± 2% -7.00% (p=0.000 n=20) 42.96m ± 1% -6.38% (p=0.000 n=20) SSA 3.190 ± 0% 3.090 ± 0% -3.15% (p=0.000 n=20) 3.007 ± 1% -5.74% (p=0.000 n=20) Flate 42.02m ± 1% 41.09m ± 1% -2.20% (p=0.000 n=20) 40.58m ± 1% -3.43% (p=0.000 n=20) GoParser 75.75m ± 1% 73.84m ± 1% -2.52% (p=0.000 n=20) 72.66m ± 1% -4.08% (p=0.000 n=20) Reflect 163.7m ± 1% 158.1m ± 1% -3.39% (p=0.000 n=20) 155.3m ± 1% -5.10% (p=0.000 n=20) Tar 62.03m ± 1% 60.15m ± 0% -3.02% (p=0.000 n=20) 59.74m ± 1% -3.69% (p=0.000 n=20) XML 79.38m ± 1% 77.32m ± 1% -2.59% (p=0.000 n=20) 75.05m ± 2% -5.45% (p=0.000 n=20) geomean 120.9m 116.6m -3.49% 114.6m -5.14% For golang#60234. Change-Id: I4ead6158f835c2e69c0f51ea24d044b82a7320cb Reviewed-on: https://go-review.googlesource.com/c/go/+/546337 Reviewed-by: Dmitri Shuralyov <[email protected]> Reviewed-by: Michael Pratt <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]>
Change https://go.dev/cl/587195 mentions this issue: |
Since last time the default.pgo profile is collected, there has been a lot of development in the compiler. It's time to refresh the compiler's PGO profile. Profile collected by running the cmd/compile/profile.sh script on the gotip-linux-amd64_c3h88-perf_vs_release gomote. Benchmark results on Linux/AMD64: │ nopgo.txt │ old.txt │ new.txt │ │ sec/op │ sec/op vs base │ sec/op vs base │ Template 120.7m ± 0% 118.1m ± 0% -2.17% (p=0.000 n=20) 116.5m ± 0% -3.46% (p=0.000 n=20) Unicode 104.59m ± 0% 99.05m ± 0% -5.29% (p=0.000 n=20) 99.30m ± 1% -5.06% (p=0.000 n=20) GoTypes 676.8m ± 0% 662.3m ± 0% -2.15% (p=0.000 n=20) 650.8m ± 0% -3.85% (p=0.000 n=20) Compiler 96.29m ± 1% 91.85m ± 1% -4.61% (p=0.000 n=20) 90.44m ± 1% -6.08% (p=0.000 n=20) SSA 5.185 ± 0% 5.038 ± 0% -2.83% (p=0.000 n=20) 4.945 ± 0% -4.64% (p=0.000 n=20) Flate 69.00m ± 0% 67.39m ± 0% -2.33% (p=0.000 n=20) 66.60m ± 0% -3.48% (p=0.000 n=20) GoParser 143.3m ± 0% 140.6m ± 1% -1.89% (p=0.000 n=20) 138.3m ± 1% -3.46% (p=0.000 n=20) Reflect 310.0m ± 1% 305.1m ± 0% -1.56% (p=0.000 n=20) 298.2m ± 1% -3.79% (p=0.000 n=20) Tar 109.5m ± 0% 107.5m ± 1% -1.79% (p=0.000 n=20) 106.0m ± 0% -3.18% (p=0.000 n=20) XML 147.6m ± 1% 144.2m ± 0% -2.31% (p=0.000 n=20) 142.0m ± 0% -3.83% (p=0.000 n=20) geomean 215.0m 209.2m -2.70% 206.2m -4.09% For #60234. Change-Id: Iee853146f120ce310c81aabfccf6e5665e6d8b65 Reviewed-on: https://go-review.googlesource.com/c/go/+/587195 LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Michael Pratt <[email protected]>
@cherrymui With CL 587195 submitted now, do you expect we might want to do another update before RC 1? When we're confident there's nothing more to do for Go 1.23 milestone, let's move this to the next. Thanks. At this point it might help to separate out work on making relui do this automatically into a dedicated x/build/cmd/relui issue, since that can happen independently of the Go release cycle. |
Currently I'm not expecting another update, but I can doublecheck before the RC, in case there are some more changes in the compiler. |
Change https://go.dev/cl/634037 mentions this issue: |
Since last time the default.pgo profile is collected, there has been a lot of development in the compiler. It's time to refresh the compiler's PGO profile. Profile collected by running the cmd/compile/profile.sh script on the gotip-linux-arm64_c4ah72-perf_vs_release gomote. Benchmark results on Linux/AMD64: │ nopgo.txt │ old.txt │ new.txt │ │ sec/op │ sec/op vs base │ sec/op vs base │ Template 112.0m ± 1% 109.7m ± 1% -2.10% (p=0.000 n=20) 110.3m ± 1% -1.55% (p=0.001 n=20) Unicode 99.39m ± 0% 94.94m ± 0% -4.49% (p=0.000 n=20) 94.33m ± 1% -5.10% (p=0.000 n=20) GoTypes 544.9m ± 0% 535.0m ± 1% -1.80% (p=0.000 n=20) 535.1m ± 0% -1.78% (p=0.000 n=20) Compiler 96.23m ± 1% 90.86m ± 1% -5.58% (p=0.000 n=20) 90.84m ± 1% -5.60% (p=0.000 n=20) SSA 3.403 ± 1% 3.273 ± 0% -3.81% (p=0.000 n=20) 3.247 ± 0% -4.57% (p=0.000 n=20) Flate 71.55m ± 0% 70.09m ± 1% -2.04% (p=0.000 n=20) 70.03m ± 1% -2.13% (p=0.000 n=20) GoParser 131.5m ± 1% 129.9m ± 1% -1.19% (p=0.000 n=20) 129.4m ± 0% -1.56% (p=0.000 n=20) Reflect 275.5m ± 1% 268.6m ± 1% -2.50% (p=0.000 n=20) 268.1m ± 1% -2.70% (p=0.000 n=20) Tar 131.6m ± 1% 128.4m ± 1% -2.37% (p=0.000 n=20) 128.8m ± 1% -2.07% (p=0.000 n=20) XML 153.7m ± 1% 150.3m ± 1% -2.26% (p=0.000 n=20) 149.7m ± 1% -2.66% (p=0.000 n=20) geomean 200.3m 194.7m -2.82% 194.4m -2.98% On Linux/ARM64: │ nopgo.txt │ old.txt │ new.txt │ │ sec/op │ sec/op vs base │ sec/op vs base │ Template 82.38m ± 1% 80.52m ± 0% -2.26% (p=0.000 n=20) 80.07m ± 1% -2.81% (p=0.000 n=20) Unicode 76.28m ± 0% 72.72m ± 0% -4.66% (p=0.000 n=20) 72.40m ± 1% -5.09% (p=0.000 n=20) GoTypes 420.7m ± 0% 412.5m ± 0% -1.95% (p=0.000 n=20) 408.1m ± 1% -3.00% (p=0.000 n=20) Compiler 69.85m ± 1% 67.40m ± 1% -3.50% (p=0.000 n=20) 66.73m ± 1% -4.47% (p=0.000 n=20) SSA 2.846 ± 0% 2.733 ± 0% -3.96% (p=0.000 n=20) 2.707 ± 0% -4.90% (p=0.000 n=20) Flate 49.14m ± 1% 47.87m ± 0% -2.58% (p=0.000 n=20) 47.53m ± 1% -3.26% (p=0.000 n=20) GoParser 97.44m ± 1% 94.96m ± 1% -2.55% (p=0.000 n=20) 94.75m ± 1% -2.76% (p=0.000 n=20) Reflect 210.5m ± 0% 205.2m ± 0% -2.50% (p=0.000 n=20) 202.5m ± 0% -3.78% (p=0.000 n=20) Tar 97.75m ± 1% 95.72m ± 1% -2.07% (p=0.000 n=20) 94.68m ± 1% -3.13% (p=0.000 n=20) XML 112.6m ± 0% 110.0m ± 0% -2.33% (p=0.000 n=20) 108.7m ± 1% -3.49% (p=0.000 n=20) geomean 150.2m 145.9m -2.84% 144.6m -3.67% For #60234. Change-Id: Ie1abc019339252cd9441a1fb1eab33a29c1dc11c Reviewed-on: https://go-review.googlesource.com/c/go/+/634037 LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Michael Pratt <[email protected]> Reviewed-by: David Chase <[email protected]>
Change https://go.dev/cl/677375 mentions this issue: |
Since last time the default.pgo profile is collected, there has been a lot of development in the compiler. It's time to refresh the compiler's PGO profile. Profile collected by running the cmd/compile/profile.sh script on the gotip-linux-amd64_c3h88-perf_vs_release gomote. Benchmark results on Linux/AMD64: │ nopgo.txt │ old.txt │ new.txt │ │ sec/op │ sec/op vs base │ sec/op vs base │ Template 110.4m ± 2% 108.4m ± 1% ~ (p=0.121 n=20) 107.8m ± 1% -2.37% (p=0.006 n=20) Unicode 98.78m ± 0% 95.16m ± 1% -3.67% (p=0.000 n=20) 93.87m ± 1% -4.98% (p=0.000 n=20) GoTypes 553.8m ± 0% 548.3m ± 0% -0.99% (p=0.000 n=20) 542.1m ± 0% -2.11% (p=0.000 n=20) Compiler 88.12m ± 1% 83.22m ± 1% -5.56% (p=0.000 n=20) 81.81m ± 1% -7.17% (p=0.000 n=20) SSA 3.592 ± 1% 3.499 ± 0% -2.58% (p=0.000 n=20) 3.445 ± 0% -4.08% (p=0.000 n=20) Flate 64.48m ± 1% 64.99m ± 1% ~ (p=0.341 n=20) 63.10m ± 2% -2.15% (p=0.000 n=20) GoParser 129.8m ± 1% 127.3m ± 1% -1.88% (p=0.004 n=20) 126.2m ± 1% -2.75% (p=0.000 n=20) Reflect 286.0m ± 1% 282.3m ± 1% -1.30% (p=0.000 n=20) 280.1m ± 1% -2.06% (p=0.000 n=20) Tar 129.3m ± 1% 128.4m ± 2% ~ (p=0.565 n=20) 126.3m ± 1% -2.32% (p=0.000 n=20) XML 152.1m ± 1% 148.2m ± 1% -2.55% (p=0.000 n=20) 147.9m ± 1% -2.79% (p=0.000 n=20) geomean 197.4m 193.4m -2.04% 190.9m -3.29% On Linux/ARM64: │ nopgo.txt │ old.txt │ new.txt │ │ sec/op │ sec/op vs base │ sec/op vs base │ Template 80.78m ± 2% 78.78m ± 1% -2.47% (p=0.000 n=20) 78.15m ± 1% -3.25% (p=0.000 n=20) Unicode 80.57m ± 1% 75.79m ± 1% -5.94% (p=0.000 n=20) 74.85m ± 0% -7.11% (p=0.000 n=20) GoTypes 426.4m ± 0% 416.1m ± 0% -2.42% (p=0.000 n=20) 411.0m ± 0% -3.62% (p=0.000 n=20) Compiler 66.54m ± 1% 64.01m ± 1% -3.79% (p=0.000 n=20) 62.86m ± 1% -5.53% (p=0.000 n=20) SSA 2.905 ± 0% 2.772 ± 0% -4.56% (p=0.000 n=20) 2.759 ± 0% -5.01% (p=0.000 n=20) Flate 46.68m ± 0% 45.40m ± 1% -2.75% (p=0.000 n=20) 45.20m ± 0% -3.16% (p=0.000 n=20) GoParser 95.17m ± 1% 93.54m ± 1% -1.71% (p=0.000 n=20) 92.50m ± 0% -2.80% (p=0.000 n=20) Reflect 212.4m ± 0% 206.6m ± 1% -2.72% (p=0.000 n=20) 205.4m ± 1% -3.31% (p=0.000 n=20) Tar 95.64m ± 1% 93.19m ± 1% -2.57% (p=0.000 n=20) 92.55m ± 0% -3.23% (p=0.000 n=20) XML 111.0m ± 0% 108.0m ± 1% -2.67% (p=0.000 n=20) 107.2m ± 1% -3.38% (p=0.000 n=20) geomean 148.9m 144.2m -3.17% 142.9m -4.05% For #60234. Change-Id: I6c4f0609ba578a2848ce6cfcc748dfdda7222182 Reviewed-on: https://go-review.googlesource.com/c/go/+/677375 Reviewed-by: David Chase <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]>
CL https://golang.org/cl/451292 adds a default profile of the compiler, so we can build the compiler with PGO. As the compiler's source code evolves, we may want to periodically update the profile.
cc @prattmic @aclements
The text was updated successfully, but these errors were encountered: