Asterisk Server Stress Test

Home » Asterisk Users » Asterisk Server Stress Test
Asterisk Users 12 Comments

Hi all,

i need to test how many calls can withstand an Asterisk server.

Do you know any good tools to strain the server?

At best, there are scripts that I can run on a Linux server.

I thank you for your tips

Sincerely Dominique Haeber

12 thoughts on - Asterisk Server Stress Test

  • Hi Barry Flanagan,

    Barry Flanagan schrieb am Mit, 19. Aug 11:06:

    That looks pretty like what I’m looking for! Many thanks!

    Sincerely, Dominique Haeber

  • Another approach is to use another Asterisk system.

    Recently, a customer wanted to confirm his platform would support 500
    simultaneous calls.

    I wrote a quick bash script to dump 500 call files (at a leisurely pace)
    into another host that originated calls to the target host.

  • Please don’t top post.

    There’s no magic in the script, but here it is, embarrassing myself:

    cp sample-call-file /tmp/
    chmod +x /tmp/sample-call-file
    for I in $(seq 1 $1)
    do
    sudo -u asterisk\
    cp /tmp/sample-call-file\
    /var/spool/asterisk/outgoing/${RANDOM}
    done
    sleep 10

    Here’s what’s wrong with this snippet:

    1) I don’t know why I chmod the ‘template.’ No idea whatsoever. Alcohol may have been involved.

    2) I hate single character variable names. I love alcohol.

    3) cp is ill advised. For a testing script, it was easy. For a production application, use mv.

    In use, I would execute it specifying how many call files to create, like
    50. Then, take a look at top, iftop, and vmstat. Lather, rinse, repeat to get to your goal.

  • –Apple-Mail=_F968D467-6D42-4FF0-A8E0-0A11083B9AD5
    Content-Transfer-Encoding: quoted-printable Content-Type: text/plain;
    charset=us-ascii

    Markus

    That’s a fascinating concept!

    Can you share any more about how you appraised the data and determined your results?

    ie once you had the recordings on the second host what did you do do computationally score them? Do you look at the decoded (1khz?) waveform or do you appraise in another way?

    Pete

    –Apple-Mail=_F968D467-6D42-4FF0-A8E0-0A11083B9AD5
    Content-Transfer-Encoding: quoted-printable Content-Type: text/html;
    charset=us-ascii

    Markus
    That’s a fascinating concept!
    Can you share any more about how you appraised the data and determined your results?
    ie once you had the recordings on the second host what did you do do computationally score them? Do you look at the decoded (1khz?) waveform or do you appraise in another way?
    Pete


    On 20/08/2015, at 5:23 AM, Markus Weiler <markus_weiler@mailworks.org> wrote:


    Am 19.08.2015 um 19:07 schrieb Steve Edwards:

    Please don’t top post.

    On Wed, 19 Aug 2015, James Cass wrote:

    Steve, would you be willing to share that “quick bash script”?

    There’s no magic in the script, but here it is, embarrassing myself:

           cp sample-call-file /tmp/
           chmod +x /tmp/sample-call-file
           for     I in $(seq 1 $1)
                   do
                   sudo -u asterisk\
                           cp /tmp/sample-call-file\
                           /var/spool/asterisk/outgoing/${RANDOM}
                   done
       sleep 10

    Here’s what’s wrong with this snippet:

    1) I don’t know why I chmod the ‘template.’ No idea whatsoever. Alcohol may have been involved.

    2) I hate single character variable names. I love alcohol.

    3) cp is ill advised. For a testing script, it was easy. For a production application, use mv.

    In use, I would execute it specifying how many call files to create, like 50. Then, take a look at top, iftop, and vmstat. Lather, rinse, repeat to get to your goal.

    We started the 500 calls and used milliwatt app on the first and record on the second host to check the quality. Alternatively just start 500+ calls and call yourself on top. So you can get a good idea how the quality is.

    Call-Files are explained on http://www.voip-info.org/wiki/view/Asterisk+auto-dial+out

    Markus


    _____________________________________________________________________
    — Bandwidth and Colocation Provided by http://www.api-digital.com
    New to Asterisk? Join us for a live introductory webinar every Thurs:
                 http://www.asterisk.org/hello

    asterisk-users mailing list
    To UNSUBSCRIBE or update options visit:
     http://lists.digium.com/mailman/listinfo/asterisk-users


    –Apple-Mail=_F968D467-6D42-4FF0-A8E0-0A11083B9AD5

  • –Apple-Mail=_746B9140-5051-4B17-B9D6-3A1EC2A0FF92
    Content-Transfer-Encoding: quoted-printable Content-Type: text/plain;
    charset=us-ascii

    Ah cr@p, sorry Steve, didn’t mean to top-post there.

    Markus

    That’s a fascinating concept!

    Can you share any more about how you appraised the data and determined your results?

    ie once you had the recordings on the second host what did you do do computationally score them? Do you look at the decoded (1khz?) waveform or do you appraise in another way?

    Pete

    –Apple-Mail=_746B9140-5051-4B17-B9D6-3A1EC2A0FF92
    Content-Transfer-Encoding: quoted-printable Content-Type: text/html;
    charset=us-ascii

    Ah cr@p, sorry Steve, didn’t mean to top-post there.

    On 20/08/2015, at 5:23 AM, Markus Weiler <markus_weiler@mailworks.org> wrote:

    We started the 500 calls and used milliwatt app on the first and record on the second host to check the quality. Alternatively just start 500+ calls and call yourself on top. So you can get a good idea how the quality is.

    Markus
    That’s a fascinating concept!
    Can you share any more about how you appraised the data and determined your results?
    ie once you had the recordings on the second host what did you do do computationally score them? Do you look at the decoded (1khz?) waveform or do you appraise in another way?
    Pete


    –Apple-Mail=_746B9140-5051-4B17-B9D6-3A1EC2A0FF92

  • Am 20.08.2015 um 03:16 schrieb Pete Mundy:

    Hi Pete,

    we used different approaches.

    Just to test the maximum channels a gateway can process the two Methods are enough, you can either listen to the Recordings or look at the waveform. The easiest approach is to call a colleague and gradually increase the calls on the machine.

    For systematic, continuous analysis Voipmonitor is a very useful tool. We directed the traffic to a mirroring port on the Switch to which we connected a Server running Voipmon. (http://www.voipmonitor.org/)
    Voipmon records the call and rates its quality. You can check the results either using the commercial Web Interface (test for free) or query the mysql DB. Unfortunately Voipmon tends to crash on a regular basis (at least when we used it), but it’s an awesome tool. The underlying tool pcapsipdump is running a lot more stable, but you need to put a lot more work into it to get started.

    hope i could help

    Markus

  • Hi Barry Flanagan,

    Dominique Haeber schrieb am Mit, 19. Aug 15:13:

    The control file needs some training but I was successful to the goal, thanks again.

    Sincerely, Dominique Haeber