[Spce-user] lcr_swrate under high load

Jon Bonilla (Manwe) manwe at sipdoc.net
Thu Jul 28 14:09:48 EDT 2022


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 =

The fees use regexp longest pattern.

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



PekePBX, the multitenant PBX solution
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: Firma digital OpenPGP
URL: <http://lists.sipwise.com/pipermail/spce-user_lists.sipwise.com/attachments/20220728/3dd42493/attachment.sig>

More information about the Spce-user mailing list