From 32ea8ba368c455afba07afd85bed6fb57879f56d Mon Sep 17 00:00:00 2001 From: Rickard Green Date: Thu, 18 May 2017 20:42:04 +0200 Subject: Make statistics/1 aware of dirty run-queues and tasks --- erts/doc/src/erlang.xml | 189 ++++++++++++++++++++++++++++++++---------------- 1 file changed, 128 insertions(+), 61 deletions(-) (limited to 'erts/doc') diff --git a/erts/doc/src/erlang.xml b/erts/doc/src/erlang.xml index 6f70ae4a52..e93e9a2658 100644 --- a/erts/doc/src/erlang.xml +++ b/erts/doc/src/erlang.xml @@ -6124,28 +6124,60 @@ true Information about active processes and ports. +

Returns the same as + + statistics(active_tasks_all) + with the exception that no information about the dirty + IO run queue and its associated schedulers is part of + the result. That is, only tasks that are expected to be + CPU bound are part of the result.

+
+ + + + + Information about active processes and ports. + +

Returns a list where each element represents the amount of active processes and ports on each run queue and its - associated scheduler. That is, the number of processes and - ports that are ready to run, or are currently running. The - element location in the list corresponds to the scheduler - and its run queue. The first element corresponds to scheduler - number 1 and so on. The information is not gathered - atomically. That is, the result is not necessarily a - consistent snapshot of the state, but instead quite - efficiently gathered.

+ associated schedulers. That is, the number of processes and + ports that are ready to run, or are currently running. + Values for normal run queues and their associated schedulers + are located first in the resulting list. The first element + corresponds to scheduler number 1 and so on. If support for + dirty schedulers exist, an element with the value for the + dirty CPU run queue and its associated dirty CPU schedulers + follow and then as last element the value for the the dirty + IO run queue and its associated dirty IO schedulers follow. + The information is not gathered atomically. That is, + the result is not necessarily a consistent snapshot of the + state, but instead quite efficiently gathered.

+

Each normal scheduler has one run queue that it + manages. If dirty schedulers schedulers are supported, all + dirty CPU schedulers share one run queue, and all dirty IO + schedulers share one run queue. That is, we have multiple + normal run queues, one dirty CPU run queue and one dirty + IO run queue. Work can not migrate between the + different types of run queues. Only work in normal run + queues can migrate to other normal run queues. This has + to be taken into account when evaluating the result.

See also statistics(total_active_tasks), - statistics(run_queue_lengths), and + statistics(run_queue_lengths), + + statistics(run_queue_lengths_all), - statistics(total_run_queue_lengths).

+ statistics(total_run_queue_lengths), and + + statistics(total_run_queue_lengths_all).

- + Information about context switches.

Returns the total number of context switches since the @@ -6154,7 +6186,7 @@ true - + Information about exact reductions. @@ -6170,7 +6202,7 @@ true - + Information about garbage collection.

Returns information about garbage collection, for example:

@@ -6182,7 +6214,7 @@ true
- + Information about I/O.

Returns Input, @@ -6193,7 +6225,7 @@ true - + Information about microstate accounting. @@ -6329,7 +6361,7 @@ lists:map( - + Information about reductions. @@ -6348,12 +6380,13 @@ lists:map( - + Information about the run-queues. -

Returns the total length of the run-queues. That is, the number +

Returns the total length of all normal run-queues. That is, the number of processes and ports that are ready to run on all available - run-queues. The information is gathered atomically. That + normal run-queues. Dirty run queues are not part of the + result. The information is gathered atomically. That is, the result is a consistent snapshot of the state, but this operation is much more expensive compared to @@ -6363,29 +6396,63 @@ lists:map( - + Information about the run-queue lengths. +

Returns the same as + + statistics(run_queue_lengths_all) + with the exception that no information about the dirty + IO run queue is part of the result. That is, only + run queues with work that is expected to be CPU bound + is part of the result.

+
+
+ + + + Information about the run-queue lengths. +

Returns a list where each element represents the amount - of processes and ports ready to run for each run queue. The - element location in the list corresponds to the run queue - of a scheduler. The first element corresponds to the run - queue of scheduler number 1 and so on. The information is - not gathered atomically. That is, the result is - not necessarily a consistent snapshot of the state, but - instead quite efficiently gathered.

+ of processes and ports ready to run for each run queue. + Values for normal run queues are located first in the + resulting list. The first element corresponds to the + normal run queue of scheduler number 1 and so on. If + support for dirty schedulers exist, values for the dirty + CPU run queue and the dirty IO run queue follow (in that + order) at the end. The information is not + gathered atomically. That is, the result is not + necessarily a consistent snapshot of the state, but + instead quite efficiently gathered.

+

Each normal scheduler has one run queue that it + manages. If dirty schedulers schedulers are supported, all + dirty CPU schedulers share one run queue, and all dirty IO + schedulers share one run queue. That is, we have multiple + normal run queues, one dirty CPU run queue and one dirty + IO run queue. Work can not migrate between the + different types of run queues. Only work in normal run + queues can migrate to other normal run queues. This has + to be taken into account when evaluating the result.

See also + + statistics(run_queue_lengths), + + statistics(total_run_queue_lengths_all), statistics(total_run_queue_lengths), - statistics(active_tasks), and + statistics(active_tasks), + + statistics(active_tasks_all), and - statistics(total_active_tasks).

+ statistics(total_active_tasks), + + statistics(total_active_tasks_all).

- + Information about runtime.

Returns information about runtime, in milliseconds.

@@ -6400,7 +6467,7 @@ lists:map(
- + Information about each schedulers work time. @@ -6521,7 +6588,7 @@ ok - + Information about each schedulers work time. @@ -6546,47 +6613,47 @@ ok - + Information about active processes and ports. -

Returns the total amount of active processes and ports in - the system. That is, the number of processes and ports that - are ready to run, or are currently running. The information - is not gathered atomically. That is, the result - is not necessarily a consistent snapshot of the state, but - instead quite efficiently gathered.

-

See also - - statistics(active_tasks), - - statistics(run_queue_lengths), and - - statistics(total_run_queue_lengths).

+

The same as calling + lists:sum(statistics(active_tasks)), + but more efficient.

- + + Information about active processes and ports. + +

The same as calling + lists:sum(statistics(active_tasks_all)), + but more efficient.

+
+
+ + + Information about the run-queue lengths. -

Returns the total length of the run queues. That is, the number - of processes and ports that are ready to run on all available - run queues. The information is not gathered atomically. - That is, the result is not necessarily a consistent snapshot of - the state, but much more efficiently gathered compared to - - statistics(run_queue).

-

See also - statistics(run_queue_lengths), - - statistics(total_active_tasks), and - - statistics(active_tasks).

+

The same as calling + lists:sum(statistics(run_queue_lengths)), + but more efficient.

- + + Information about the run-queue lengths. + +

The same as calling + lists:sum(statistics(run_queue_lengths_all)), + but more efficient.

+
+
+ + + Information about wall clock.

Returns information about wall clock. wall_clock can -- cgit v1.2.3