[asterisk-bugs] [Asterisk 0017912]: ao2_t_callback of dialog_needdestroy is called every loop of do_monitor

Asterisk Bug Tracker noreply at bugs.digium.com
Wed Aug 25 12:43:49 CDT 2010


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=17912 
====================================================================== 
Reported By:                schmidts
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   17912
Category:                   Channels/chan_sip/General
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     confirmed
Asterisk Version:           1.6.2.11 
JIRA:                       SWP-2124 
Regression:                 No 
Reviewboard Link:            
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Request Review:              
====================================================================== 
Date Submitted:             2010-08-25 10:05 CDT
Last Modified:              2010-08-25 12:43 CDT
====================================================================== 
Summary:                    ao2_t_callback of dialog_needdestroy is called every
loop of do_monitor
Description: 
the ao2_t_callback is fired in every loop of do_monitor which cause
asterisk to slow down if there are many open dialogs. I wrote a patch to
count up to 10 seconds and then launch the ao2_t_callback only once. the
time is only count between the start and end of ast_io_wait cause there is
a polling (waiting) done.
====================================================================== 

---------------------------------------------------------------------- 
 (0126329) schmidts (reporter) - 2010-08-25 12:43
 https://issues.asterisk.org/view.php?id=17912#c126329 
---------------------------------------------------------------------- 
as i have seen the code of 1.8 the ao2 callback could handle multiple
dialogs which may be faster than in 1.6 where this doesnt work.

the second time struct end could be deleteted and also this row of the
patch:
end=ast_tvnow();
just replace in this row the end with ast_tvnow();
realtimeout=ast_tvdiff_ms(end,start);
so it would be
realtimeout=ast_tvdiff_ms(ast_tvnow(),start);

to compare the speed of this patch. with more than 500 sip dialogs active,
the ao2 callback tooks up to 2000 usec. the ast_tvdiff_ms function just
needs around 20 to 30 usec. 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2010-08-25 12:43 schmidts       Note Added: 0126329                          
======================================================================




More information about the asterisk-bugs mailing list