Dockerized perf benchmarker for Monte Carlo simulation engine. More...
Go to the source code of this file.
Namespaces | |
namespace | scripts |
namespace | scripts.run_perf |
Dockerized perf benchmarker for Monte Carlo simulation engine.
Benchmarks simulation methods (SIMD, Pool, Heap, etc.) using perf stat
, and logs system performance metrics to structured logs (CSV, Parquet).
=== Metrics Logged ===
Core Execution
Time
Cache Accesses
Memory Paging
Branch Prediction
Derived
=== Compatibility Notes (L2/L3 Caveats) ===
Some performance counters are not consistently available across systems:
L2-dcache-*
, LLC-*
perf list
to verifyAlways validate support using: $ perf list | grep -i l2 $ lscpu # check microarchitecture
=== ClickHouse Integration ===
By default, results are inserted into ClickHouse at the end of each batch run. To enable this:
make init
(first time setup) or make up
(to start services)To skip ClickHouse insertion (e.g., CI, dry runs): ./run_perf.sh 50000000 SIMD insert_db=false
=== Usage === ./run_perf.sh # Run all methods with default trials, insert to DB ./run_perf.sh 50000000 # All methods, custom trials ./run_perf.sh SIMD # Single method, default trials ./run_perf.sh 50000000 Pool # Custom trials and single method ./run_perf.sh 50000000 SIMD insert_db=false # Run without inserting to ClickHouse
=== Output Files === db/logs/batch_<BATCHID>/perf_<METHOD>_<TIMESTAMP>.csv → Raw perf stat output
db/logs/batch_<BATCHID>/perf_results_<METHOD>_<TIMESTAMP>_<BATCHID>.parquet → Parsed structured metrics for that method
db/logs/batch_<BATCHID>/perf_results_all_<BATCHID>.parquet → Combined metrics across all methods (for analysis or dashboarding)
Definition in file run_perf.sh.