[asterisk-bugs] [JIRA] (ASTERISK-26061) [patch] res_pjsip: improve realtime performance - remove updating all endpoints status on startup

Alexei Gradinari (JIRA) noreply at issues.asterisk.org
Mon Jun 27 10:22:56 CDT 2016


    [ https://issues.asterisk.org/jira/browse/ASTERISK-26061?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=231203#comment-231203 ] 

Alexei Gradinari commented on ASTERISK-26061:
---------------------------------------------

JoshE,

It's very strange that there are 20k SQL lookups to ps_contacts on startup.

We have about 1000 endpoints with dynamic contact and 10 endpoints with static contact.
On startup there are
1x SELECT * FROM ps_endpoints WHERE id LIKE '%' ORDER BY id
1x SELECT * FROM ps_aors WHERE contact != '' AND qualify_frequency <= 0 ORDER BY contact
1x SELECT * FROM ps_contacts WHERE expiration_time > 1467036685 AND qualify_frequency <= 0 ORDER BY expiration_time
1x SELECT * FROM ps_aors WHERE qualify_frequency > 0 ORDER BY  qualify_frequency
10x SELECT * FROM ps_contacts WHERE id LIKE ? ORDER BY id
1x SELECT * FROM ps_contacts WHERE qualify_frequency > 0 ORDER BY qualify_frequency
1x SELECT * FROM ps_endpoints WHERE mailboxes != '' ORDER BY mailboxes

Are your 20k endpoints with static or dynamic contact?

Be sure that 
 - the contact value is '' (blank) instead of NULL in ps_aors for dynamic contacts.
 - the field expiration_time on ps_contacts was changed to BigInteger;
 - the field endpoint was added to ps_contacts;

Do you use Sorcery Memory Caching?
We don't.



> [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
>
> This patch removes updating all Endpoints' status on startup.
> The endpoint status should be updated by 'qualify' functions.
> The 'qualify' functions are already patched to improve performance.



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list