From 51964ac6cd3087e9e187aab15d2f83db94c5d565 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn-Egil=20Dahlberg?= Date: Thu, 7 Jan 2010 15:07:29 +0100 Subject: Add documentation for binary heap size settings. Documentation of min_heap_size and min_bin_vheap size for: * spawn_opt/2, spawn_opt/3, spawn_opt/4, spawn_opt/5 * erlang:system_flag/2 * erlang:system_info/1 * process_flag/2 * process_info/2 * erlang:trace/3 Documentation for the new beam start arguments: +hms Size, Default minimum heap size for processes. +hmbs Size, Default minimum binary virtual heap size. --- erts/doc/src/erl.xml | 7 ++++- erts/doc/src/erlang.xml | 76 ++++++++++++++++++++++++++++++++++++++++++++++--- 2 files changed, 78 insertions(+), 5 deletions(-) (limited to 'erts/doc') diff --git a/erts/doc/src/erl.xml b/erts/doc/src/erl.xml index 90a3c53a37..fc1cd13fc9 100644 --- a/erts/doc/src/erl.xml +++ b/erts/doc/src/erl.xml @@ -527,11 +527,16 @@

Calling erlang:halt/1 with a string argument will still produce a crash dump.

- +

Sets the default heap size of processes to the size .

+ + +

Sets the default binary virtual heap size of processes to the size + .

+

Enables or disables the kernel poll functionality if diff --git a/erts/doc/src/erlang.xml b/erts/doc/src/erlang.xml index 4a401156d1..28b040a441 100644 --- a/erts/doc/src/erlang.xml +++ b/erts/doc/src/erlang.xml @@ -3469,6 +3469,11 @@ os_prompt%

This changes the minimum heap size for the calling process.

+ process_flag(min_bin_vheap_size, MinBinVHeapSize) + +

This changes the minimum binary virtual heap size for the calling + process.

+
process_flag(priority, Level) @@ -3800,6 +3805,14 @@ os_prompt%

MessageQueue is a list of the messages to the process, which have not yet been processed.

+ {min_heap_size, MinHeapSize} + +

MinHeapSize is the minimum heap size for the process.

+
+ {min_bin_vheap_size, MinBinVHeapSize} + +

MinBinVHeapSize is the minimum binary virtual heap size for the process.

+
{monitored_by, Pids}

A list of pids that are monitoring the process (with @@ -4533,10 +4546,11 @@ true Create a new process with a fun as entry point Fun = fun() - Option = link | monitor | {priority, Level} | {fullsweep_after, Number} | {min_heap_size, Size} + Option = link | monitor | {priority, Level} | {fullsweep_after, Number} | {min_heap_size, Size} | {min_bin_vheap_size, VSize}  Level = low | normal | high  Number = int()  Size = int() +  VSize = int()

Returns the pid of a new process started by the application @@ -4554,10 +4568,11 @@ true Node = node() Fun = fun() - Option = link | {priority, Level} | {fullsweep_after, Number} | {min_heap_size, Size} + Option = link | {priority, Level} | {fullsweep_after, Number} | {min_heap_size, Size} | {min_bin_vheap_size, VSize}  Level = low | normal | high  Number = int()  Size = int() +  VSize = int()

Returns the pid of a new process started by the application @@ -4573,10 +4588,11 @@ true Module = Function = atom() Args = [term()] - Option = link | monitor | {priority, Level} | {fullsweep_after, Number} | {min_heap_size, Size} + Option = link | monitor | {priority, Level} | {fullsweep_after, Number} | {min_heap_size, Size} | {min_bin_vheap_size, VSize}  Level = low | normal | high  Number = int()  Size = int() +  VSize = int()

Works exactly like @@ -4656,6 +4672,23 @@ true fine-tuning an application and to measure the execution time with various Size values.

+ {min_bin_vheap_size, VSize} + +

This option is only useful for performance tuning. + In general, you should not use this option unless you + know that there is problem with execution times and/or + memory consumption, and you should measure to make sure + that the option improved matters. +

+

Gives a minimum binary virtual heap size in words. Setting this value + higher than the system default might speed up some + processes because less garbage collection is done. + Setting too high value, however, might waste memory. + Therefore, it is recommended to use this option only for + fine-tuning an application and to measure the execution + time with various VSize values.

+
+ @@ -4666,10 +4699,11 @@ true Node = node() Module = Function = atom() Args = [term()] - Option = link | {priority, Level} | {fullsweep_after, Number} | {min_heap_size, Size} + Option = link | {priority, Level} | {fullsweep_after, Number} | {min_heap_size, Size} | {min_bin_vheap_size, VSize}  Level = low | normal | high  Number = int()  Size = int() +  VSize = int()

Returns the pid of a new process started by the application @@ -5002,6 +5036,17 @@ true spawn_opt/N or process_flag/2.

+ erlang:system_flag(min_bin_vheap_size, MinBinVHeapSize) + +

Sets the default minimum binary virtual heap size for processes. The + size is given in words. The new min_bin_vhheap_size only + effects processes spawned after the change of + min_bin_vhheap_size has been made. + The min_bin_vheap_size can be set for individual + processes by use of + spawn_opt/N or + process_flag/2.

+
erlang:system_flag(multi_scheduling, BlockState) @@ -5613,6 +5658,16 @@ true

Returns a string containing the Erlang machine name.

+ min_heap_size + +

Returns {min_heap_size, MinHeapSize} where MinHeapSize is the current system wide + minimum heap size for spawned processes.

+
+ min_bin_vheap_size + +

Returns {min_bin_vheap_size, MinBinVHeapSize} where MinBinVHeapSize is the current system wide + minimum binary virtual heap size for spawned processes.

+
modified_timing_level

Returns the modified timing level (an integer) if @@ -6449,6 +6504,19 @@ true mbuf_size The combined size of message buffers associated with the process. + + bin_vheap_size + The total size of unique off-heap binaries referenced from the process heap. + bin_vheap_block_size + The total size of binaries, in words, allowed in the virtual + heap in the process before doing a garbage collection. + bin_old_vheap_size + The total size of unique off-heap binaries referenced from the process old heap. + bin_vheap_block_size + The total size of binaries, in words, allowed in the virtual + old heap in the process before doing a garbage collection. + +

All sizes are in words.

-- cgit v1.2.3