diff options
author | Sverker Eriksson <sverker@erlang.org> | 2021-02-19 11:48:41 +0100 |
---|---|---|
committer | Sverker Eriksson <sverker@erlang.org> | 2021-02-19 11:48:41 +0100 |
commit | 48c5923acf0c64c247312134ff858444c5618ec6 (patch) | |
tree | bcb260a338224b29e0277786937d6a030bb75189 | |
parent | ca0fe0bc549549011de2a0dc7799db1a174a64f0 (diff) | |
parent | d9814796e4a735e4a452a11389359b1c503814b5 (diff) | |
download | erlang-48c5923acf0c64c247312134ff858444c5618ec6.tar.gz |
Merge branch 'sverker/runtime_tools/scheduler-docs' into maint
OTP-17208
PR-4532
-rw-r--r-- | lib/runtime_tools/doc/src/scheduler.xml | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/lib/runtime_tools/doc/src/scheduler.xml b/lib/runtime_tools/doc/src/scheduler.xml index 713d70548b..d539ccb1c6 100644 --- a/lib/runtime_tools/doc/src/scheduler.xml +++ b/lib/runtime_tools/doc/src/scheduler.xml @@ -63,7 +63,10 @@ <taglist> <tag><c>{normal, SchedulerId, Util, Percent}</c></tag> <item>Scheduler utilization of a normal scheduler with number - <c>SchedulerId</c>.</item> + <c>SchedulerId</c>. Schedulers that are not online will also be + included. + <seeerl marker="erts:erlang#system_info_schedulers_online">Online + schedulers</seeerl> have the lowest <c>SchedulerId</c>.</item> <tag><c>{cpu, SchedulerId, Util, Percent}</c></tag> <item>Scheduler utilization of a dirty-cpu scheduler with number <c>SchedulerId</c>.</item> @@ -117,6 +120,29 @@ <p>Calculate scheduler utilizations for the time interval from when <c><anno>Sample</anno></c> was taken and "now". The same as calling <c>scheduler:utilization(Sample, scheduler:sample_all())</c>.</p> + <note> + <p> + Scheduler utilization is measured as an average value over a time + interval, calculated as the difference between two samples. To get + good useful utilization values at least a couple of seconds should + have passed between the two samples. For this reason, you should not + do + </p> +<pre> +scheduler:utilization(scheduler:sample()). % DO NOT DO THIS! +</pre> + <p> + The above example takes two samples in rapid succession and calculates + the scheduler utilization between them. The resulting values will + probably be more misleading than informative. + </p> + <p> + Instead use <seemfa marker="#utilization/1"> + <c>scheduler:utilization(Seconds)</c></seemfa> or let some time pass + between <c>Sample=scheduler:sample()</c> and + <c>scheduler:utilization(Sample)</c>. + </p> + </note> </desc> </func> |