diff options
author | DJ Delorie <dj@delorie.com> | 2017-05-11 16:44:59 -0400 |
---|---|---|
committer | DJ Delorie <dj@delorie.com> | 2017-05-11 17:09:22 -0400 |
commit | 4da80dbb06a7394581f74deae489858bf1607f90 (patch) | |
tree | 975421d6fd43ac5ffc0d9616717c9f5193631411 /manual | |
parent | 6d620560b6e21e15deeeb713af9ea52c679606e3 (diff) | |
download | glibc-4da80dbb06a7394581f74deae489858bf1607f90.tar.gz glibc-4da80dbb06a7394581f74deae489858bf1607f90.tar.xz glibc-4da80dbb06a7394581f74deae489858bf1607f90.zip |
Updates to tcache
* remove legacy environment variables * remove tcache mallopt() options * tweak size2tidx/tidx2size macros to be more accurate and consistent * add comments * tcache_max -> tcache_bins * tunables made SXID_IGNORE * dedup fastbin removal code snippets * document tunables * document probes * DeCamelCaseify
Diffstat (limited to 'manual')
-rw-r--r-- | manual/probes.texi | 19 | ||||
-rw-r--r-- | manual/tunables.texi | 34 |
2 files changed, 53 insertions, 0 deletions
diff --git a/manual/probes.texi b/manual/probes.texi index eb91c62703..96acaed206 100644 --- a/manual/probes.texi +++ b/manual/probes.texi @@ -231,6 +231,25 @@ dynamic brk/mmap thresholds. Argument @var{$arg1} and @var{$arg2} are the adjusted mmap and trim thresholds, respectively. @end deftp +@deftp Probe memory_tunable_tcache_max_bytes (int @var{$arg1}, int @var{$arg2}) +This probe is triggered when the @code{glibc.malloc.tcache_max} +tunable is set. Argument @var{$arg1} is the requested value, and +@var{$arg2} is the previous value of this tunable. +@end deftp + +@deftp Probe memory_tunable_tcache_count (int @var{$arg1}, int @var{$arg2}) +This probe is triggered when the @code{glibc.malloc.tcache_count} +tunable is set. Argument @var{$arg1} is the requested value, and +@var{$arg2} is the previous value of this tunable. +@end deftp + +@deftp Probe memory_tunable_tcache_unsorted_limit (int @var{$arg1}, int @var{$arg2}) +This probe is triggered when the +@code{glibc.malloc.tcache_unsorted_limit} tunable is set. Argument +@var{$arg1} is the requested value, and @var{$arg2} is the previous +value of this tunable. +@end deftp + @node Mathematical Function Probes @section Mathematical Function Probes diff --git a/manual/tunables.texi b/manual/tunables.texi index ac8c38fbde..b651a1d38d 100644 --- a/manual/tunables.texi +++ b/manual/tunables.texi @@ -190,3 +190,37 @@ number of arenas is determined by the number of CPU cores online. For 32-bit systems the limit is twice the number of cores online and on 64-bit systems, it is 8 times the number of cores online. @end deftp + +@deftp Tunable glibc.malloc.tcache_max +The maximum size of a request (in bytes) which may be met via the +per-thread cache. The default (and maximum) value is 1032 bytes on +64-bit systems and 516 bytes on 32-bit systems. +@end deftp + +@deftp Tunable glibc.malloc.tcache_count +The maximum number of chunks of each size to cache. The default is 7. +There is no upper limit, other than available system memory. Note +that chunks are rounded up to malloc's guaranteed alignment - this +count is per rounded size, not per user-provided size. + +The approximate maximum overhead of the per-thread cache (for each +thread, of course) is thus @code{glibc.malloc.tcache_max} (in bins, +max 64 bins) times @code{glibc.malloc.tcache_count} times the size for +each bin. With defaults, this is about 236 KB on 64-bit systems and +118 KB on 32-bit systems. +@end deftp + +@deftp Tunable glibc.malloc.tcache_unsorted_limit +When the user requests memory and the request cannot be met via the +per-thread cache, the arenas are used to meet the request. At this +time, additional chunks will be moved from existing arena lists to +pre-fill the corresponding cache. While copies from the fastbins, +smallbins, and regular bins are bounded and predictable due to the bin +sizes, copies from the unsorted bin are not bounded, and incur +additional time penalties as they need to be sorted as they're +scanned. To make scanning the unsorted list more predictable and +bounded, the user may set this tunable to limit the number of blocks +that are scanned from the unsorted list while searching for chunks to +pre-fill the per-thread cache with. The default, or when set to zero, +is no limit. +@end deftp |