asterisk/configs/samples/stasis.conf.sample

133 lines
4.9 KiB
Plaintext
Raw Normal View History

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
[threadpool]
;initial_size = 5 ; Initial size of the threadpool.
; ; 0 means the threadpool has no threads initially
; ; until a task needs a thread.
;idle_timeout_sec = 20 ; Number of seconds a thread should be idle before
; ; dying. 0 means threads never time out.
;max_size = 50 ; Maximum number of threads in the Stasis threadpool.
; ; 0 means no limit to the number of threads in the
; ; threadpool.
[declined_message_types]
; This config section contains the names of message types that should be prevented
; from being created. By default, all message types are allowed to be created.
;
; Using this functionality requires knowledge of the names of internal stasis
; message types which is generally the same as the name of the accessor function.
;
; Use of this functionality may break more complex functionality in Asterisk
; such as CEL, CDR, transfers, etc. and will likely cause related messages in ARI
; and AMI to go missing.
; decline=stasis_app_recording_snapshot_type
; decline=stasis_app_playback_snapshot_type
; decline=stasis_test_message_type
; decline=confbridge_start_type
; decline=confbridge_end_type
; decline=confbridge_join_type
; decline=confbridge_leave_type
; decline=confbridge_start_record_type
; decline=confbridge_stop_record_type
; decline=confbridge_mute_type
; decline=confbridge_unmute_type
; decline=confbridge_talking_type
; decline=cel_generic_type
; decline=ast_bridge_snapshot_type
; decline=ast_bridge_merge_message_type
; decline=ast_channel_entered_bridge_type
; decline=ast_channel_left_bridge_type
; decline=ast_blind_transfer_type
; decline=ast_attended_transfer_type
; decline=ast_endpoint_snapshot_type
; decline=ast_endpoint_state_type
; decline=ast_device_state_message_type
; decline=ast_test_suite_message_type
; decline=ast_mwi_state_type
; decline=ast_mwi_vm_app_type
; decline=ast_format_register_type
; decline=ast_format_unregister_type
; decline=ast_manager_get_generic_type
; decline=ast_parked_call_type
; decline=ast_channel_snapshot_type
; decline=ast_channel_dial_type
; decline=ast_channel_varset_type
; decline=ast_channel_hangup_request_type
; decline=ast_channel_dtmf_begin_type
; decline=ast_channel_dtmf_end_type
; decline=ast_channel_hold_type
; decline=ast_channel_unhold_type
; decline=ast_channel_chanspy_start_type
; decline=ast_channel_chanspy_stop_type
; decline=ast_channel_fax_type
; decline=ast_channel_hangup_handler_type
; decline=ast_channel_moh_start_type
; decline=ast_channel_moh_stop_type
; decline=ast_channel_monitor_start_type
; decline=ast_channel_monitor_stop_type
; decline=ast_channel_agent_login_type
; decline=ast_channel_agent_logoff_type
; decline=ast_channel_talking_start
; decline=ast_channel_talking_stop
; decline=ast_security_event_type
; decline=ast_named_acl_change_type
; decline=ast_local_bridge_type
; decline=ast_local_optimization_begin_type
; decline=ast_local_optimization_end_type
; decline=stasis_subscription_change_type
; decline=ast_multi_user_event_type
; decline=stasis_cache_clear_type
; decline=stasis_cache_update_type
; decline=ast_network_change_type
; decline=ast_system_registry_type
; decline=ast_cc_available_type
; decline=ast_cc_offertimerstart_type
; decline=ast_cc_requested_type
; decline=ast_cc_requestacknowledged_type
; decline=ast_cc_callerstopmonitoring_type
; decline=ast_cc_callerstartmonitoring_type
; decline=ast_cc_callerrecalling_type
; decline=ast_cc_recallcomplete_type
; decline=ast_cc_failure_type
; decline=ast_cc_monitorfailed_type
; decline=ast_presence_state_message_type
; decline=ast_rtp_rtcp_sent_type
; decline=ast_rtp_rtcp_received_type
; decline=ast_call_pickup_type
; decline=aoc_s_type
; decline=aoc_d_type
; decline=aoc_e_type
; decline=dahdichannel_type
; decline=mcid_type
; decline=session_timeout_type
; decline=cdr_read_message_type
; decline=cdr_write_message_type
; decline=cdr_prop_write_message_type
; decline=corosync_ping_message_type
; decline=agi_exec_start_type
; decline=agi_exec_end_type
; decline=agi_async_start_type
; decline=agi_async_exec_type
; decline=agi_async_end_type
; decline=queue_caller_join_type
; decline=queue_caller_leave_type
; decline=queue_caller_abandon_type
; decline=queue_member_status_type
; decline=queue_member_added_type
; decline=queue_member_removed_type
; decline=queue_member_pause_type
; decline=queue_member_penalty_type
; decline=queue_member_ringinuse_type
; decline=queue_agent_called_type
; decline=queue_agent_connect_type
; decline=queue_agent_complete_type
; decline=queue_agent_dump_type
; decline=queue_agent_ringnoanswer_type
; decline=meetme_join_type
; decline=meetme_leave_type
; decline=meetme_end_type
; decline=meetme_mute_type
; decline=meetme_talking_type
; decline=meetme_talk_request_type
; decline=appcdr_message_type
; decline=forkcdr_message_type
; decline=cdr_sync_message_type