[asterisk-bugs] [JIRA] (ASTERISK-26061) [patch] res_pjsip: improve realtime performance - remove updating all endpoints status on startup
JoshE (JIRA)
noreply at issues.asterisk.org
Thu Jul 14 13:59:56 CDT 2016
[ https://issues.asterisk.org/jira/browse/ASTERISK-26061?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=231433#comment-231433 ]
JoshE edited comment on ASTERISK-26061 at 7/14/16 1:57 PM:
-----------------------------------------------------------
Hi Alexei-
The length is definitely 0 and they are showing up as dynamic contacts.
A couple more interesting things. It appears that each ps_contacts lookup is happening 3 times per id, which was obvious when I started printing out the regex. Eliminating this line in location.c reduces 2/3 of those lookups:
ast_sorcery_object_field_register_custom(sorcery, "aor", "contact", "", permanent_uri_handler, contacts_to_str, contacts_to_var_list, 0, 0);
contacts_to_str is the method being called twice, which generates two additional lookups, ultimately via ast_sip_location_retrieve_aor_contacts_nolock.
With that line commented out, Asterisk now starts in around 3 minutes.
The third lookup is generated by create_mwi_subscriptions_for_endpoint., where that is allowed, as it is on most of our endpoints.
Still tracking a real solution to the issue, but just wanted to provide a quick update.
was (Author: n8ideas):
Hi Alexei-
The length is definitely 0 and they are showing up as dynamic contacts.
A couple more interesting things. It appears that each ps_contacts lookup is happening 3 times per id, which was obvious when I started printing out the regex. Eliminating this line in location.c reduces 2/3 of those lookups:
ast_sorcery_object_field_register_custom(sorcery, "aor", "contact", "", permanent_uri_handler, contacts_to_str, contacts_to_var_list, 0, 0);
contacts_to_str is the method being called twice, which generates two additional lookups, ultimately via ast_sip_location_retrieve_aor_contacts_nolock.
With that line commented out, Asterisk now starts in around 3 minutes. Still tracking down the source of the last lookup, as well as a real solution to the issue, but just wanted to provide a quick update.
> [patch] res_pjsip: improve realtime performance - remove updating all endpoints status on startup
> -------------------------------------------------------------------------------------------------
>
> Key: ASTERISK-26061
> URL: https://issues.asterisk.org/jira/browse/ASTERISK-26061
> Project: Asterisk
> Issue Type: Bug
> Security Level: None
> Components: Resources/res_pjsip
> Affects Versions: 13.9.1
> Reporter: Alexei Gradinari
>
> The patch removes updating all Endpoints' status on startup.
> Instead, only non-qualified aors with static contact
> and non-qualified non-expired contacts are retrieved from the realtime to
> update the endpoint status to ONLINE.
> The endpoint name was added to the contact object to simply find the endpoint
> that created this contact.
> The status of endpoints with qualified aors will be updated by 'qualify'
> functions.
--
This message was sent by Atlassian JIRA
(v6.2#6252)
More information about the asterisk-bugs
mailing list