[Spce-user] lcr_swrate under high load

Rene Krenn rkrenn at sipwise.com
Thu Jul 28 17:28:07 EDT 2022


Pls use prefix fees (and keep only a few regex fees for your special
purposes).
You will have log(n) speed - fastest possible order of runtime, certainly
able to handle LCR on carrier-grade call loads.

br

-----Ursprüngliche Nachricht-----
Von: Jon Bonilla (Manwe) [mailto:manwe at sipdoc.net] 
Gesendet: Donnerstag, 28. Juli 2022 20:10
An: spce-user at lists.sipwise.com
Betreff: [Spce-user] lcr_swrate under high load

Hi

spce 7.5 system.


I've enabled lcr routing in a heavy traffic system and it can't handle it. 

It's about 200k fees total in billing.billing_fees_history (although I
tested with only 50k)

With 16 workers the mysql process is stuck to 1600% CPU usage. The query
takes about 0.25 seconds which is way too much:

SELECT id, destination, onpeak_init_rate, onpeak_init_interval,
onpeak_follow_rate, onpeak_follow_interval, offpeak_init_rate,
offpeak_init_interval, offpeak_follow_rate, offpeak_follow_interval,
billing_zones_history_id, use_free_time FROM billing.billing_fees_history
bfh WHERE bfh.id =
billing.get_billing_fee_id(4,'call','out',concat('number','@','domain'),conc
at('number','@','domain'),null)
;

The fees use regexp longest pattern.


Any ideas or experiences on how to speedup this? Do other match algorithms
take less time?




cheers,

Jon



--
PekePBX, the multitenant PBX solution
https://pekepbx.com




More information about the Spce-user mailing list