Base memory usage

Home » Asterisk Users » Base memory usage
Asterisk Users 12 Comments

Asterisk gurus….

I just installed asterisk 1.8.1.1 along with FreePBX on a fairly small
VPS (512mb standard, 512mb “burst”). I note that the asterisk process
is using about 209mb of memory just doing nothing (not configured to do
anything yet)

In contrast to this, my 1.6.1.2 installation from a little over a year
ago uses only 40mb and it’s fully configured and running with about 4
months of uptime (2 trunks, 4 channels, 3 DIDs, and 4 extensions.)

Any ideas on how I can get the memory consumption down on my new
installation, or is it time to “downgrade” to the older version?

Thanks,
Larry

12 thoughts on - Base memory usage

  • Hi,

    1-TuneUp your setting in /etc/dafult/asterisk
    2-Stop l;oadng all not required modules by adding “noload =>
    modulename.so” lines to /etc/asterisk/modules.conf

    Regards,

    Faisal

  • I’m running 1.8.1 rc1 + some patches (nothing to do with memory) and i’m
    at 42MB resident (73 virt/8shared)

    I’ve got just about everything turned on via menuselect, but then i have
    a bunch of modules turned off via modules.conf

    I doubt that’s your issue, but if you’re interested to see my
    modules.conf, it’s temporarily at http://jeremy.kister.net/tmp/modules.conf

  • On Thu, 30 Dec 2010 23:53:04 -0500, Jeremy Kister
    wrote:

    Incidently, is there a sure-fire way (eg. checking error messages in
    Asterisk’s log file) to know which modules a given Asterisk setup
    needs, so we can safely not load unneeded modules?

  • Jeremy Kister wrote:
    Thanks a bunch guys!

    I pruned the modules loading and that did the job, although I found
    something interesting in doing so:

    Removing modules one by one seemed to have virtually no effect until I
    got to chan_iax2.so. Removing this module dropped memory consumption
    from 209mb to 16mb (looking at the RES column in the output of `top’).

    Once again, thanks for your suggestions … Works like a charm!

    Kind Regards,
    Larry

  • On Fri, 31 Dec 2010 08:11:18 -0600, “Danny Nicholas”
    wrote:

    Thanks for the tip. The appliance doesn’t log messages in ./full, but
    I’ll check how to enable it.

  • On Sat, 1 Jan 2011 13:04:29 -0500, Robert Fantini
    wrote:

    Yup, but this file doesn’t exist. It’s an appliance with not much
    RAM/NAND memory, so it makes sense to disable logging to save space.

  • 1) Configure Asterisk to syslog on another host.

    2) Start Asterisk from the command line with lots of ‘-d’ and ‘-v’ and
    watch for error messages.

    Personally, I prefer to use ‘autoload=no’ and explicitly load the modules
    I need on production systems.