[asterisk-users] [asterisk-dev] Locking, coding guidelines addition

Stephen Davies stephen.l.davies at gmail.com
Sun Jul 6 08:08:52 CDT 2008


2008/7/6 Grey Man <greymanvoip at gmail.com>:

> From what I can gather the suggestion from the FS approach is that
> each Asterisk channel should be handled after by it's own unique
> thread and save the need for any locking on the channel data
> structures in the first place.
>


After a quick grep, there are lots of mutex locks and unlocks in the FS
code.  As you would expect.
I guess Steve Totaro's "grunt techs" know that, whilst Steve has drunk the
koolaid (and is trolling, anyway).

Nevertheless - the suggestion as I understand it is that there is less
contention for locks in FS due to the design choice that one thread is
created that handles one active channel.  I guess the theory is that
_everything_ done on that channel is done in that thread.  By contrast, we
have a mix of design styles like the worker threads, network threads etc.

But we don't have evidence that contention for mutexes (aka locks) is
slowing Asterisk down.  So it there is a big performance different it will
probably be elsewhere - like the linked lists that are already getting
attention.

My curiosity is piqued to do a proper comparison of Asterisk and Freeswitch
with a realistic workload and compare results (and profile Asterisk if there
is a big difference.

Steve
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20080706/8fe44015/attachment.htm 


More information about the asterisk-users mailing list