PaCRAM: Understanding RowHammer Under Reduced Refresh Latency: Experimental Analysis of Real DRAM Chips and Implications on Future Solutions
PaCRAM is a technique that reduces the performance and energy overheads of the existing RowHammer mitigation mechanisms by carefully reducing the latency of preventive refreshes issued by existing mitigation mechanisms without compromising system security. PaCRAM leverages the key takeaway from our experimental characterization using 388 DDR4 DRAM chips from three major manufacturers. Described in the HPCA 2025 paper: https://arxiv.org/abs/2502.11745
This repo contains i) experimental characterization results and scripts to analyze them, and ii) PaCRAM implementation using Ramulator 2.0 and scripts to run and analyze evaluation results.
.
+-- DB_scripts/ # Scripts to parse and plot DRAM Bender Results
+-- Ram_scripts/ # Scripts to parse and plot Ramulator2 results
│ +-- ramulator_pacram/src # Ramulator2 source code
│ │ +-- dram/impl
│ │ │ +-- DDR5-RVRR.cpp # DDR5 implementation that supports partial charge restoration
│ │ +-- dram_controller
│ │ │ +-- impl/plugin
│ │ │ │ │ +-- pacram.h # Ramulator2 plugin that implements PaCRAM
│ │ ...
...
+-- README.md # This file
- Git
- g++ with c++20 capabilities (g++-10 or above recommended)
- Python3 (3.10 or above recommended)
- Clone the repository
git clone https://github.com/yct000/PaCRAM
- Install python dependencies, build Ramulator2, and download DRAM Bender results and traces with
./setup_all.sh
- Parse and plot DRAM Bender results
./plot_db_figures.sh
orplot_db_figures_slurm.sh
. - Prepare Ramulator2 warmup checkpoints
./prepare_warmups.sh
or./prepare_warmups_slurm.sh
. - Wait for the warmup runs to finish. You can use
python3 check_warmup_status.py
to track warmup status. If it reports any failed or not found runs, you can rerun step 2. - Run Ramulator2 simulations
./run_ramulator_all.sh
or./run_ramulator_all_slurm.sh
. - Wait for the runs to finish. You can use
python3 check_run_status.py
to track run status. If it reports any failed or not found runs, you can rerun step 4. - Parse simulation results and process them with
./parse_ram_results.sh
- Generate figures with
./plot_ram_figures.sh
Execution of Ramulator2 simulations can be configured with the following configuration parameters. These parameters reside in Ram_scripts/utils_runs.py
.
MITIGATION_LIST
: The list of tested RowHammer mitigations
NRH_VALUES
: The list of tested RowHammer threshold values
MFR_DICT
: The dictionary of charge restoration amounts for different manufacturers
While using Slurm with a cluster, Slurm parameters can be configured with the following parameters. These parameters reside in Ram_scripts/utils_slurm.py
.
MAX_SLURM_JOBS
: The maximum number of runs that the cluster can run simultaneously
SLURM_RETRY_DELAY
: The delay between retrying Slurm job submission when job limit is reached
Yahya Can Tuğrul (yahyacantugrul [at] gmail [dot] com)