[OpenSIPS-Devel] [OpenSIPS/opensips] c40f2b: Fix potential starvation for the timer tasks.
Bogdan-Andrei Iancu
bogdan at opensips.org
Wed Sep 14 17:39:26 CEST 2016
Branch: refs/heads/master
Home: https://github.com/OpenSIPS/opensips
Commit: c40f2b057209b8078520abc95e5d1bf5e5a28db6
https://github.com/OpenSIPS/opensips/commit/c40f2b057209b8078520abc95e5d1bf5e5a28db6
Author: Bogdan-Andrei Iancu <bogdan at opensips.org>
Date: 2016-09-14 (Wed, 14 Sep 2016)
Changed paths:
M main.c
M pt.c
M timer.c
M timer.h
Log Message:
-----------
Fix potential starvation for the timer tasks.
Even if the timer tasks have priority in the asyns reactor (for being handled), if all the worker processes are already busy in handling some SIP tasks which takes too long, may lead into a starvation of the timer tasks.
For the moment we address this by creating a extra worker processes (similar to the SIP workers) which is dedicated to executing the timer tasks. Still, based on their availability and load, the SIP workers are able to consume timer tasks.
In the next steps, this issue will be better addressed by implementing the concepts of "preferred jobs" and "capacity reservation" for the processes in the pool.
Credits for helping with the investigation and testing go to Ramachandran, Agalya
More information about the Devel
mailing list