memory-benchmark
memory-benchmark measures heap allocations and process memory for SQL workloads under different journal modes. It includes dhat-based allocation tracking, stack-usage analysis via the stack-report binary, and six built-in workload profiles (insert-heavy, read-heavy, mixed, scan-heavy, series-blob, update-churn) for regression detection and performance tuning.
memory-benchmark profiles SQL workload memory usage across WAL and MVCC journal modes using dhat heap tracking.
AI-generated summary based on this skill's SKILL.md
Install
tursodatabase/turso/memory-benchmark · repository language: Rust
git clone https://github.com/tursodatabase/turso
cp -r turso/.claude/skills/memory-benchmark ~/.claude/skills/memory-benchmarkFrequently asked questions
AI-generated answers based on this skill's SKILL.md and metadata
How to profile memory usage in turso with memory-benchmark?
memory-benchmark measures heap allocations and process memory for SQL workloads under different journal modes. Enable dhat-based allocation tracking by running workload profiles (insert-heavy, read-heavy, mixed, scan-heavy, series-blob, update-churn) and parsing the generated dhat-heap.json output to identify memory hotspots and allocation sites.
What does memory-benchmark track about heap allocations?
memory-benchmark analyzes heap allocations using dhat output to identify memory hotspots and allocation pressure points. It captures allocation sites, tracks where memory is being allocated during SQL execution, and compares patterns across runs to detect memory regressions in WAL and MVCC modes.
How can I compare WAL vs MVCC memory behavior?
memory-benchmark benchmarks and profiles memory usage of SQL workloads under both WAL and MVCC modes. Run the same workload profile under each journal mode, then compare heap allocations, stack usage, and process RSS memory snapshots to understand memory behavior differences between modes.
What workload profiles does memory-benchmark provide?
memory-benchmark includes six built-in workload profiles: insert-heavy, read-heavy, mixed, scan-heavy, series-blob, and update-churn. These profiles enable regression detection, performance tuning, and memory behavior analysis under different SQL execution patterns and concurrent connection scenarios.
How does memory-benchmark investigate stack usage?
memory-benchmark includes a stack-report binary that investigates stack usage and memory growth during SQL execution. This tool analyzes stack allocation patterns, helping you understand memory behavior and identify growth trends across different workload profiles and journal modes.
Can memory-benchmark detect memory regressions?
Yes, memory-benchmark detects memory regressions by comparing allocation patterns across runs. It tracks heap allocations, process memory snapshots, and stack usage metrics to identify performance degradation, helping you catch memory leaks and allocation pressure increases in your SQL workloads.
SKILL.md
rendered from the published skill — quoted content, verbatim
Memory Benchmarking & Analysis
The perf/memory crate benchmarks memory usage of SQL workloads under WAL and MVCC journal modes. It uses dhat as the global allocator to track every heap allocation, and memory-stats for process-level RSS snapshots.
It also contains a stack-report helper binary for stack-usage investigations.
That binary runs a SQL payload with the stacker feature enabled and captures
turso_stack tracing events in-process, aggregating structured tracing fields
instead of parsing stderr log text.
Location
-
(truncated - see the full file via the links below)
Read as markdown · JSON record · Browse the source repository
File tree — 1 file
.claude/skills/memory-benchmark/SKILL.md