[Asterisk-Users] Erratic CPU load

Eric Giesselbach e.giesselbach at cloudseven.nl
Tue Mar 29 03:24:13 MST 2005


Hi,

During tests with a IAX2/PSTN gateway I've been getting strange results for processor idle time and load. I (re)search(ed) this issue for a while, but I didn't get any good explainations. Can somebody help me? 

I have several sites that rely on a central server for connection to the PSTN. Calls to the PSTN are routed over the Internet to this PSTN gateway using IAX2 in trunk mode. To minimize bandwith usage, the Speex codec is used. The central PSTN gateway is a P4 3.0GHz, 1GByte mem, has a TE110P card supporting ISDN30 and runs Asterisk version 1.0.3 on Debian Sarge.

While sustaining 5 connections dialed in through the TE110P (terminated at remote sites through IAX) and running top on the PSTN gateway, I see 98% CPU idle time most of the time. I also see short (around 10sec) bursts of high CPU usage (40-50%) by one of the asterisk processes supporting the connection. The bursts happen in irregular intervals, ranging from 30 to 60 sec. Meanwhile, the reported average load jumps up and down between 0.1 to 0.7. 

What's happening here? Is the processor load really this erratic, or am I looking at an artefact in cpu usage measurement? Maybe there is an aliasing effect caused by the periodic cpu load (20ms, default trunk frequency) and the cpu usage measurement (also periodic?), but I don't know how to check this. If this top reading is an artefact, is there a way to check the actual (realtime) load? 

Regarding the actual processor usage for speex encoding: this report suggests my processor is indeed quite busy encoding a few speex channels: http://astertest.com/astricon_performance.ppt. Given the results in this report, I doubt the PSTN gateway will support more than 10 speex encodings. At the same time, the same processor encodes 756x756 PAL television to mpeg-4 on my mythtv box at home. Twice, leaving room for scheduled jobs. Has anyone some references to documentation to put these figures into perspective?

Thanks in advance,
Eric.




More information about the asterisk-users mailing list