diff --git a/crates/bench-harness/src/main.rs b/crates/bench-harness/src/main.rs index 0657457..413dc61 100644 --- a/crates/bench-harness/src/main.rs +++ b/crates/bench-harness/src/main.rs @@ -93,6 +93,10 @@ struct GpuState { power_limit_w: f64, power_draw_w: f64, sm_clock_mhz: f64, + /// The memory clock is a confound like the power limit: the miner never + /// touches VRAM, and a card with memory locked low gives the SMs more of + /// the same power budget (lair/quantus#10). + mem_clock_mhz: f64, temperature_c: f64, } @@ -178,7 +182,7 @@ impl Engine { fn nvidia_smi() -> Vec { let out = Command::new("nvidia-smi") .args([ - "--query-gpu=index,name,driver_version,power.limit,power.draw,clocks.sm,temperature.gpu", + "--query-gpu=index,name,driver_version,power.limit,power.draw,clocks.sm,clocks.mem,temperature.gpu", "--format=csv,noheader,nounits", ]) .output(); @@ -194,7 +198,7 @@ fn nvidia_smi() -> Vec { .lines() .filter_map(|l| { let f: Vec<&str> = l.split(',').map(str::trim).collect(); - if f.len() != 7 { + if f.len() != 8 { return None; } let num = |s: &str| s.parse::().unwrap_or(f64::NAN); @@ -205,7 +209,8 @@ fn nvidia_smi() -> Vec { power_limit_w: num(f[3]), power_draw_w: num(f[4]), sm_clock_mhz: num(f[5]), - temperature_c: num(f[6]), + mem_clock_mhz: num(f[6]), + temperature_c: num(f[7]), }) }) .collect() @@ -414,7 +419,7 @@ fn main() { }; let record = Record { - schema: 1, + schema: 2, timestamp_unix: SystemTime::now() .duration_since(UNIX_EPOCH) .map(|d| d.as_secs()) @@ -461,13 +466,14 @@ fn main() { ); for g in &record.gpu_after { println!( - "- gpu {} {}: driver {}, limit {:.0} W, draw {:.0} W, sm {:.0} MHz, {:.0} C", + "- gpu {} {}: driver {}, limit {:.0} W, draw {:.0} W, sm {:.0} MHz, mem {:.0} MHz, {:.0} C", g.index, g.name, g.driver, g.power_limit_w, g.power_draw_w, g.sm_clock_mhz, + g.mem_clock_mhz, g.temperature_c ); }