aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/doc/src
diff options
context:
space:
mode:
authorRory Byrne <[email protected]>2015-05-28 19:41:25 +0100
committerSiri Hansen <[email protected]>2016-02-03 12:14:11 +0100
commit264a5e804d6e23bf6c6916887669760cbf243caa (patch)
tree36c811242327adf2da0cde5003ac486a75f70602 /lib/stdlib/doc/src
parent4422cb32637a341eac2dc03172e4aa859be67f34 (diff)
downloadotp-264a5e804d6e23bf6c6916887669760cbf243caa.tar.gz
otp-264a5e804d6e23bf6c6916887669760cbf243caa.tar.bz2
otp-264a5e804d6e23bf6c6916887669760cbf243caa.zip
Speed up supervisor:count_children/1; simple_one_for_one
Speed up supervisor:count_children/1 for simple_one_for_one supervisors. This is achieved by avoiding looping through all the child process and verifying that each one is alive. For a supervisor with 100,000 'temporary' children the count-time will drop from approx 25ms to about 0.005ms. For a supervisor with 100,000 'permanent' or 'transient' children the count-time will drop from approx 30ms to about 0.005ms. This avoids having the supervisor block for an extended period while the count takes place. Under normal circumstances the accuracy of the result should also improve since the duration is too short for many processes to die during the count.
Diffstat (limited to 'lib/stdlib/doc/src')
-rw-r--r--lib/stdlib/doc/src/supervisor.xml5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/stdlib/doc/src/supervisor.xml b/lib/stdlib/doc/src/supervisor.xml
index 24ff251ce3..815bf4a489 100644
--- a/lib/stdlib/doc/src/supervisor.xml
+++ b/lib/stdlib/doc/src/supervisor.xml
@@ -543,7 +543,10 @@
</item>
<item>
<p><c>active</c> - the count of all actively running child processes
- managed by this supervisor.</p>
+ managed by this supervisor. In the case of <c>simple_one_for_one</c>
+ supervisors, no check is carried out to ensure that each child process
+ is still alive, though the result provided here is likely to be very
+ accurate unless the supervisor is heavily overloaded.</p>
</item>
<item>
<p><c>supervisors</c> - the count of all children marked as