[Asterisk-Users] Opinions on renice or turning off swap or ramdis k as swap?

Gilad Ben-Yossef gilad at codefidence.com
Sun Nov 28 01:39:51 MST 2004


Colin Anderson wrote:
> I have 4 gig in my * box. I'm tuning for performance and I'd like to ask
> opinions:
> 
> 1. asterisk -p == renice -20 ?? 

What asterisk -p does is mark the aterisk process as a POSIX real time 
priority process. Unless you have other process marked in the same way, 
the scheduling algorithm will prefer this process to others at all 
times. which means that if is not blocking, it will be the running process.

I've been running like this with Asterisk for a couple of month with no 
ill effects except that some error conditions cal cause asterisk to go 
into a loop which will effectively freeze all user space activity on the 
machine. I keep a shell set to a higher real time priority then asterisk 
on the machine for these cases.

You can use the following tool to get a real time priority shell:

http://projects.codefidence.com/realtime.html


> 2. I've turned off swap with no apparent ill effects. Can anyone commment on
> long term effects with moderate load (say, 30 SIP phones / 2-3K calls /day)

Don't do that. Swap can be useful to allow the kernel to organize memory 
a little better and avoid fragmentation.

> 
> 3. Can anyone comment on using ramdisk as swap and whether this is a good
> idea or bad idea?

Very bad idea. Linux memory management is much smarter then DOS, from 
which you got this idea, I assume.


> Anyone else have any performance tips?

Disable any interrupts not needed on the system. Specifically, use NAPI 
enabled network device drivers and turn NAPI on.

Gilad



-- 
Gilad Ben-Yossef <gilad at codefidence.com>
Codefidence. A name you can trust(tm)
Web: http://codefidence.com  | SIP: gilad at pbx.codefidence.com
Tel: +972.9.8650475 ext. 201 | Fax:  +972.9.8850643

"I am Jack's Overwritten Stack Pointer"
	-- Hackers Club, the movie



More information about the asterisk-users mailing list