[asterisk-dev] res_timing causes excessive cpu load

Russell Bryant russell at digium.com
Sun Jun 22 16:54:53 CDT 2008


----- "Pavel Jezek" <pavel.jezek at i.cz> wrote:

> I'm using asterisk trunk on pc with 300MHz mobile pentium cpu and one
> simple sip2sip call (without transcoding) causes cpu load about 20%!
> seems, that new timing interface eats much cpu cycles,
> As workaround, I put noload => res_timing_pthread.so into modules.conf
> and now, I have utilization about 2-3%, that is like (maybe slightly 
> more) previous trunk revisions.
> issue is probably related to suspended bugreport #0012772
> Is res_timing_pthread.so actually needed for pure ip asterisk (without
> pstn cards installed)? As I read, Meetme still need ztdummy, so what 
> res_timing is actually doing?

Timing in Asterisk is used in Asterisk for IAX2 trunking, generator timing, and file playback timing.  Without it, IAX2 trunking will not work at all.  Things like file playback, and anything that uses generators (music on hold, for example), will also not work in some cases.  They will rely on incoming audio for timing.

20% is more than I would have expected, but I'm not _too_ surprised.  The module is a bit of a hack.  There is a loop running every 5 ms.  I'm sure someone will come up with a much better userspace timing module.  :)

-- 
Russell Bryant
Senior Software Engineer
Open Source Team Lead
Digium, Inc.



More information about the asterisk-dev mailing list