[SR-Users] About RTimer module

Daniel-Constantin Mierla miconda at gmail.com
Thu Jul 28 23:25:07 CEST 2011


Hello,

On 7/28/11 11:02 PM, Iñaki Baz Castillo wrote:
> 2011/7/28 Iñaki Baz Castillo<ibc at aliax.net>:
>> 2011/7/28 Klaus Darilion<klaus.mailinglists at pernau.at>:
>>> AFAIK this single timer process is blocked as well. If this single time
>>> request is used for other periodically executed routes too, than those might
>>> be affected as well.
>> Hi, yes, I suppose that the timer process would also block (fully
>> normal if I do a blocking call there). But reading the doc about "It
>> can create new timer processes" maybe it creates N timer processes to
>> balance the work.
> Well, I assume such "magic" (automatically creating more processes)
> does not occur. So, assuming that the route block called by a timer
> (RTimer module) performs a blocking action, then it can be a
> bottleneck if there is heavy traffic. Imagine this case:
>
> - For each received INVITE Kamailio sends some data via Mqueue module.
> - RTimer module has a timer running each second calling route[N].
> - route[N] invokes a blocking call (i.e. an HTTP request).
>
> If case of high INVITE traffic, the kamailio process running the timer
> would be a real bottleneck, am I right?
I assume you want consume all items in a queue at once (if there are 
many -- can be done using while to fetch from queue) and then sleep for 
1 second (i.e., timer to execute route block each second).

Indeed, there is no process created auto-magically, but if you expect 
lot of traffic for blocking ops, you can create more rtimer processes 
that will execute same route block which consumes mqueue items. Creating 
many rtimer processes is by setting 'timer' parameter more than one with 
different name attribute and mode=1, then set also many exec parameters 
accordingly.

Cheers,
Daniel

-- 
Daniel-Constantin Mierla -- http://www.asipto.com
Kamailio Advanced Training, Oct 10-13, Berlin: http://asipto.com/u/kat
http://linkedin.com/in/miconda -- http://twitter.com/miconda




More information about the sr-users mailing list