[asterisk-dev] [zaptel-commits] tzafrir: branch 1.4 r3708 - in /branches/1.4: zaptel-base.c zaptel.h zconfig.h

Kevin P. Fleming kpfleming at digium.com
Wed Jan 23 07:31:33 CST 2008

Oron Peled wrote:

> We measured (with oprofile) before implementing these optimizations.
> The results were quite clear -- the locations were we
> added OPTIMIZE_CHANMUTE were the top hitters (by a large margin) of
> all CPU consumers on the host!

You mean the actual testing for the channel being muted, or the
operation of copying data that muting turns off? My comment was in
reference to the test for the muting flag being turned on or off; I find
it hard to believe that the flag testing operation was the top CPU
consumer in the profile output. I was not referring to the ability to
mute channels itself being a micro-optimization.

> Also, I think it shouldn't be hard to extend the optimization to
> digital channels as well. All we need is for chan_zap() to get
> the information from libpri and notify zaptel (e.g: via a new ioctl())
> about the channels that *actually* use PCM.

Keep in mind that not all digital channels are PRI :-)

> For a possible use-case, think about a typical Digium quad-PRI card
> that can carry 120 clear channels. Even with 50 busy lines zaptel should
> carry 50+4 (d-channels) lines. However, with the current code, it has no
> choice but to carry the full 124 channels -- that's more than
> twofold CPU consumption -- This wasted CPU could be used for other
> asterisk related tasks!


Kevin P. Fleming
Director of Software Technologies
Digium, Inc. - "The Genuine Asterisk Experience" (TM)

More information about the asterisk-dev mailing list