[SR-Users] Fwd: [kamailio]: Querie on ratelimit module

Prashant Desai pdesai05 at gmail.com
Wed Mar 2 08:08:47 CET 2016


Thanks Sammy,

You have correctly understood the requirement. Initially we also thought to
use the approach which you have mentioned. But, Since we came across
ratelimit module which all ready has inbuilt CPU Monitoring and other
techniques so we started using it.
If we can we get some help on this module then it would be appreciable?

In any case we can switch over to the other approach but we just wanted to
try using ratelimit for some time.

We have a query on the CPU monitor intervals ( What should be the optimal
time we should use to poll the CPU Utilization ) so that it should not
affect the performance of the system.


Regards,
Prashanth


On Tue, Mar 1, 2016 at 8:13 PM, SamyGo <govoiper at gmail.com> wrote:

> Hi Prashant,
> If I were to do it the lazy way and if I have understood your requirement
> completely. I might've ended up using snmp monitoring of the CPU and set a
> memcache/redis variable to be 0 or 1 in case CPU goes above or below 70.
> In my kamailio.cfg I would just check that redis variable and decide
> whether to drop requests or continue with the config.
>
> Isn't that something that can help you ?
>
> Thanks,
> Sammy
> On Mar 1, 2016 09:00, "Prashant Desai" <pdesai05 at gmail.com> wrote:
>
>>
>> Hi Kamailio,
>>
>>                 We are using Kamailio V4.2.3 for our project and we are
>> trying to address the performance requirement. We have following queries
>>
>> and need some inputs from Kamailio.
>>
>>
>>
>> *Requirement :* CPU Utilization Limit to 70%, If the limit is crossed
>> Kamailio has to reject the Request.
>>
>> And If it is within the limit Kamailio has to Process the Requests. (i.e.
>> Kamailio has to dynamically set and reset the policy based on CPU Load).
>>
>>
>>
>> *Our Findings* : We have come across ratelimit module in Kamailio, we
>> tried using the same to address the requirement
>>
>> but we see it is not  dynamically setting and resetting the policy (once
>> if it starts rejecting then every time it rejects it, only if we restart
>> the kamailo it works)
>>
>>
>>
>> *What we Need*: We need to know
>>
>> 1.       Are we using the right module to address the above requirement ?
>>
>> 2.       We are only using ratelimit, module, do we have to include any
>> other module along with ratelimit?
>>
>> 3.       We are using FEEDBACK algorithm, is that OK ?
>>
>> 4.       Setting  “ modparam("ratelimit", "pipe", "3:FEEDBACK:70") “ ,
>> is this correct ?
>>
>> 5.       In ratelimit.c , function
>>
>>  static int pipe_push(struct sip_msg * msg, int id) {
>>
>>               *case* *PIPE_ALGO_FEEDBACK*:
>>
>>                      *LM_DBG(**"drop_rate
>> [%d],hash[*pipes[id].counter][%d]\n"**,*drop_rate, hash[*pipes[id].*
>> *counter**])*;
>>
>>                      ret = (hash[*pipes[id].counter % 100] < *drop_rate)
>> ? -1 : 1;
>>
>> }
>>
>>                 We are not able to understand the above line (
>> hash[*pipes[id].counter % 100]). Could you please elaborate.
>>
>>
>>
>> 6.       Where are we lagging ?
>>
>>
>>
>>
>>
>> Regards,
>>
>> Prashanth
>>
>>
>>
>> ------------------------------
>>
>> ============================================================================================================================
>> Disclaimer: This message and the information contained herein is
>> proprietary and confidential and subject to the Tech Mahindra policy
>> statement, you may review the policy at
>> http://www.techmahindra.com/Disclaimer.html externally
>> http://tim.techmahindra.com/tim/disclaimer.html internally within
>> TechMahindra.
>>
>> ============================================================================================================================
>>
>>
>>
>> _______________________________________________
>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
>> sr-users at lists.sip-router.org
>> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>>
>>
> _______________________________________________
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users at lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20160302/02a07d85/attachment.html>


More information about the sr-users mailing list