From 028effe95272f91820c08e0b5d12f801ef6037c3 Mon Sep 17 00:00:00 2001 From: Ning Sun Date: Fri, 12 Sep 2025 16:30:22 +0800 Subject: [PATCH] docs: update memory profiling description doc (#6960) doc: update memory profiling description doc --- docs/how-to/how-to-profile-memory.md | 33 ++++++++++++++-------------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/docs/how-to/how-to-profile-memory.md b/docs/how-to/how-to-profile-memory.md index 6c0bea6cbc..a860c95246 100644 --- a/docs/how-to/how-to-profile-memory.md +++ b/docs/how-to/how-to-profile-memory.md @@ -30,22 +30,7 @@ curl https://raw.githubusercontent.com/brendangregg/FlameGraph/master/flamegraph ## Profiling -### Configuration - -You can control heap profiling activation through configuration. Add the following to your configuration file: - -```toml -[memory] -# Whether to enable heap profiling activation during startup. -# When enabled, heap profiling will be activated if the `MALLOC_CONF` environment variable -# is set to "prof:true,prof_active:false". The official image adds this env variable. -# Default is true. -enable_heap_profiling = true -``` - -By default, if you set `MALLOC_CONF=prof:true,prof_active:false`, the database will enable profiling during startup. You can disable this behavior by setting `enable_heap_profiling = false` in the configuration. - -### Starting with environment variables +### Enable memory profiling for greptimedb binary Start GreptimeDB instance with environment variables: @@ -57,6 +42,22 @@ MALLOC_CONF=prof:true ./target/debug/greptime standalone start _RJEM_MALLOC_CONF=prof:true ./target/debug/greptime standalone start ``` +### Memory profiling for greptimedb docker image + +We have memory profiling enabled and activated by default in our official docker +image. + +This behavior is controlled by configuration `enable_heap_profiling`: + +```toml +[memory] +# Whether to enable heap profiling activation during startup. +# Default is true. +enable_heap_profiling = true +``` + +To disable memory profiling, set `enable_heap_profiling` to `false`. + ### Memory profiling control You can control heap profiling activation using the new HTTP APIs: