GreptimeTeam / greptimedb

An open-source, cloud-native, unified time series database for metrics, logs and events with SQL/PromQL supported. Available on GreptimeCloud.
https://greptime.com/
Apache License 2.0
4.2k stars 301 forks source link

Enable mem-prof feature by default #3166

Open v0y4g3r opened 8 months ago

v0y4g3r commented 8 months ago

What type of enhancement is this?

Configuration, User experience

What does the enhancement do?

mem-prof feature is disabled by default. When users encounter memory related issues, a recompilation is requried to do memory analysis. We may set mem-prof as default feature so that users only need to export MALLOC_CONF=prof:true and restart GreptimeDB instance.

Implementation challenges

Not much work to implement this, but I wonder if there's any security concern. Did a simple research but I didn't find any CVE related to jemalloc's profiling feature.

evenyag commented 8 months ago

Will it be a problem when we want to disable jemalloc? We should provide a way to disable jemalloc if we enable the mem-prof handler by default.