[Asterisk-Dev] CPU Profiling?
Michael Giagnocavo
mgg-digium at atrevido.net
Thu Apr 21 08:30:52 MST 2005
>> I've been trying to find some hotspots in Asterisk. I have a hunch
>>that replacing some linked lists with hashtables (say, looking up peers
>and
>>so on) should help a lot. I know that during loading (extensions, iax,
>sip),
>>removing the list traversal code (to check for duplicates) speeds it up
>tons
>>(quadratic to linear).
>>
>Wouldn't this then break the semantics (i.e. require users/peers to be
>unique and such?).
Yes. In my case, I can avoid that (I have a program generating the friends
and contexts.)
>You should be able to just build with -pg, run asterisk, and then use
>any tool that can read gmon.out (i.e. gprof), to read the profile that's
>created.
>
>Alternatively, you can use a sample-based profiler, like "oprofile", but
>that requires some kernel support (which is likely included in your
>distro anyway..). However, this approach is generally a bit harder to
>get started with.
OK I'll look into that. Thanks!
-Michael
More information about the asterisk-dev
mailing list