[Kamailio-Devel] [SR-Dev] register_timer versus register_timer_process

Ovidiu Sas osas at voipembedded.com
Tue Mar 10 16:13:44 CET 2009


Helo Andrei,

Can you point me to an example where fast timers are armed in
sip-router, so I can try to update the ratelimit module.


Regards,
Ovidiu Sas

On Tue, Mar 10, 2009 at 9:45 AM, Andrei Pelinescu-Onciul
<andrei at iptel.org> wrote:
> On Mar 10, 2009 at 09:10, Ovidiu Sas <osas at voipembedded.com> wrote:
>> The timer interval for the ratelimit is configurable (called every
>> second in my case).
>> I'm using it to control inbound/outbound cps over several SIP trunks.
>>
>> Before having a separate timer for ratelimit, I wasn't able to
>> properly control the cps due to timer jitter.
>> If the slow timer doesn't introduce jitter, then I have no objections
>> in using it.  But if the slow timer is exposed to jitter due to other
>> timers that can block and introduce jitter, then the slow timer is not
>> a viable option here.
>
> I had a look at it and it qualifies for fast timer (it does very little
> work in the handler).
> Regarding jitter: why don't you compute the real timer_interval? This
> way even if the handler would be called a little later you would still
> get the real load. In sr you could always use get_ticks_raw() which is
> very fast and also recovers after suspend/hibernate (so you'll always
> have the correct ticks).
> This would help even if you use a separate process.
>
>
>
> Andrei
>



More information about the Devel mailing list