[sr-dev] [kamailio/kamailio] ratelimit module not working properly when FEEDBACK algorithm is used (#871)

GUILHERME CESAR PILON notifications at github.com
Wed Nov 30 14:45:31 CET 2016


I'm currently using version 4.4.2 and I am came across an issue while using the ratelimit module with the FEEDBACK algorithm.

Checking the ratelimit.c to see how the cpu load value is calculated I saw that the module parses only the line corresponding to the overall CPU usage in the "/proc/stat" file.
First, the module calculates the amount of CPU that is idle, in percentage.
But, when the module is going to calculate the percentage of the overall CPU usage, it first divides the idle value obtained previously by the number of CPU cores, and then subtracts this value from 1.

The mistake here seems to be the division by the number of CPU cores, because the overall porcentage retrieved from the /proc/stat file is already in the range from 0-100, regardless of the number of CPU cores

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/871
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-dev/attachments/20161130/6c900ad7/attachment-0001.html>


More information about the sr-dev mailing list