asterisk/channels
Matthew Jordan 1106e8fd0f main/stasis: Allow subscriptions to use a threadpool for message delivery
Prior to this patch, all Stasis subscriptions would receive a dedicated
thread for servicing published messages. In contrast, prior to r400178
(see review https://reviewboard.asterisk.org/r/2881/), the subscriptions
shared a thread pool. It was discovered during some initial work on Stasis
that, for a low subscription count with high message throughput, the
threadpool was not as performant as simply having a dedicated thread per
subscriber.

For situations where a subscriber receives a substantial number of messages
and is always present, the model of having a dedicated thread per subscriber
makes sense. While we still have plenty of subscriptions that would follow
this model, e.g., AMI, CDRs, CEL, etc., there are plenty that also fall into
the following two categories:
* Large number of subscriptions, specifically those tied to endpoints/peers.
* Low number of messages. Some subscriptions exist specifically to coordinate
  a single message - the subscription is created, a message is published, the
  delivery is synchronized, and the subscription is destroyed.
In both of the latter two cases, creating a dedicated thread is wasteful (and
in the case of a large number of peers/endpoints, harmful). In those cases,
having shared delivery threads is far more performant.

This patch adds the ability of a subscriber to Stasis to choose whether or not
their messages are dispatched on a dedicated thread or on a threadpool. The
threadpool is configurable through stasis.conf.

Review: https://reviewboard.asterisk.org/r/4193

ASTERISK-24533 #close
Reported by: xrobau
Tested by: xrobau
........

Merged revisions 428681 from http://svn.asterisk.org/svn/asterisk/branches/12
........

Merged revisions 428687 from http://svn.asterisk.org/svn/asterisk/branches/13


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@428688 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-12-01 17:59:21 +00:00
..
dahdi media formats: re-architect handling of media for performance improvements 2014-07-20 22:06:33 +00:00
iax2 chan_iax2: Several media format fixes. 2014-08-07 18:51:16 +00:00
misdn Allow mISDN to send PROGRESS messsage. 2013-05-10 22:12:52 +00:00
pjsip chan_pjsip: Add support for passing hold and unhold requests through. 2014-11-03 14:45:01 +00:00
sip ast_str: Fix improper member access to struct ast_str members. 2014-11-19 17:22:29 +00:00
Makefile Remove many deprecated modules 2014-07-04 13:26:37 +00:00
chan_alsa.c Add module support level to ast_module_info structure. Print it in CLI "module show" . 2014-07-25 16:47:17 +00:00
chan_bridge_media.c Add module support level to ast_module_info structure. Print it in CLI "module show" . 2014-07-25 16:47:17 +00:00
chan_console.c chan_console: Fix reference leaks to pvt. 2014-11-08 18:20:43 +00:00
chan_dahdi.c main/stasis: Allow subscriptions to use a threadpool for message delivery 2014-12-01 17:59:21 +00:00
chan_dahdi.h chan_dahdi: Adds support for major update to libss7. 2014-06-16 18:27:51 +00:00
chan_iax2.c main/stasis: Allow subscriptions to use a threadpool for message delivery 2014-12-01 17:59:21 +00:00
chan_mgcp.c main/stasis: Allow subscriptions to use a threadpool for message delivery 2014-12-01 17:59:21 +00:00
chan_misdn.c chan_pjsip: Fix deadlock when masquerading PJSIP channels. 2014-10-03 17:47:42 +00:00
chan_motif.c chan_motif / chan_pjsip: Fix incorrect "No such module" messages when reloading. 2014-11-15 19:01:21 +00:00
chan_nbs.c Add module support level to ast_module_info structure. Print it in CLI "module show" . 2014-07-25 16:47:17 +00:00
chan_oss.c Add module support level to ast_module_info structure. Print it in CLI "module show" . 2014-07-25 16:47:17 +00:00
chan_phone.c Fix building chan_phone on big endian systems 2014-10-29 13:02:27 +00:00
chan_phone.h rename DialTone.h to chan_phone.h because chan_phone.c is the only file using it 2008-05-28 20:00:21 +00:00
chan_pjsip.c AST-2014-015: Fix race condition in chan_pjsip when sending responses after a CANCEL has been received. 2014-11-20 14:49:48 +00:00
chan_rtp.c chan_rtp: Add unicast RTP support. 2014-09-12 17:42:15 +00:00
chan_sip.c main/stasis: Allow subscriptions to use a threadpool for message delivery 2014-12-01 17:59:21 +00:00
chan_skinny.c main/stasis: Allow subscriptions to use a threadpool for message delivery 2014-12-01 17:59:21 +00:00
chan_unistim.c Add additional checks for NULL pointers to fix several crashes reported. 2014-10-30 06:15:14 +00:00
chan_vpb.cc media formats: re-architect handling of media for performance improvements 2014-07-20 22:06:33 +00:00
console_board.c Multiple revisions 369001-369002 2012-06-15 16:20:16 +00:00
console_gui.c Multiple revisions 369001-369002 2012-06-15 16:20:16 +00:00
console_video.c Multiple revisions 369001-369002 2012-06-15 16:20:16 +00:00
console_video.h implement the 'freeze' function for incoming frames; 2008-06-30 15:45:15 +00:00
misdn_config.c Add named callgroups/pickupgroups 2012-08-07 12:46:36 +00:00
sig_analog.c res_smdi: convert to astobj2 2014-07-21 08:41:29 +00:00
sig_analog.h Convert sig_analog to use a global callback table. 2012-08-08 20:32:53 +00:00
sig_pri.c main/stasis: Allow subscriptions to use a threadpool for message delivery 2014-12-01 17:59:21 +00:00
sig_pri.h chan_dahdi: Add inband_on_setup_ack compatibility option. 2014-07-03 22:22:36 +00:00
sig_ss7.c chan_dahdi: Adds support for major update to libss7. 2014-06-16 18:27:51 +00:00
sig_ss7.h chan_dahdi: Adds support for major update to libss7. 2014-06-16 18:27:51 +00:00
vcodecs.c Multiple revisions 369001-369002 2012-06-15 16:20:16 +00:00
vgrabbers.c Multiple revisions 369001-369002 2012-06-15 16:20:16 +00:00