From d4f67bb08dec687671929b389f172dc2988aa363 Mon Sep 17 00:00:00 2001 From: Rickard Green Date: Sat, 19 Nov 2011 01:46:54 +0100 Subject: Deprecate erlang:system_flag/2 arguments scheduler_bind_type and cpu_topology The use of erlang:system_flag(scheduler_bind_type, _) and erlang:system_flag(cpu_topology, _) have been deprecated and scheduled for removal in erts-5.10/OTP-R16. For more information see the documentation of erlang:system_flag/2. --- erts/doc/src/erl.xml | 105 +++++++++++++++++++++++---------- erts/doc/src/erlang.xml | 150 +++++++++++++++++++++++------------------------- 2 files changed, 147 insertions(+), 108 deletions(-) (limited to 'erts/doc') diff --git a/erts/doc/src/erl.xml b/erts/doc/src/erl.xml index 048ffbcd47..501b8eb176 100644 --- a/erts/doc/src/erl.xml +++ b/erts/doc/src/erl.xml @@ -658,41 +658,66 @@

u -

Same as - erlang:system_flag(scheduler_bind_type, unbound). -

+ +

unbound - Schedulers will not be bound to logical + processors, i.e., the operating system decides where the + scheduler threads execute, and when to migrate them. This is + the default.

+
ns -

Same as - erlang:system_flag(scheduler_bind_type, no_spread). -

+ +

no_spread - Schedulers with close scheduler + identifiers will be bound as close as possible in hardware.

+
ts -

Same as - erlang:system_flag(scheduler_bind_type, thread_spread). -

+ +

thread_spread - Thread refers to hardware threads + (e.g. Intels hyper-threads). Schedulers with low scheduler + identifiers, will be bound to the first hardware thread of + each core, then schedulers with higher scheduler identifiers + will be bound to the second hardware thread of each core, + etc.

+
ps -

Same as - erlang:system_flag(scheduler_bind_type, processor_spread). -

+ +

processor_spread - Schedulers will be spread like + thread_spread, but also over physical processor chips.

+
s -

Same as - erlang:system_flag(scheduler_bind_type, spread). -

+ +

spread - Schedulers will be spread as much as + possible.

+
nnts -

Same as - erlang:system_flag(scheduler_bind_type, no_node_thread_spread). -

+ +

no_node_thread_spread - Like thread_spread, + but if multiple NUMA (Non-Uniform Memory Access) nodes exists, + schedulers will be spread over one NUMA node at a time, + i.e., all logical processors of one NUMA node will be bound + to schedulers in sequence.

+
nnps -

Same as - erlang:system_flag(scheduler_bind_type, no_node_processor_spread). -

+ +

no_node_processor_spread - Like + processor_spread, but if multiple NUMA nodes exists, + schedulers will be spread over one NUMA node at a time, i.e., + all logical processors of one NUMA node will be bound to + schedulers in sequence.

+
tnnps -

Same as - erlang:system_flag(scheduler_bind_type, thread_no_node_processor_spread). -

+ +

thread_no_node_processor_spread - A combination of + thread_spread, and no_node_processor_spread. + Schedulers will be spread over hardware threads across NUMA + nodes, but schedulers will only be spread over processors + internally in one NUMA node at a time.

+
db -

Same as - erlang:system_flag(scheduler_bind_type, default_bind). -

+ +

default_bind - Binds schedulers the default way. + Currently the default is thread_no_node_processor_spread + (which might change in the future).

+

Binding of schedulers is currently only supported on newer Linux, Solaris, FreeBSD, and Windows systems.

@@ -716,8 +741,22 @@ instead. In some cases this performance penalty might be severe. If this is the case, you are advised to not bind the schedulers.

-

For more information, see - erlang:system_flag(scheduler_bind_type, SchedulerBindType). +

How schedulers are bound matters. For example, in + situations when there are fewer running processes than + schedulers online, the runtime system tries to migrate + processes to schedulers with low scheduler identifiers. + The more the schedulers are spread over the hardware, + the more resources will be available to the runtime + system in such situations. +

+

+ NOTE: If a scheduler fails to bind, this + will often be silently ignored. This since it isn't always + possible to verify valid logical processor identifiers. If + an error is reported, it will be reported to the + error_logger. If you want to verify that the + schedulers actually have bound as requested, call + erlang:system_info(scheduler_bindings).

+sct CpuTopology @@ -735,6 +774,12 @@ = | ]]> : | ]]> +

Set a user defined CPU topolgy. The user defined + CPU topology will override any automatically detected + CPU topology. The CPU topology is used when + binding schedulers to logical + processors. +

Upper-case letters signify real identifiers and lower-case letters signify fake identifiers only used for description of the topology. Identifiers passed as real identifiers may @@ -834,7 +879,7 @@ how the real CPU topology looks like is likely to decrease the performance of the runtime system.

For more information, see - erlang:system_flag(cpu_topology, CpuTopology).

+ erlang:system_info(cpu_topology).

+swt very_low|low|medium|high|very_high diff --git a/erts/doc/src/erlang.xml b/erts/doc/src/erlang.xml index ae6300a728..e28435cd29 100644 --- a/erts/doc/src/erlang.xml +++ b/erts/doc/src/erlang.xml @@ -5042,6 +5042,14 @@ true Flag, Value, OldValue -- see below + +

The + cpu_topology, + and + scheduler_bind_type + Flags are deprecated and have been scheduled for + removal in erts-5.10/OTP-R16.

+

Sets various system properties of the Erlang node. Returns the old value of the flag.

@@ -5052,6 +5060,12 @@ true
erlang:system_flag(cpu_topology, CpuTopology) +

NOTE: This argument is deprecated and + scheduled for removal in erts-5.10/OTP-R16. Instead of using + this argument you are advised to use the erl command + line argument +sct. + When this argument has been removed a final CPU topology to use + will be determined at emulator boot time.

Sets the user defined CpuTopology. The user defined CPU topology will override any automatically detected CPU topology. By passing undefined as CpuTopology @@ -5066,15 +5080,15 @@ true to rebind according to the new CPU topology.

The user defined CPU topology can also be set by passing - the +sct command + the +sct command line argument to erl.

For information on the CpuTopology type and more, see the documentation of erlang:system_info(cpu_topology), - the erl +sct - emulator flag, and - erlang:system_flag(scheduler_bind_type, How). + and the erl +sct + and +sbt + command line flags.

erlang:system_flag(fullsweep_after, Number) @@ -5150,6 +5164,12 @@ true erlang:system_flag(scheduler_bind_type, How) +

NOTE: This argument is deprecated and + scheduled for removal in erts-5.10/OTP-R16. Instead of using + this argument you are advised to use the erl command + line argument +sbt. + When this argument has been removed a final scheduler bind type + to use will be determined at emulator boot time.

Controls if and how schedulers are bound to logical processors.

When erlang:system_flag(scheduler_bind_type, How) is @@ -5171,7 +5191,8 @@ true the CPU topology needs to be known. If the runtime system fails to automatically detect the CPU topology, it can be defined. For more information on how to define the CPU topology, see - erlang:system_flag(cpu_topology, CpuTopology). + the erl +sct command + line flag.

The runtime system will by default not bind schedulers to logical processors. @@ -5189,71 +5210,42 @@ true currently be one of:

unbound - -

Schedulers will not be bound to logical processors, i.e., - the operating system decides where the scheduler threads - execute, and when to migrate them. This is the default.

-
+

Same as the erl command line argument + +sbt u. +

no_spread - -

Schedulers with close scheduler identifiers will be bound - as close as possible in hardware.

-
+

Same as the erl command line argument + +sbt ns. +

thread_spread - -

Thread refers to hardware threads (e.g. Intels - hyper-threads). Schedulers with low scheduler identifiers, - will be bound to the first hardware thread of each core, - then schedulers with higher scheduler identifiers will be - bound to the second hardware thread of each core, etc.

-
+

Same as the erl command line argument + +sbt ts. +

processor_spread - -

Schedulers will be spread like thread_spread, but - also over physical processor chips.

-
+

Same as the erl command line argument + +sbt ps. +

spread - -

Schedulers will be spread as much as possible.

-
+

Same as the erl command line argument + +sbt s. +

no_node_thread_spread - -

Like thread_spread, but if multiple NUMA - (Non-Uniform Memory Access) nodes exists, - schedulers will be spread over one NUMA node at a time, - i.e., all logical processors of one NUMA node will - be bound to schedulers in sequence.

-
+

Same as the erl command line argument + +sbt nnts. +

no_node_processor_spread - -

Like processor_spread, but if multiple NUMA - nodes exists, schedulers will be spread over one - NUMA node at a time, i.e., all logical processors of - one NUMA node will be bound to schedulers in sequence.

-
+

Same as the erl command line argument + +sbt nnps. +

thread_no_node_processor_spread - -

A combination of thread_spread, and - no_node_processor_spread. Schedulers will be - spread over hardware threads across NUMA nodes, but - schedulers will only be spread over processors internally - in one NUMA node at a time.

-
+

Same as the erl command line argument + +sbt tnnps. +

default_bind - -

Binds schedulers the default way. Currently the default - is thread_no_node_processor_spread (which might change - in the future).

-
+

Same as the erl command line argument + +sbt db. +

-

How schedulers are bound matters. For example, in - situations when there are fewer running processes than - schedulers online, the runtime system tries to migrate - processes to schedulers with low scheduler identifiers. - The more the schedulers are spread over the hardware, - the more resources will be available to the runtime - system in such situations. -

The value returned equals How before the scheduler_bind_type flag was changed.

Failure:

@@ -5272,15 +5264,15 @@ true

The scheduler bind type can also be set by passing - the +sbt command + the +sbt command line argument to erl.

For more information, see erlang:system_info(scheduler_bind_type), erlang:system_info(scheduler_bindings), - the erl +sbt - emulator flag, and - erlang:system_flag(cpu_topology, CpuTopology). + the erl +sbt + and +sct command line + flags.

erlang:system_flag(schedulers_online, SchedulersOnline) @@ -5481,10 +5473,12 @@ true

Returns the CpuTopology which currently is used by the emulator. The CPU topology is used when binding schedulers - to logical processors. The CPU topology used is the user defined - CPU topology if such exist; otherwise, the automatically - detected CPU topology if such exist. If no CPU topology - exist undefined is returned.

+ to logical processors. The CPU topology used is the + user + defined CPU topology if such exists; otherwise, the + automatically + detected CPU topology if such exists. If no CPU topology + exists, undefined is returned.

Types:

CpuTopology = LevelEntryList | undefined @@ -5531,8 +5525,8 @@ true

Returns the user defined CpuTopology. For more information see the documentation of - erlang:system_flag(cpu_topology, CpuTopology) - and the documentation of the + the erl +sct command + line flag, and the documentation of the cpu_topology argument.

@@ -5610,7 +5604,7 @@ true

Returns the value of the distribution buffer busy limit in bytes. This limit can be set on startup by passing the - +zdbbl command line + +zdbbl command line flag to erl.

fullsweep_after @@ -5812,14 +5806,13 @@ true

Returns information on how user has requested schedulers to be bound or not bound.

NOTE: Even though user has requested - schedulers to be bound via - erlang:system_flag(scheduler_bind_type, How), - they might have silently failed to bind. In order to - inspect actual scheduler bindings call + schedulers to be bound, they might have silently failed + to bind. In order to inspect actual scheduler bindings call erlang:system_info(scheduler_bindings).

For more information, see - erlang:system_flag(scheduler_bind_type, How), and + the erl +sbt + command line argument, and erlang:system_info(scheduler_bindings).

@@ -5842,7 +5835,8 @@ true

Note that only schedulers online can be bound to logical processors.

For more information, see - erlang:system_flag(scheduler_bind_type, How), + the erl +sbt + command line argument, erlang:system_info(schedulers_online).

-- cgit v1.2.3