[asterisk-users] Cache sound files for faster processing

Steve Edwards asterisk.org at sedwards.com
Tue Apr 6 09:15:07 CDT 2010


>> Are there any way of configuring of Asterisk so it'll cache sound files 
>> in memory, and when Asterisk receive a call, instead of loading sound 
>> files from the disk

On Mon, 5 Apr 2010, Luki wrote:

> Not directly, but it's not really needed. A long as the machine has 
> enough RAM, the files will be served from RAM by the operating system. 
> Sure there is the overhead of opening/closing files and reading them, 
> but on modern OS this overhead is negligible if the files are cached 
> (asterisk may even use mmap, but I'm not sure).
>
> You can also make a ram disk (say via tmpfs), copy the sounds there and 
> symlink the sound directory to that location. However, I don't think you 
> will gain much.

A bit off topic, but recently I was trying to improve the performance of a 
MythTV frontend (a Linux home theater application).

I tried tmpfs and /dev/ramx and neither yielded noticeable improvement. My 
informal conclusion is that Linux does a good enough job at managing 
memory that tweaking is probably not worth it.

-- 
Thanks in advance,
-------------------------------------------------------------------------
Steve Edwards       sedwards at sedwards.com      Voice: +1-760-468-3867 PST
Newline                                              Fax: +1-760-731-3000



More information about the asterisk-users mailing list