aboutsummaryrefslogtreecommitdiffstats
path: root/doc/jemalloc.xml.in
diff options
context:
space:
mode:
authorQi Wang <interwq@gwu.edu>2017-11-09 13:51:39 -0800
committerQi Wang <interwq@gmail.com>2017-11-16 15:32:02 -0800
commitfac706836ffda46759914508b918e8b54c8020c8 (patch)
treedd99c6e68c7d34559d7f90a433aec0529b22e6f9 /doc/jemalloc.xml.in
parent282a3faa1784783e2e2cb3698183927b3927b950 (diff)
downloadplatform_external_jemalloc_new-fac706836ffda46759914508b918e8b54c8020c8.tar.gz
platform_external_jemalloc_new-fac706836ffda46759914508b918e8b54c8020c8.tar.bz2
platform_external_jemalloc_new-fac706836ffda46759914508b918e8b54c8020c8.zip
Add opt.lg_extent_max_active_fit
When allocating from dirty extents (which we always prefer if available), large active extents can get split even if the new allocation is much smaller, in which case the introduced fragmentation causes high long term damage. This new option controls the threshold to reuse and split an existing active extent. We avoid using a large extent for much smaller sizes, in order to reduce fragmentation. In some workload, adding the threshold improves virtual memory usage by >10x.
Diffstat (limited to 'doc/jemalloc.xml.in')
-rw-r--r--doc/jemalloc.xml.in16
1 files changed, 16 insertions, 0 deletions
diff --git a/doc/jemalloc.xml.in b/doc/jemalloc.xml.in
index 895b2d4d..3f9ba201 100644
--- a/doc/jemalloc.xml.in
+++ b/doc/jemalloc.xml.in
@@ -1069,6 +1069,22 @@ mallctl("arena." STRINGIFY(MALLCTL_ARENAS_ALL) ".decay",
for related dynamic control options.</para></listitem>
</varlistentry>
+ <varlistentry id="opt.lg_extent_max_active_fit">
+ <term>
+ <mallctl>opt.lg_extent_max_active_fit</mallctl>
+ (<type>size_t</type>)
+ <literal>r-</literal>
+ </term>
+ <listitem><para>When reusing dirty extents, this determines the (log
+ base 2 of the) maximum ratio between the size of the active extent
+ selected (to split off from) and the size of the requested allocation.
+ This prevents the splitting of large active extents for smaller
+ allocations, which can reduce fragmentation over the long run
+ (especially for non-active extents). Lower value may reduce
+ fragmentation, at the cost of extra active extents. The default value
+ is 6, which gives a maximum ratio of 64 (2^6).</para></listitem>
+ </varlistentry>
+
<varlistentry id="opt.stats_print">
<term>
<mallctl>opt.stats_print</mallctl>