[SR-Users] async workers

Frank Carmickle frank at carmickle.com
Fri Oct 24 16:06:59 CEST 2014


On Oct 24, 2014, at 9:15 AM, Daniel-Constantin Mierla <miconda at gmail.com> wrote:

> 
> On 23/10/14 04:03, Alex Balashov wrote:
>> Also, what is the point of core async_workers setting versus the
>> 'workers' modparam to async? Are they supposed to equal each other?
>> Does one override the other?
> 
> async_workers from core are common for all modules, being a decision not
> to have each module that wants async operations to create its own pool
> of processes. The workers defined by async module are only for that
> module and used only by async_route() and async_sleep().
> 
> The implementation is also different, the async module workers are more
> like timer processes (because both of async_route() and async_sleep()
> need to sleep some interval of time). The module itself keeps the lists
> of tasks in a structure optimized for timer execution. Each of this
> async module workers check from time to time to see if there is a task
> to be executed, executes what matches the time, then sleeps again for
> 100ms (iirc), then checks again...
> 
> The async_workers from core were designed to receive the job
> immediately. Because of that, there is an interprocess communication
> based on sockets in memory. The async workers are listening on them, so
> once a sip worker sends the task to them, an async worker will receive it.

I don't understand this stuff at all.  I do know that when Freeswitch started using timerfd these sorts of issues got better by quite a bit.  Maybe this would help here?  Maybe you're already using this?

--FC




More information about the sr-users mailing list