Skip to content

Commit 7a544ef

Browse files
committed
add goal for rustc-perf
1 parent bf4ae18 commit 7a544ef

File tree

1 file changed

+113
-0
lines changed

1 file changed

+113
-0
lines changed

src/2025h1/perf-improvements.md

Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
# rustc-perf improvements
2+
3+
| Metadata | |
4+
| -------- | ------------------------------------------------------------ |
5+
| Owner(s) | Rust team at Arm, @kobzol |
6+
| Teams | [infra], [compiler] |
7+
| Status | Proposed |
8+
9+
*Arm's Rust team is @davidtwco, @adamgemmell, @jacobbramley, @JamieCunliffe and @Jamesbarford.
10+
This goal will be primarily worked on by @Jamesbarford, but @davidtwco can always be contacted for
11+
updates.*
12+
13+
## Summary
14+
15+
Add support to rustc-perf for distributed benchmarking across multiple platforms and configuration.
16+
17+
## Motivation
18+
19+
Improving the performance of the Rust compiler is a long-standing objective of the Rust project
20+
and compiler team, which has led to the development of the project's performance tracking
21+
infrastructure. While the performance tracking infrastructure has seen many improvements in recent
22+
years, it cannot scale to support multiple benchmarking machines simultaneously.
23+
24+
There are increasingly demands on the performance infrastructure which require a more scalable
25+
benchmarking infrastructure - benchmarking the parallel compiler with different thread counts,
26+
different codegen backends, or different architectures.
27+
28+
### The status quo
29+
30+
rustc-perf does not currently support scheduling and accepting benchmarks from multiple machines,
31+
requiring a non-trivial rearchitecting to do so. None of our policies around performance triage
32+
and handling regressions currently consider what to do in case of conflicting benchmarking results.
33+
34+
### The next 6 months
35+
36+
rustc-perf's maintainers have [written a rough draft of the work required to support multiple
37+
collectors](https://hackmd.io/X1wsQvkwQB-gb5PO7t2Czw) which will form the basis of the work
38+
completed during this goal. After aligning on a implementation plan with the upstream maintainers
39+
of rustc-perf and ensuring that the implementation can proceed while placing as little burden on
40+
the infra team as possible, the work will largely consist of:
41+
42+
1. Establish a parallel testing infrastructure to avoid any disruption to the live rustc-perf
43+
service
44+
2. Plan and implement necessary refactorings to the rustc-perf infrastructure enabling distributed
45+
benchmarking
46+
3. Writing tests for the new distributed rustc-perf infrastructure, enabling future development to
47+
avoid breakage
48+
4. Make changes to the database schema to support receiving results from multiple collectors (both
49+
being able to distinguish between results from each configuration and be have multiple writes
50+
simultaneously)
51+
5. Update queries and statistics used in summarising collected performance data and identifying
52+
outliers
53+
6. Update perf.rust-lang.org to be able to display performance data from multiple collectors and
54+
make appropriate comparisons (within a configuration, not between configurations)
55+
56+
As this work nears completion, this goal's owners will collaborate with the compiler team and its
57+
performance working group to extend and update the compiler team's triage and regression handling
58+
policies. It is important that there are clear guidelines and procedures for circumstances where a
59+
benchmark improves on one platform and regresses on another, or how to weigh benchmark results
60+
from unstable features or configurations (e.g. `-Zthreads=2`) vs the primary benchmarking platforms
61+
and configurations.
62+
63+
### The "shiny future" we are working towards
64+
65+
Following the completion of this goal, it is anticipated that new platforms and configurations
66+
will be added to rustc-perf, but this is unlikely to warrant further goals.
67+
68+
## Ownership and team asks
69+
70+
| Subgoal | Owner(s) or team(s) | Notes |
71+
| ---------------------------------------------- | ----------------------- | ----- |
72+
| Discussion and moral support | ![Team][] [infra] | |
73+
| Set-up testing infrastructure | ![Team][] [infra] | |
74+
| Improve rustc-perf | | |
75+
| ↳ Implementation | @Jamesbarford | |
76+
| ↳ Standard reviews | ![Team][] [infra] | |
77+
| Deploy rustc-perf improvements | ![Team][] [infra] | |
78+
| Update performance regression policy | ![Team][] [compiler] | |
79+
| ↳ Draft policy and discuss with team | @davidtwco | |
80+
| Inside Rust blog post announcing improvements | ![Team][] [infra] | |
81+
82+
### Definitions
83+
84+
Definitions for terms used above:
85+
86+
* *Discussion and moral support* is the lowest level offering, basically committing the team to
87+
nothing but good vibes and general support for this endeavor.
88+
* *Author RFC* and *Implementation* means actually writing the code, document, whatever.
89+
* *Design meeting* means holding a synchronous meeting to review a proposal and provide feedback
90+
(no decision expected).
91+
* *RFC decisions* means reviewing an RFC and deciding whether to accept.
92+
* *Org decisions* means reaching a decision on an organizational or policy matter.
93+
* *Secondary review* of an RFC means that the team is "tangentially" involved in the RFC and
94+
should be expected to briefly review.
95+
* *Stabilizations* means reviewing a stabilization and report and deciding whether to stabilize.
96+
* *Standard reviews* refers to reviews for PRs against the repository; these PRs are not expected
97+
to be unduly large or complicated.
98+
* *Prioritized nominations* refers to prioritized lang-team response to nominated issues, with
99+
the expectation that there will be *some* response from the next weekly triage meeting.
100+
* *Dedicated review* means identifying an individual (or group of individuals) who will review the
101+
changes, as they're expected to require significant context.
102+
* Other kinds of decisions:
103+
* [Lang team experiments](https://lang-team.rust-lang.org/how_to/experiment.html) are used
104+
to add nightly features that do not yet have an RFC. They are limited to trusted contributors
105+
and are used to resolve design details such that an RFC can be written.
106+
* Compiler [Major Change Proposal (MCP)](https://forge.rust-lang.org/compiler/mcp.html) is
107+
used to propose a 'larger than average' change and get feedback from the compiler team.
108+
* Library [API Change Proposal (ACP)](https://std-dev-guide.rust-lang.org/development/feature-lifecycle.html)
109+
describes a change to the standard library.
110+
111+
## Frequently asked questions
112+
113+
None yet.

0 commit comments

Comments
 (0)