alloc-profile

Analyze memory allocation profiles in collapsed stack format to identify top consumers.

1|Updated Jul 29, 2024
One-click install
npx skills add https://github.com/codacy-open-source-projects-scans/clickhouse --skill alloc-profile
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: alloc-profile
Source: https://github.com/codacy-open-source-projects-scans/clickhouse/tree/main/.claude/skills/alloc-profile
Command: npx skills add https://github.com/codacy-open-source-projects-scans/clickhouse --skill alloc-profile

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill helps developers and system administrators pinpoint memory usage issues by analyzing allocation profiles, identifying the largest memory consumers, and understanding the code paths responsible for memory allocation.

Core Features & Use Cases

  • Profile Analysis: Parses .collapsed or .folded files generated by memory profilers like jemalloc.
  • Top Allocator Identification: Lists the stack traces that consume the most memory.
  • Subsystem Grouping: Categorizes allocations by the operation that initiated them (e.g., Part Loading, Query Execution).
  • Use Case: If your application is experiencing high memory usage, you can use this Skill to analyze a heap profile, identify which parts of the code are allocating the most memory, and then focus your optimization efforts there.

Quick Start

Use the alloc-profile skill to analyze the memory allocation profile located at /path/to/my/profile.collapsed.

Frequently Asked Questions about alloc-profile

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I analyze a jemalloc memory allocation profile?

To analyze a jemalloc memory allocation profile, you parse the collapsed stack format files generated by the profiler to identify top memory consumers and understand the code paths responsible for the allocations.

How can I identify which functions are consuming the most heap memory?

You can identify the functions consuming the most heap memory by analyzing the allocation profile to list the specific stack traces that allocate the largest amounts of memory and focusing optimization efforts there.

Can I group memory allocations by their initiating operation during heap analysis?

Yes, during heap analysis you can categorize allocations by grouping them according to the specific operation that initiated them, such as Part Loading or Query Execution, to understand subsystem memory usage patterns.

What is the best way to visualize memory usage patterns from a collapsed stack file?

The best way to visualize memory usage patterns from a collapsed stack file is by generating flamegraphs, which graphically represent the stack traces and allocating functions responsible for the memory consumption.

Can I search for specific functions within stack traces during allocation analysis?

Yes, you can perform targeted searches within stack traces during allocation analysis to isolate specific allocating functions or initiating operations and understand their direct memory impact.

Do I need any external dependencies to perform memory profiling on collapsed files?

No external dependencies are required to perform memory profiling on collapsed files; the analysis operates directly on the folded stack format to identify top memory consumers and generate flamegraphs.