--- "Olle E. Johansson" <oej@edvina.net>
wrote:> From: "Olle E. Johansson" <oej@edvina.net>
> To: asterisk-users@lists.digium.com
> Subject: Re: [Asterisk-Users] Asterisk on FreeBSD
> Date: Mon, 27 Oct 2003 08:24:22 +0100
>
> Rich Adamson wrote:
>
> >>My Asterisk (fresh CVS) takes 98% of the system load on my FreeBSD
> server.
> >>On a slower CPU linux system, Asterisk runs at 0.1% - both without
> any
> >>active channels...
> >>
> >>Any ideas, anyone recognizing the problem?
> >
> >
> > Is 'top' suggesting that * is actually consuming 98%?
> Yes, leaving the CPU 0% idle...
>
> Thank you - all of you responding to my mail - for all the advice. I
> think this is
> FreeBSD-related. I've now diabled most of the modules I don't use.
> Seems like
> Asterisk can't start without chan_modem.so even though I'm not
using
> it (as far
> as I know).
>
> I haven't enabled dtmfmode=inband anywere, I'm not running any
mpg123
> processes
> and - what I really should do - I don't really understand how to run
> a debugger.
If you are wrinting much code in C learning to use DDD will pay off
big time. You'll be able to simply watch the program run and
see what variables are set to. I can't imagine doing a job as complex
as porting Asterisk "blind", this is with no debugger. It's like
debugging electronics without without amultimeter, 'scope or logic
analyzer.
The other thing you might try is a "profiler", Normally you'd
think
of this for performance tunning the code as it will show you
what line numbers are taking the most time. Sory I can't be
much help but ask on one of the BSD developer forums about where
you should be reading to lean about profiling the code.
BTW the DDD documentation is excelent. It comes with a nice thick
book that is even in color. DDD was written by a group of university
students in Germany before turning it over to the FSF. It is
profesion quality and very mature.
I'm still betting the root cause is the differece between the Linux
and BSD pthreads implementation.
====Chris Albertson
Home: 310-376-1029 chrisalbertson90278@yahoo.com
Cell: 310-990-7550
Office: 310-336-5189 Christopher.J.Albertson@aero.org
KG6OMK
__________________________________
Do you Yahoo!?
Exclusive Video Premiere - Britney Spears
http://launch.yahoo.com/promos/britneyspears/