Skip to content

DCPerf: drop corrupt first perf interval from AMD report - #751

Open
charles-typ wants to merge 1 commit into
facebookresearch:v2-betafrom
charles-typ:export-D110798470-to-v2-beta
Open

DCPerf: drop corrupt first perf interval from AMD report#751
charles-typ wants to merge 1 commit into
facebookresearch:v2-betafrom
charles-typ:export-D110798470-to-v2-beta

Conversation

@charles-typ

@charles-typ charles-typ commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Summary:
On Turin , DCPerf sleepbench overall-metrics.csv reported a DRAM Read BW of ~620 GB/s — above the part's 512 GB/s physical ceiling.

Root cause: the first perf stat -I interval is corrupt. The uncore/DF memory-controller counters report a cumulative startup value on their first read, and the first interval's duration is often irregular, so its derived rate (~2,454 GB/s here, ~4.8x the max) is physically impossible. Nothing dropped or clamped that first sample before it was averaged into the summary.

Fix in perfutils/generate_amd_perf_report.py: add drop_first_interval(), called in main() after metrics are built and before aggregation/timeseries emission. It drops the first interval (num_sockets rows, one per socket) from every metric series so the summary and the timeseries stay aligned and physically meaningful. Short runs (series <= num_sockets) are left untouched to avoid collapsing to empty.

Excluding the first sample, sustained DRAM read ~252 GB/s (valid).

Differential Revision: D110798470

Summary:
On Turin (AMD EPYC 9D25 / Zen5), DCPerf `sleepbench` `overall-metrics.csv` reported a DRAM Read BW of ~620 GB/s — above the part's 512 GB/s physical ceiling.

Root cause: the first `perf stat -I` interval is corrupt. The uncore/DF memory-controller counters report a cumulative startup value on their first read, and the first interval's duration is often irregular, so its derived rate (~2,454 GB/s here, ~4.8x the max) is physically impossible. Nothing dropped or clamped that first sample before it was averaged into the summary.

Fix in `perfutils/generate_amd_perf_report.py`: add `drop_first_interval()`, called in `main()` after metrics are built and before aggregation/timeseries emission. It drops the first interval (`num_sockets` rows, one per socket) from every metric series so the summary and the timeseries stay aligned and physically meaningful. Short runs (series <= `num_sockets`) are left untouched to avoid collapsing to empty.

Excluding the first sample, sustained DRAM read ~252 GB/s (valid).

[Session trajectory link](https://www.internalfb.com/intern/devai/devmate/inspector/?id=8ff846bd-428a-4c33-8fa7-3c6264d4c96a)

Differential Revision: D110798470
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jul 7, 2026
@meta-codesync

meta-codesync Bot commented Jul 7, 2026

Copy link
Copy Markdown

@charles-typ has exported this pull request. If you are a Meta employee, you can view the originating Diff in D110798470.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. meta-exported

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant