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
Decision gist · record as of 2026-07-28
memory-benchmark profiles SQL workload memory usage across WAL and MVCC journal modes using dhat heap tracking. 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.
Use it when
- memory-benchmark analyzes heap allocations using dhat output to identify memory hotspots and allocation pressure points.
- memory-benchmark benchmarks and profiles memory usage of SQL workloads under both WAL and MVCC modes.
Verify before relying
Read SKILL.md below before installing (1 file). Open directory: indexed for reading, not audited.
Install
tursodatabase/turso/memory-benchmark · repository language: Rust
Open directory. Skills are indexed for reading, not audited. Review a skill's body before installing it.
Frequently 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)
File tree — 1 file
.claude/skills/memory-benchmark/SKILL.md
Let your AI agent find skills like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 56,283 agent skills by what they can do, searchable in plain language.
wish › “Benchmark and profile memory usage of SQL workloads under WAL and MVCC modes”
Give your agent the search over MCP, or paste the wish link into any chat. No install? Search from any chat →
Related skills
This skill documents Turso's experimental Multi-Version Concurrency Control system, which allows readers and writers to operate simultaneously without blocking through row-level snapshot isolation. It covers enabling MVCC via pragma, the versioning model tracking begin/end timestamps, and the architecture built on lock-free data structures. The guide also details checkpointing behavior, current limitations like garbage collection and recovery gaps, and testing patterns for MVCC-enabled code.
yield-injections provides test-only infrastructure for injecting cooperative yields and synthetic failures into resumable state machines. Use it to test state-machine re-entry safety, interleaving behavior, and abandonment cleanup by marking yield points and controlling when they fire. Includes fixed injectors for unit tests and simulator support for randomized deterministic coverage.
This skill guides you through configuring benchmarks and integrating CodSpeed into your project. It covers language-specific harnesses (divan, criterion, pytest-benchmark, vitest, go test, Google Benchmark) and a universal exec mode for any language, helping you identify performance-critical code and establish repeatable performance tracking.
This skill acts as an autonomous performance engineer, using CodSpeed benchmarks and flamegraph analysis to iteratively optimize code. It measures baseline performance, identifies bottlenecks through flame graphs, applies targeted changes, and validates improvements across simulation and walltime modes. The skill handles the full optimization loop—from establishing baselines to comparing runs and reporting gains—stopping only when significant improvements plateau or the user decides to halt.
This guide explains Turso's Write-Ahead Logging system, covering how transactions are written, read, and checkpointed back to the main database file. It details the concurrency model where one writer coexists with multiple readers, checkpoint strategies from passive to truncate modes, and the recovery process after crashes. The guide also maps Turso's implementation to its core storage layer, distinguishing per-connection state from shared WAL structures.
This skill provides systematic performance analysis for the RTK CLI tool, measuring startup time against a <10ms target, memory usage under 5MB, and token savings between 60–90%. It includes baseline capture, regression detection with flamegraph profiling, and common optimization techniques like LazyLock initialization and zero-copy string processing.
More skills turso-db (MIT) · debugging (MIT)