From 6543f15a3b6d9c1f71ff30ea682d64d1c8c7a7dc Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Mon, 2 Oct 2017 11:43:57 +0200 Subject: erts: Update +IOt and msacc docs --- erts/doc/src/erl.xml | 6 +++++- erts/doc/src/erlang.xml | 15 +++++++++++---- erts/preloaded/ebin/erlang.beam | Bin 107320 -> 107328 bytes erts/preloaded/src/erlang.erl | 3 ++- lib/runtime_tools/src/msacc.erl | 3 ++- 5 files changed, 20 insertions(+), 7 deletions(-) diff --git a/erts/doc/src/erl.xml b/erts/doc/src/erl.xml index dc58cdeb13..6f6eca2a0b 100644 --- a/erts/doc/src/erl.xml +++ b/erts/doc/src/erl.xml @@ -776,6 +776,10 @@

Sets the number of IO poll threads to use when polling for I/O. The maximum number of poll threads allowed is 1024. The default is 1.

+

A good way to check if more IO poll threads are needed is to use + microstate accounting + and see what the load of the IO poll thread is. If it is high it could + be a good idea to add more threads.

+IOPp PollSetsPercentage @@ -789,7 +793,7 @@

Similar to +IOt but uses percentages to set the number of IO poll threads to create, based on - the number of schedulers configures. If both +IOPt and + the number of schedulers configured. If both +IOPt and +IOt are used, +IOPt is ignored.

diff --git a/erts/doc/src/erlang.xml b/erts/doc/src/erlang.xml index 48aac15827..0a2852b895 100644 --- a/erts/doc/src/erlang.xml +++ b/erts/doc/src/erlang.xml @@ -6456,17 +6456,24 @@ lists:map(

MSAcc_Thread_Types:

scheduler - The main execution threads that do most of the work. + The main execution threads that do most of the work. See + erl +S for more details. dirty_cpu_scheduler - The threads for long running cpu intensive work. + The threads for long running cpu intensive work. See + erl +SDcpu for more details. dirty_io_scheduler - The threads for long running I/O work. + The threads for long running I/O work. See + erl +SDio for more details. async Async threads are used by various linked-in drivers (mainly the - file drivers) do offload non-CPU intensive work. + file drivers) do offload non-CPU intensive work. See + erl +A for more details.
aux Takes care of any work that is not specifically assigned to a scheduler. + poll + Does the IO polling for the emulator. See + erl +IOt for more details.

The following MSAcc_Thread_States are available. All states are exclusive, meaning that a thread cannot be in two diff --git a/erts/preloaded/ebin/erlang.beam b/erts/preloaded/ebin/erlang.beam index e258ff5480..452f3dcc07 100644 Binary files a/erts/preloaded/ebin/erlang.beam and b/erts/preloaded/ebin/erlang.beam differ diff --git a/erts/preloaded/src/erlang.erl b/erts/preloaded/src/erlang.erl index d43fdc454c..c6c105d36a 100644 --- a/erts/preloaded/src/erlang.erl +++ b/erts/preloaded/src/erlang.erl @@ -2344,7 +2344,8 @@ spawn_opt(_Tuple) -> MSAcc_Thread :: #{ type := MSAcc_Thread_Type, id := MSAcc_Thread_Id, counters := MSAcc_Counters}, - MSAcc_Thread_Type :: scheduler | async | aux, + MSAcc_Thread_Type :: async | aux | dirty_io_scheduler + | dirty_cpu_scheduler | poll | scheduler, MSAcc_Thread_Id :: non_neg_integer(), MSAcc_Counters :: #{ MSAcc_Thread_State => non_neg_integer() }, MSAcc_Thread_State :: alloc | aux | bif | busy_wait | check_io | diff --git a/lib/runtime_tools/src/msacc.erl b/lib/runtime_tools/src/msacc.erl index 0d9b2690e5..37887cee72 100644 --- a/lib/runtime_tools/src/msacc.erl +++ b/lib/runtime_tools/src/msacc.erl @@ -46,7 +46,8 @@ system := float()}}. --type msacc_type() :: scheduler | aux | async. +-type msacc_type() :: aux | async | dirty_cpu_scheduler + | dirty_io_scheduler | poll | scheduler. -type msacc_id() :: non_neg_integer(). -type msacc_state() :: alloc | aux | bif | busy_wait | check_io | emulator | ets | gc | gc_fullsweep | nif | -- cgit v1.2.3