[Asterisk-Users] Optimizing Linux to run Asterisk
Tzafrir Cohen
tzafrir at cohens.org.il
Sun Feb 12 08:00:53 MST 2006
On Sun, Feb 12, 2006 at 12:52:29PM +0100, Tamas wrote:
> we have exactly the same questions and weak points in our system.
> What I found is that it's not every time good to give highest nice value
> [-20] to asterisk because the system can be unaccessible if asterisk
> process starts eating CPU (due to a bug or high load).
Actually, if asterisk is only reniced to -20 this is not that much an
issue, as the sceduler will eventually give it a negative boost.
However if you run asterisk with -p ("realtime" priority. Recommended),
Asterisk's tasks will alwys be performed before other userspace tasks.
If you fear that, leave a Manager ocnnection open. The manager interface
is handled only by Asterisk itself and the kernel (networking stack), so
it will remain responsive even if Asterisk is in a 100% CPU loop.
> Now I set nice
> -10 to all asterisk processes and it seems to be a bit better [than
> leaving as is, nice 0]. I don't have real experience with yet.
>
> I would like to know the CPU affinity thing as well, while we have
> problems on a Dual Xeon box. Unfortunately we are forced to make mp3
> with lame semi online (currently from cron every 10 minutes we process
> unhandled slin files from monitor application). It seems, this lame
> makes problems and sometimes the voice quality gets very bad - customer
> complaining. [you can ask why we don't make it on another box or in work
> off hours, right we cannot change that - technical and political
> reasons].
lame need not run with the priority of Asterisk. If it does not run with
realtime priority Asterisk won't suffer.
> What could be nice to use CPU affinity, however we don't have
> any experience and to be honest, don't know what to give to CPU0 and to
> CPU1. My guess is that CPU0 should run asterisk and everything else CPU1
> [soxmix, lame, database]. Which CPU should take care about zaptel
> devices [2xTE110P]?
It's part of the job of Asterisk.
> Will such 'hack' help? If I force asterisk to CPU0, would it be able to
> handle 60 speex channels and monitor application?
I have a feeling it will do more harm than good. But only testing will
tell.
>
> ps: specs:
> Supermicro X6DH8-XB, 2x Xeon 2.8GHz, 2GB RAM, 3Ware 9500S-4LP in RAID5,
> 4xSATA 200GB disk, onboard NIC [Broadcom NetXtreme BCM5721], 2x Digium
> TE110P
> Linux-2.6.13.2 [32bit, SMP, PREEMPT], Ubuntu 5.04
> Asterisk-1.2.4
--
Tzafrir Cohen | tzafrir at jbr.cohens.org.il | VIM is
http://tzafrir.org.il | | a Mutt's
tzafrir at cohens.org.il | | best
ICQ# 16849755 | | friend
More information about the asterisk-users
mailing list