____ ____ _
/ ___|| _ \ / \
\___ \| |_) / _ \
___) | __/ ___ \
|____/|_| /_/ \_\ -- Stall-based Performance Analysis
The key insight of SPA is that drilling down the differential CPU stalls between slow and fast memory can yield accurate performance slowdown analysis whereas standalone setup cannot. SPA aims to pinpoint the specific stall sources that contribute to slowdowns, bridging the gap between architectural level and workload-level performance.
The memory performance slowdown is composed of several sections, which are defined in the paper: (1) DRAM slowdown, (2) Cache slowdown (L1/L2/L3), (3) Store slowdown, (4) Core slowdown, and (5) Other. The slowdown is mainly dominated by (1) DRAM slowdown, (2) Cache slowdown (L1/L2/L3), (3) Store slowdown, while (4) and (5) have minimal contribution on the overall slowdown.
It measures the performance counters used in the paper.
The output files are in rst for each workload suite.
The data processing files are provided in proc.
The use cases demonstrated in the paper are mainly related to CXL/remote memory performance analysis. Howerer, I believe the analysis methodology should not be limited to CXL/remote memory. Welcome to find out more use cases for this method.
-
Setup (Install packages and perf)
./setup.sh -
Go to a workload suite directory, (for example, cpu2017), run the 1st workload in the suite:
sudo ./run.sh w.txt 1Run all workloads:
sudo ./run.sh w.txtSet
PERF_INTERVAL_MODE=0inconfig.shto save one aggregate count per run inrst/aggregate. To sample the counters over time, setPERF_INTERVAL_MODE=1and configure the sampling period withPERF_INTERVAL_MS(milliseconds). The time-series results are saved inrst/interval. -
Collect the performance counters from the output files.
procprovides a basic processing code for visualizing the slowdown breakdown.- Copy the
rstto the directory whereupdate_data.pyandprocess.pyis. - Generate data files in
csv
python3 update_data.pyProcess only one mode when needed:
python3 update_data.py aggregate python3 update_data.py interval- Process the data in
csvand generate plots inplots
python3 process.pyProcess only one mode when needed:
python3 process.py aggregate python3 process.py intervalThe aggregate plot is generated in
plots/aggregate. Interval plots are generated for each workload inplots/interval; use--binsto set the number of instruction intervals (default:200):python3 process.py interval --bins 100 - Copy the
- The
run.shfiles run each workload once on local (NUMA node0) and once on remote (NUMA node1). The default remote NUMA node is set as1. For the remote memory other than NUMA node1in multi-nodes servers, set--membind 1to other values.