|Summary:||ASTERISK-05074: [patch] [post 1.2] System Load Average Monitor|
|Reporter:||Russell Bryant (russell)||Labels:|
|Date Opened:||2005-09-13 11:59:32||Date Closed:||2011-06-07 14:03:18|
|Environment:||Attachments:||( 0) loadmonitor_rev3.patch|
( 1) loadmonitor.c
( 2) loadmonitor.conf.sample
( 3) noload.c
|Description:||This alllows Asterisk to monitor the system load average and reject calls if the current load average is above a user defined threshold.|
****** ADDITIONAL INFORMATION ******
Some of the code in loadmonitor.c was borrowed from dnsmgr.c. This mainly includes the threading, scheduling, and config parsing, since they are nearly identical between the two subsystems.
The load monitor currently uses the load average over the past minute as the value it monitors. If anyone feels that having the option to choose whether the 1, 5, or 15 minute value is used, it would be fairly easy to add.
|Comments:||By: Russell Bryant (russell) 2005-09-13 12:06:20|
This feature is subject to the same problems reported in issue ASTERISK-4996. However, a fix for that issue will fix it for use with option_maxload as well.
By: Russell Bryant (russell) 2005-09-29 23:09:40
updated patch to cvs head
By: Russell Bryant (russell) 2005-10-17 18:10:42
updated patch to cvs head, as well as greatly simplified some of the code
By: Tilghman Lesher (tilghman) 2005-10-17 21:30:18
You might want to mention in the config file that the value for full utilization is considered to be 1.0 times the number of processors. Hence, with a single CPU, full utilization would be a loadavg of 1.0, but a quad CPU has a full utilization of 4.0 loadavg.
Also, might want to mention some of the side effects of going beyond full utilization.
By: Tilghman Lesher (tilghman) 2005-11-09 17:44:03.000-0600
noload.c, subtitled "Why load average isn't always a good indicator of actual system load."
bash% gcc -o noload -lpthread noload.c
bash% ./noload 250
Initial load averages for 250 threads are 0.30 0.16 0.06
After 0.25 minutes, for 250 threads, the load averages are 55.69 12.41 4.07
After 0.50 minutes, for 250 threads, the load averages are 98.73 24.05 8.01
After 0.75 minutes, for 250 threads, the load averages are 132.24 35.12 11.89
After 1.00 minute, for 250 threads, the load averages are 158.32 45.64 15.70
After 1.25 minutes, for 250 threads, the load averages are 178.63 55.65 19.46
After 1.50 minutes, for 250 threads, the load averages are 194.51 65.19 23.16
After 1.75 minutes, for 250 threads, the load averages are 206.80 74.24 26.79
After 2.00 minutes, for 250 threads, the load averages are 216.37 82.85 30.37
By: Russell Bryant (russell) 2005-12-20 01:01:05.000-0600
Since Mark already committed something to do this, I'm going to go ahead and close this out.