Asterisk/FreePBX on Linode: High load averages with Linux EC2 Image

Discussion in 'Kernel Questions' started by jscholes, Oct 25, 2010.

  1. jscholes

    jscholes New Member

    Hi all.

    I currently have a Linode VPS, and would like to set up a small PBX for my own personal use using Asterisk 1.6 and FreePBX 2.8.

    My Linode is currently running Ubuntu 10.10 (Maverick). Over the last couple of years, I've been slowly learning my way around Linux, and Ubuntu is the distro I feel most comfortable with. However, I often still follow tutorials and articles such as those in the Linode Library, especially for software, such as Asterisk and especially FreePBX where I feel the documentation could perhaps be made much more intuitive for the end user. I used the following guide to set up my system:

    http://library.linode.com/communications/voip-services/

    The following section, however, is causing me some concern:

    I followed those instructions, as well as the steps below it to get my kernel set up for the DAHDI modules/drivers. And in fact, did get a system running with Asterisk and FreePBX. However, I noticed that my load averages were quite high; they were constantly staying around the 1.50 mark. As this was a fresh install of Ubuntu 10.10, I was slightly concerned; the main processes that were running were MySQL, Apache and obviously Asterisk. I thought it may be possible that some fine-tuning of configuration of one or more of these processes might be required, so to test this theory, I killed MySQL, Asterisk and Apache. The load averages only dropped by about 0.10.

    My concern increased somewhat when I looked through the list of running processes with ps -e. It seemed to me that there were a lot of processes running that I a. didn't know the use of, and b. hadn't purposely started myself. One of these was something along the lines of sfc-netfront/0. I Googled this, and came across a mailing list post about high load averages on Amazon EC2 Ubuntu 10.04 AMIs.

    The mailing list did not provide much, if any useful information, however I am now almost convinced, until it is shown otherwise, that the EC2 Linux Image is to blame for the high load averages. I can only assume this is the case at the moment as I don't have any further information.

    So, can anyone shine a light on the reason for these high load averages? Is there something in the Linux EC2 Image that can be removed, disabled etc that would prevent such high loads? Is there an alternative to using this image, such as another Linux kernel image that has the required DAHDI modules? Am I barking up the wrong tree completely thinking that the EC2 Image is to blame?

    Running Asterisk without DAHDI was suggested to me, which would be fine - I can't see myself really needing conferencing functionality. However, the Asterisk package in Apt requires DAHDI as a dependency. I did install DAHDI to satisfy this dependency, and as you would expect, got tons of errors. However, Asterisk seemed happy to install. I then ran:
    asterisk -r
    and was told that communication with Asterisk failed and to check that asterisk.ctl exists. I can only assume that the only way to run Asterisk without DAHDI modules is to compile it from source?

    Thanks in advance.
     
  2. Franz

    Franz Member

    I have running asterisk, frepbx, a2billing, hylafax on single VPS, manual install and all working fine. avarage memory usahe 350MB, cpu load, 0.1



    you need dahdi modules only for conference calls.

    install dahdi dummy from tarball.
     
  3. jscholes

    jscholes New Member

    What Linux distro are you running? Are you using the linux-image-ec2 kernel or an alternative?

    Yes, I know, and like I said in my original post, I don't actually need conferencing. Do you not actually need a kernel image such as linux-image-ec2 if you install DAHDI Dummy?
     
  4. Franz

    Franz Member

    at home ubuntu server 9.10 on intel atom box
    on production server: OpenVZ VPS with debian lenny


    just download dahdi-all and install it before installing asterisk
     
  5. jscholes

    jscholes New Member

    I have tried installing DAHDI without success. This brings us full-circle, back to my original problem; I need linux-image-ec2 installed to install the DAHDI modules successfully, and linux-image-ec2 drives up my load averages.
     
  6. Franz

    Franz Member

    I use kernels:

    2.6.31-14-generic on ubuntu
    2.6.18-194.3.1.el5.028stab069.6 on OpenVZ - Debian Lenny

    try this.


    Code:
    mkdir /usr/src/asterisk
    cd /usr/src/asterisk
    
    wget http://downloads.asterisk.org/pub/telephony/asterisk/old-releases/asterisk-1.6.2.13.tar.gz
    wget http://downloads.asterisk.org/pub/telephony/asterisk/old-releases/asterisk-addons-1.6.2.1.tar.gz
    wget http://downloads.asterisk.org/pub/telephony/dahdi-linux-complete/dahdi-linux-complete-2.4.0+2.4.0.tar.gz
    wget http://downloads.asterisk.org/pub/telephony/libpri/libpri-1.4.11.4.tar.gz
    wget http://downloads.asterisk.org/pub/telephony/libss7/libss7-1.0.2.tar.gz
    
    
    tar -xzf asterisk-1.6.2.13.tar.gz  
    tar -xzf asterisk-addons-1.6.2.1.tar.gz  
    tar -xzf dahdi-linux-complete-2.4.0+2.4.0.tar.gz  
    tar -xzf libpri-1.4.11.4.tar.gz  
    
    cd /usr/src/dahdi-linux-complete-2.4.0+2.4.0	   
    make
    make install
    
    
    cd /usr/src/asterisk/libpri-1.4.11.4
    make install
    
    cd /usr/src/asterisk/asterisk-1.6.2.13
    ./configure
    make menuconfig
    make
    make install
    make samples
    asterisk &
    
    
    cd /usr/src/asterisk/asterisk-addons-1.6.2.1
    ./configure
    make
    make install
     
  7. jscholes

    jscholes New Member

    Thanks, I will try that when I get home later today. I'm thinking, if I compile DAHDI from source, or at least attempt to, I might be able to install Asterisk from a pre-compiled package, such as those found in Apt. I am visually impaired, and the menuselect screens during the Asterisk make process are a bit difficult to navigate from the keyboard as I remember correctly. But again, thanks for the suggestion. Linode use Xen-based virtual servers, which is why I am having such problems with kernel modules, etc.
     

Share This Page