Skip to main content
This topic describes how to enable and visualize the Jemalloc Heap Profile for StarRocks. Note
  • Enabling Jemalloc Heap Profiling may have an impact on StarRocks’ performance.
  • This solution is available only for StarRocks v3.1.6 and later.

Enable Jemalloc Heap Profile

Syntax:
Enabling requires the BE to have been started with prof:true in jemalloc_conf, which is the default; otherwise the statement fails. The current setting is also visible in information_schema.be_configs: query the row whose NAME is jemalloc_conf and read the prof_active option inside its VALUE. be_id: The ID of BE/CN node. You can get the ID by running SHOW BACKENDS or SHOW COMPUTE NODES. Example:
You can check whether Jemalloc Heap Profile is enabled or not by using the following syntax:
Example:
You can disable Jemalloc Heap Profile by using the following syntax:
Example:

Collect Jemalloc Heap Profile

Syntax:
Example:

Visualize Jemalloc Heap Profile

Copy the profile text you collected in the last step, and paste it to GraphvizOnline. You can then download the visualized Heap Profile. Example: Example - Visualized Heap Profile