From 44559e7cf179d1e9eddcc681d961e076511ee857 Mon Sep 17 00:00:00 2001 From: Qi Wang Date: Mon, 15 May 2017 13:50:42 -0700 Subject: Add documentation for background_thread related options. --- doc/jemalloc.xml.in | 78 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) diff --git a/doc/jemalloc.xml.in b/doc/jemalloc.xml.in index be018bf..57f5b0b 100644 --- a/doc/jemalloc.xml.in +++ b/doc/jemalloc.xml.in @@ -737,6 +737,25 @@ mallctl("arena." STRINGIFY(MALLCTL_ARENAS_ALL) ".decay", detecting whether another thread caused a refresh. + + + background_thread + (bool) + rw + + Enable/disable internal background worker threads. When + set to true, background threads are created on demand (the number of + background threads will be no more than the number of CPUs or active + arenas). Threads run periodically, and handle purging asynchronously. When switching + off, background threads are terminated synchronously. See stats.background_thread + for related stats. opt.background_thread + can be used to set the default option. This option is only available on + selected pthread-based platforms. + + config.cache_oblivious @@ -937,6 +956,18 @@ mallctl("arena." STRINGIFY(MALLCTL_ARENAS_ALL) ".decay", percpu. + + + opt.background_thread + (const bool) + r- + + Internal background worker threads enabled/disabled. See + background_thread for dynamic + control options and details. This option is disabled by + default. + + opt.dirty_decay_ms @@ -2158,6 +2189,39 @@ struct extent_hooks_s { + + + stats.background_thread.num_threads + (size_t) + r- + [] + + Number of background + threads running currently. + + + + + stats.background_thread.num_runs + (uint64_t) + r- + [] + + Total number of runs from all background threads. + + + + + stats.background_thread.run_interval + (uint64_t) + r- + [] + + Average run interval in nanoseconds of background threads. + + stats.mutexes.ctl.{counter}; @@ -2210,6 +2274,20 @@ struct extent_hooks_s { + + + stats.mutexes.background_thread.{counter} + (counter specific type) r- + [] + + Statistics on background_thread mutex + (global scope; background_thread + related). {counter} is one of the counters in mutex profiling + counters. + + stats.mutexes.prof.{counter} -- cgit v0.12