[Asterisk-Dev] Asterisk CPU usage 99% profiling problem
Steve Kann
stevek at stevek.com
Tue May 31 16:57:35 MST 2005
Andres Maduro wrote:
>Hi,
>
>I was able to compile with DEBUG=-g -pg, in order to be able for * to load, I had to recompile without -O6 optimization.
>
>I ran for 2-3 minutes with an achieve a load of 99% with 4-5 simultaneous calls.
>
>When I did gprof asterisk it did not show any times although it showed the functions being called.
>
>It is my opinion that maybe the problem could be in the linear2alaw or alaw2linear code ?
>
>Please have a look at the output. I do not know if this could help. If you have suggestions in how I should perform this test to gather more data, please tell me...
>
>[root at asterisk1 sbin]# gprof asterisk
>Flat profile:
>
>Each sample counts as 0.01 seconds.
> no time accumulated
>
> % cumulative self self total
> time seconds seconds calls Ts/call Ts/call name
> 0.00 0.00 0.00 65536 0.00 0.00 linear2alaw
> 0.00 0.00 0.00 65536 0.00 0.00 linear2ulaw
> 0.00 0.00 0.00 401 0.00 0.00 ast_all_zeros
> 0.00 0.00 0.00 256 0.00 0.00 alaw2linear
>
>
>
Unfortunately, I don't think your profiling worked actually..
I'd say you need to also recompile all your _modules_, especially
spandsp and libunicall, with profiling to get a better idea of what's
using CPU.
There's no way that 65K calls to linear2alaw would take anywhere near 2
minutes of CPU time..
-SteveK
More information about the asterisk-dev
mailing list