A research-grade, kernel-near Linux performance exploration tool that demonstrates—using controlled experiments—when common assumptions about CPU, memory, and scheduling behavior are wrong.
This is not a benchmark suite. It is a measurement-pure experimental framework.
# One-time setup (builds everything, ~30 seconds)
./setup.sh
# Run quick test suite (3 experiments, ~30 seconds)
./lrc quick
# Results displayed automatically!That's it! You now have performance data.
- Interrupt Safety - Ctrl+C cleanly exits, no stray processes
- Progress Indicators - Spinners and progress bars
- Enhanced Error Handling - Clear messages with suggestions
- Overwrite Protection - Warns before overwriting results
- Time Estimates - Shows duration for each experiment
- ** Recent Results** - Displays recently run experiments
- New Commands -
version,clean,--no-color
| Document | Audience | Time | Purpose |
|---|---|---|---|
| QUICKSTART.md | Beginners | 5 min | Installation & first experiments |
| USER_GUIDE.md | All users | 20 min | Complete reference |
| DEPLOYMENT.md | Ops/admins | 15 min | Workflows & integration |
| DEMO.md | Presenters | 2 min | Demo script |
| docs/ACADEMIC_STATISTICS.md | Researchers | 30 min | Statistical methodology |
| docs/STATISTICS_QUICKREF.md | Analysts | 5 min | Robust stats cheat sheet |
New user? Start with QUICKSTART.md
Writing a paper? Read ACADEMIC_STATISTICS.md
./lrc # Launch menu
# Select experiment by number./lrc run pinned # Run specific experiment
./lrc analyze cache_hierarchy # Analyze results
./lrc quick # Quick validation
./lrc all # Run all 10 experiments
./lrc check # System configuration
./lrc list # List experimentspython3 analyze/correlate.py data/cache_hierarchy.csv
python3 analyze/hypothesis_test.py data/exp1.csv data/exp2.csv- Measurement must introduce minimal noise
- Change one variable at a time
- Prefer raw kernel signals over abstractions
- Favor reproducibility over convenience
- If the tool interferes with scheduling or cache behavior, it is wrong
- pinned - CPU affinity impact on performance
- nice_levels - Process priority effects on scheduling
- null_baseline - Quantify measurement overhead
- cache_hierarchy - L1/L2/L3/DRAM latency measurement
- cache_analysis - Cache behavior with perf counters
- latency_vs_bandwidth - Sequential vs random memory access
- numa_locality - NUMA memory placement effects
- lock_scaling - Lock contention (1,2,4,8 threads)
- syscall_overhead - System call cost measurement
- realistic_patterns - 5 mixed CPU+memory workloads
- parse.py - Statistical summary (mean, median, stddev, CV)
- classify.py - Performance classification & bottleneck detection
- outliers.py - IQR-based outlier detection
- timeseries.py - Warmup/throttling/drift detection
- compare.py - Multi-experiment comparison
- distributions.py - Histograms, percentiles, tail latency
- correlate.py - Pearson correlation matrix
- hypothesis_test.py - Statistical significance (Welch's t-test, Cohen's d)
- metadata.py - System configuration tracking
- ebpf_tracer.py - Kernel-level scheduler tracing (optional)
-
plot_all.py - Automatic plot generation for all experiments
- Smart visualization selection per experiment type
- High-quality PNG output (150 DPI)
- Summary dashboard with all results
- Zero configuration needed
-
plot_advanced.py - Advanced statistical analysis & plotting
- Violin plots with confidence intervals
- CDF and percentile analysis
- Multi-method outlier detection
- Time series decomposition
- Cross-experiment correlation matrices
- 9-panel comparison dashboard
python3 analyze/plot_all.py # Basic plots
python3 analyze/plot_advanced.py # Advanced statistical plots
make plots # Or use Makefile
make plots-advanced # Advanced plotsSee PLOTTING_GUIDE.md and ADVANCED_PLOTTING_GUIDE.md for details.
- cpu_spin - Pure compute (integer arithmetic)
- memory_stream - Sequential bandwidth measurement
- memory_random - Pointer-chasing latency
- lock_contention - Multi-threaded spinlock/mutex/atomic operations
- mixed_workload - Realistic CPU+memory patterns
- Instructions, cycles, IPC
- L1/LLC cache misses
- Branch predictions/mispredictions
- Requires:
kernel.perf_event_paranoid ≤ 1
- Statistical rigor: Welch's t-test, effect size, correlation analysis
- NUMA awareness: Multi-socket topology detection
- eBPF tracing: Kernel-level visibility (optional)
- CI/CD: GitHub Actions pipeline
- Docker: Isolated testing environment
The project maintains strict separation between two layers:
- Workloads
- Timing
- CPU pinning
- Scheduler interaction
- Raw metric collection
- Parsing raw output
- Deriving conclusions
- Presenting results clearly
- No influence on runtime behavior
C produces facts. Python produces interpretation.
linux-reality-check/
├── core/ # C: workloads + collectors
├── scenarios/ # C: execution configurations
├── data/ # Raw experiment output
├── analyze/ # Python: analysis logic
├── report/ # Python: CLI + ASCII graphs
└── docs/ # Methodology & limitations
# Build core components
cd core
make
# Run an experiment
cd ../scenarios
make
./pinned
# Analyze results
cd ../analyze
python3 parse.py ../data/latest.csv- User-space only - No kernel modules
- Minimal syscalls - None in hot paths
- Explicit control - No automatic tuning
- Reproducible - Documented methods
- Honest - Reports limitations clearly
See docs/ for:
hypothesis.md- Research questionsmethodology.md- Measurement techniqueslimitations.md- Known constraints
- Linux kernel 4.0+
- GCC with
-march=nativesupport - Python 3.8+
- Root privileges (for CPU pinning only)
MIT