What problem does it solve?
Diagnosing slow queries, high CPU usage, and excessive memory consumption in Materialize requires the right profiling tools and invocation flags, which are easy to get wrong. This Skill provides the exact commands and workflows for CPU profiling, memory profiling, and binary size analysis of Materialize processes.
Core Features & Use Cases
- CPU Profiling with samply: Attach to a running process or record environmentd/clusterd from startup, producing Firefox Profiler-compatible flame graphs.
- Memory Profiling with heaptrack: Capture allocation data from environmentd or clusterd processes and interpret the raw output, plus memory corruption detection via MALLOC_CHECK_ and MALLOC_PERTURB_.
- Binary Size Analysis: Use nm with demangling and size sorting to identify the largest symbols in a compiled binary.
- Use Case: When a Materialize deployment shows high memory usage, run heaptrack on the environmentd process and analyze the resulting .raw.zst file to find the allocation hotspots.
Quick Start
Profile the CPU usage of my running Materialize environmentd process and show me a flame graph.