From 59ff0ec666601e59e504e05d3333526338f9de9b Mon Sep 17 00:00:00 2001 From: Sverker Eriksson Date: Tue, 21 May 2013 20:05:06 +0200 Subject: erts: Remove SBMBC allocator --- erts/doc/src/erts_alloc.xml | 43 +++++-------------------------------------- 1 file changed, 5 insertions(+), 38 deletions(-) (limited to 'erts/doc/src/erts_alloc.xml') diff --git a/erts/doc/src/erts_alloc.xml b/erts/doc/src/erts_alloc.xml index c73cdfd290..a95b5d7cc4 100644 --- a/erts/doc/src/erts_alloc.xml +++ b/erts/doc/src/erts_alloc.xml @@ -75,10 +75,6 @@ segments are allocated, cached segments are used if possible instead of creating new segments. This in order to reduce the number of system calls made. - sbmbc_alloc - Allocator used by other allocators for allocation of carriers - where only small blocks are placed. Currently this allocator is - disabled by default.

sys_alloc is always enabled and cannot be disabled. mseg_alloc is always enabled if it is @@ -86,9 +82,7 @@ allocators can be enabled or disabled. By default all allocators are enabled. When an allocator is disabled, sys_alloc is used instead of - the disabled allocator. sbmbc_alloc is an exception. If - sbmbc_alloc is disabled, other allocators will not handle - small blocks in separate carriers.

+ the disabled allocator.

The main idea with the erts_alloc library is to separate memory blocks that are used differently into different memory areas, and by this achieving less memory fragmentation. By @@ -106,20 +100,15 @@ following does not apply to them.

An allocator manages multiple areas, called carriers, in which memory blocks are placed. A carrier is either placed in a - separate memory segment (allocated via mseg_alloc), in - the heap segment (allocated via sys_alloc), or inside - another carrier (in case it is a carrier created by - sbmbc_alloc). Multiblock + separate memory segment (allocated via mseg_alloc), or in + the heap segment (allocated via sys_alloc). Multiblock carriers are used for storage of several blocks. Singleblock carriers are used for storage of one block. Blocks that are larger than the value of the singleblock carrier threshold (sbct) parameter are placed in singleblock carriers. Blocks that are smaller than the value of the sbct parameter are placed in multiblock - carriers. Blocks that are smaller than the small block multiblock - carrier threshold (sbmbct) - will be placed in multiblock carriers only used for small blocks. - Normally an allocator creates a "main multiblock + carriers. Normally an allocator creates a "main multiblock carrier". Main multiblock carriers are never deallocated. The size of the main multiblock carrier is determined by the value of the mmbcs parameter.

@@ -140,9 +129,7 @@ sbct parameter should be larger than the value of the lmbcs parameter, the allocator may have to create multiblock carriers that are larger than the value of the - lmbcs parameter, though. The size of multiblock carriers - for small blocks is determined by the small block multiblock - carrier size (sbmbcs). + lmbcs parameter, though. Singleblock carriers allocated via mseg_alloc are sized to whole pages.

Sizes of carriers allocated via sys_alloc are @@ -219,11 +206,6 @@ but can only satisfy a limited amount of requests.

-

- Currently only allocators using the best fit and the address order - best fit strategies are able to use "small block multi block carriers". -

-
System Flags Effecting erts_alloc @@ -245,7 +227,6 @@ the currently present allocators:

B: binary_alloc - C: sbmbc_alloc D: std_alloc E: ets_alloc F: fix_alloc @@ -416,20 +397,6 @@ smaller than this threshold will be placed in multiblock carriers. On 32-bit Unix style OS this threshold can not be set higher than 8 megabytes. - sbmbcs ]]> - - Small block multiblock carrier size (in bytes). Memory blocks smaller - than the small block multiblock carrier threshold - (sbmbct) will be placed in - multiblock carriers used for small blocks only. This parameter - determines the size of such carriers. - - sbmbct ]]> - - Small block multiblock carrier threshold (in bytes). Memory blocks - smaller than this threshold will be placed in multiblock carriers - used for small blocks only. - smbcs ]]> Smallest (mseg_alloc) multiblock carrier size (in -- cgit v1.2.3 From c86b42e40622f73bd75ca5599814648701444c6b Mon Sep 17 00:00:00 2001 From: Sverker Eriksson Date: Mon, 3 Jun 2013 14:02:16 +0200 Subject: erts: Rename allocator aoffcbf to aoffcaobf and add documentation in erts_alloc --- erts/doc/src/erts_alloc.xml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'erts/doc/src/erts_alloc.xml') diff --git a/erts/doc/src/erts_alloc.xml b/erts/doc/src/erts_alloc.xml index a95b5d7cc4..f79241d692 100644 --- a/erts/doc/src/erts_alloc.xml +++ b/erts/doc/src/erts_alloc.xml @@ -170,6 +170,15 @@ used. The time complexity is proportional to log N, where N is the number of free blocks.

+ Address order first fit carrier address order best fit + +

Strategy: Find the carrier with the lowest address that + can satisfy the requested block size, then find a block within + that carrier using the "adress order best fit" strategy.

+

Implementation: Balanced binary search trees are + used. The time complexity is proportional to log N, where + N is the number of free blocks.

+
Good fit

Strategy: Try to find the best fit, but settle for the best fit @@ -300,10 +309,11 @@ subsystem identifier, only the specific allocator identified will be effected:

- as bf|aobf|aoff|gf|af]]> + as bf|aobf|aoff|aoffcaobf|gf|af]]> Allocation strategy. Valid strategies are bf (best fit), aobf (address order best fit), aoff (address order first fit), + aoffcaobf (address order first fit carrier address order best fit), gf (good fit), and af (a fit). See the description of allocation strategies in "the alloc_util framework" section. asbcst ]]> -- cgit v1.2.3 From f91c381afa2ebed6e37b49b4cc3f81bb9ca9e3eb Mon Sep 17 00:00:00 2001 From: Rickard Green Date: Tue, 28 May 2013 11:32:50 +0200 Subject: erts: Document the +Macul command line argument --- erts/doc/src/erts_alloc.xml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to 'erts/doc/src/erts_alloc.xml') diff --git a/erts/doc/src/erts_alloc.xml b/erts/doc/src/erts_alloc.xml index f79241d692..2ffb55c6ab 100644 --- a/erts/doc/src/erts_alloc.xml +++ b/erts/doc/src/erts_alloc.xml @@ -309,6 +309,37 @@ subsystem identifier, only the specific allocator identified will be effected:

+ acul |de]]> + + Abandon carrier utilization limit. A valid + ]]> is an integer in the range + [0, 100] representing utilization in percent. When a + utilization value larger than zero is used, allocator instances + are allowed to abandon multiblock carriers. Currently the default + is zero. If de (default enabled) is passed instead of a + ]]>, a recomended non zero utilization + value will be used. The actual value chosen depend on allocator + type and may be changed between ERTS versions. Carriers will be + abandoned when memory utilization in the allocator instance falls + below the utilization value used. Once a carrier has been abandoned, + no new allocations will be made in it. When an allocator instance + gets an increased multiblock carrier need, it will first try to + fetch an abandoned carrier from an allocator instances of the same + allocator type. If no abandoned carrier could be fetched, it will + create a new empty carrier. When an abandoned carrier has been + fetched it will function as an ordinary carrier. This feature has + special requirements on the + allocation strategy used. Currently + only the aoff and the aoffcaobf strategies support + abandoned carriers. This feature also requires + multiple thread specific instances + to be enabled. When enabling this feature, multiple thread specific + instances will be enabled if not already enabled, and the + aoffcaobf strategy will be enabled if current strategy does not + support abandoned carriers. This feature can be enabled on all + allocators based on the alloc_util framework with the + exception of temp_alloc (which would be pointless). + as bf|aobf|aoff|aoffcaobf|gf|af]]> Allocation strategy. Valid strategies are bf (best fit), -- cgit v1.2.3