]> git.ipfire.org Git - thirdparty/asterisk.git/commit
taskprocessors: Implement high/low water mark alerts. 52/2952/3
authorRichard Mudgett <rmudgett@digium.com>
Thu, 2 Jun 2016 21:08:19 +0000 (16:08 -0500)
committerRichard Mudgett <rmudgett@digium.com>
Tue, 7 Jun 2016 23:57:36 +0000 (18:57 -0500)
commit610eee2a36d2d2426947784a230c31dca6b18c62
treefc993f41fe9dcd4e0a51e47a9e5160a958c1c3f9
parent26e34922469102ceb3ae93025b6b13c15fa19e8f
taskprocessors: Implement high/low water mark alerts.

When taskprocessors get backed up, there is a good chance that we are
being overloaded and need to defer adding new work to the system.

* Implemented a high/low water alert mechanism for modules to check if the
system is being overloaded and take appropriate action.  When a
taskprocessor is created it has default congestion levels set.  A
taskprocessor can later have those congestion levels altered for specific
needs if stress testing shows that the taskprocessor is a symptom of
overloading or needs to handle bursty activity without triggering an
overload alert.

* Add CLI "core show taskprocessor" low/high water columns.

* Fixed __allocate_taskprocessor() to not use RAII_VAR().  RAII_VAR() was
never a good thing to use when creating a taskprocessor because of the
nature of how its references needed to be cleaned up on a partial
creation.

* Made res_pjsip's distributor check if the taskprocessor overload alert
is active before placing a message representing brand new work onto a
distributor serializer.

ASTERISK-26088
Reported by:  Richard Mudgett

Change-Id: I182f1be603529cd665958661c4c05ff9901825fa
include/asterisk/taskprocessor.h
main/taskprocessor.c
res/res_pjsip/pjsip_distributor.c