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 ++++++++++++++++++++++++++++++++++++---------------
1 file changed, 75 insertions(+), 30 deletions(-)
(limited to 'erts/doc/src/erl.xml')
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
-
--
cgit v1.2.3