[Asterisk-Dev] rewriting asterisk as a state machine?

alex at pilosoft.com alex at pilosoft.com
Thu Mar 3 12:16:35 MST 2005


On Thu, 3 Mar 2005, Roy Sigurd Karlsbakk wrote:

> in current asterisk gateway setups, a set of 20 active channels
> generates something like 3500 context switches per second, giving a
> 170-200 context switches per channel per second. This is an awful lot...
It is an awful lot. But realistically, it should be at least 50 ctx 
switches per channel per second (reading 20ms samples). 

> Would it be possible to rewrite asterisk so as each channel's data
> read/write would be in common threads with a select() or so? what would
> this take? this really would decrease the overhead on busy systems....
That would be a heavy rewrite, changing blocking code with threads into 
nonblocking code with select() - is untrivial task, and probably 
pointless.

CPU are cheap.

-alex




More information about the asterisk-dev mailing list