Skip to content

Always apply memory profiler settings - #288

Merged
TheJokr merged 1 commit into
cloudflare:mainfrom
gregor-cf:gregor/always-apply-memory-profiler-settings
Oct 27, 2026
Merged

TheJokr merged 1 commit into
cloudflare:mainfrom
gregor-cf:gregor/always-apply-memory-profiler-settings

Conversation

@gregor-cf

Copy link
Copy Markdown
Contributor

When jemalloc memory profiling was enabled by _RJEM_MALLOC_CONF="prof:true", jemallocs default is start taking profile samples (because prof_active is defaulted to true by jemalloc). Buf if telemetry.memory_profiler.enabled == false, foundations did not apply any profiler settings, thus leaving profiling enabled with the default sampling rate of 512KB.

This change always applies the settings and adds tests for it. Since testing involves spawning a new process, there's a small binary to help with that.

When jemalloc memory profiling was enabled by `_RJEM_MALLOC_CONF="prof:true"`, jemallocs default is start taking profile samples (because prof_active is defaulted to true by jemalloc). Buf if `telemetry.memory_profiler.enabled == false`, foundations did not apply any profiler settings, thus leaving profiling enabled with the default sampling rate of 512KB.

This change always applies the settings and adds tests for it. Since testing involves spawning a new process, there's a small binary to help with that.
@TheJokr
TheJokr merged commit 53d4191 into cloudflare:main Oct 27, 2026
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants