background_thread: add max thread count config
Looking at the thread counts in our services, jemalloc's background thread is useful, but mostly idle. Add a config option to tune down the number of threads.
This commit is contained in:
@@ -761,6 +761,18 @@ mallctl("arena." STRINGIFY(MALLCTL_ARENAS_ALL) ".decay",
|
||||
selected pthread-based platforms.</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry id="max_background_threads">
|
||||
<term>
|
||||
<mallctl>max_background_threads</mallctl>
|
||||
(<type>size_t</type>)
|
||||
<literal>rw</literal>
|
||||
</term>
|
||||
<listitem><para>Maximum number of background worker threads that will
|
||||
be created. This value is capped at <link
|
||||
linkend="opt.max_background_threads"><mallctl>opt.max_background_threads</mallctl></link> at
|
||||
startup.</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry id="config.cache_oblivious">
|
||||
<term>
|
||||
<mallctl>config.cache_oblivious</mallctl>
|
||||
@@ -1009,6 +1021,17 @@ mallctl("arena." STRINGIFY(MALLCTL_ARENAS_ALL) ".decay",
|
||||
default.</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry id="opt.max_background_threads">
|
||||
<term>
|
||||
<mallctl>opt.max_background_threads</mallctl>
|
||||
(<type>const size_t</type>)
|
||||
<literal>r-</literal>
|
||||
</term>
|
||||
<listitem><para>Maximum number of background threads that will be created
|
||||
if <link linkend="background_thread">background_thread</link> is set.
|
||||
Defaults to number of cpus.</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry id="opt.dirty_decay_ms">
|
||||
<term>
|
||||
<mallctl>opt.dirty_decay_ms</mallctl>
|
||||
|
Reference in New Issue
Block a user