Skip to content

Commit 07753a9

Browse files
Try to reduce compiler build times
-j1 and -t12 builds take a long time (roughly 11 minutes) on production hardware, which means that the two builds currently run by perf add up to 22 minutes. This still has roughly 2-6% variance on roughly identical compilers, which is quite high. Try a -j2 -t3 build which hopefully ends up using separate physical (not just virtual) cores for each rustc, and as such introducing less variance from parallelism issues.
1 parent 6a95136 commit 07753a9

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

collector/src/bootstrap-rustc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use std::env;
33
use std::process::Command;
44

55
fn run() -> i32 {
6-
let server = Client::new(num_cpus::get()).expect("made jobserver");
6+
let server = Client::new(num_cpus::get_physical() / 2).expect("made jobserver");
77

88
let mut cmd = Command::new(env::var_os("RUSTC_PERF_REAL_RUSTC").unwrap());
99
cmd.args(env::args_os().skip(1));

collector/src/execute/rustc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ fn record(
9696
// if multiple rustcs are competing for jobserver tokens, we introduce
9797
// quite a bit of variance. Instead, we configure -j1 here, and then
9898
// full all vCPU parallelism for each rustc.
99-
.arg("-j1")
99+
.arg("-j2")
100100
.arg("compiler/rustc"),
101101
)
102102
.context("building rustc")?;

0 commit comments

Comments
 (0)