[asterisk-app-dev] Problem when load testing Asterisk 13.7.2
George Joseph
george.joseph at fairview5.com
Sun Mar 20 19:37:02 CDT 2016
On Sun, Mar 20, 2016 at 5:29 PM, Tickling Contest <
tickling.contest at gmail.com> wrote:
> OK. I did that, but now, all I do is get into an infinite loop with the
> registrations at the callee. Here's the gist:
> https://gist.github.com/ticklingcontest/a0754549a88dc748f52d
>
> Ideally, here's what I need:
>
> callee registers, and accepts an infinite number of calls.
> caller registers, and then sends INVITES an infinite number of times so as
> to keep the total number of calls per the (-l parameter).
>
> It is not clear to me how I would loop at the callee scenario or caller
> scenario.
>
You don't loop anything. sipp runs the scenarios itself repeatedly until
-m calls have been processed.
I'd start without your script or the csv files and just get a simple 1 call
scenario to work.
If you want some good examples, look at the Asterisk testsuite
tests/channels/pjsip/basic_calls scenarios.
Here's a caller file I used often...
https://gist.github.com/gtjoseph/ce5a719b11f307c7ec5e
register
pause 1 sec
invite
pause 1 sec
bye
pause 1 sec
unregister
To simulate a call from a phone with extension/endpoint name 1100, run it
like so...
# sipp -sf reg_and_call.xml -s 1100 -au 1100 -ap <password> -m 1 <server:ip>
If you want it to resister/call/unregister 100 times with 10 parallel calls
over TCP, run
# sipp -sf reg_and_call.xml -t tn -s 1100 -au 1100 -ap <password> -m 100 -l
10 <server_ip:port>
Once you get that working by itself to an existing extension, set up your
callee the same way, then call it from a normal working extension and make
sure it responds correctly.
Then have your caller call the callee, first as a single call, then try
multiple calls.
Only when you have that working should you introduce your injection files.
> What is really confusing in the caller script apart from the real
> confusion I have with -m and -l parameters, is how the caller's INVITE goes
> out from the same port as the registered port especially when they are
> called as two separate processes. Does sipp write a dot file somewhere
> where it gets its information from?
>
Nope.
> BTW, In this model, I pass the CSV file that is pre-generated for the
> calls using a python script that looks like this:
>
> SEQUENTIAL
> callerID1;AsteriskIPAddress;[authentication username=silly
> password=sillier];calleeID1;callDuration1;
> callerID2;AsteriskIPAddress;[authentication username=silly
> password=sillier];calleeID2;callDuration2;
> ...
> callerIDn;AsteriskIPAddress;[authentication username=silly
> password=sillier];calleeIDn;callDurationn;
> etc.
>
> Again, any help is appreciated. I can see how this is turning into a sipp
> tutorial, so I understand if you have issues dealing with this here, but I
> can tell that SIPp help is very sparing online.
>
> Thanks!
>
I'll say again... If you want some good examples, look at the Asterisk
testsuite tests/channels/pjsip/basic_calls scenarios. There are both
inbound and outbound scenarios, authed and unauthed.
> On Sun, Mar 20, 2016 at 3:53 PM, George Joseph <
> george.joseph at fairview5.com> wrote:
>
>>
>>
>> On Sun, Mar 20, 2016 at 11:52 AM, Tickling Contest <
>> tickling.contest at gmail.com> wrote:
>>
>>> Here you go, George. I appreciate your energy into this:
>>> https://gist.github.com/ticklingcontest/4762a57457b73db1a170
>>>
>>
>> Hmmm.
>>
>> So are you running 1 instance of the script for each call? I think
>> that's the issue.
>>
>> Why not let sipp do the work?
>> For the callee, combine registration.xml and callee.xml into the same
>> file and set -l to the max number of simultaneous calls to process. Then
>> set the transport to tn instead of t1 and just let it sit and listen for
>> connections.
>>
>> Same thing for caller, except for the registration.
>>
>> Now you only have 2 instances of sipp.
>>
>>
>>
>>> On Sun, Mar 20, 2016 at 10:15 AM, George Joseph <
>>> george.joseph at fairview5.com> wrote:
>>>
>>>>
>>>>
>>>> On Sat, Mar 19, 2016 at 8:29 PM, Tickling Contest <
>>>> tickling.contest at gmail.com> wrote:
>>>>
>>>>> Thanks again, George,
>>>>>
>>>>> I am running PJSIP v. 2.4.5 that is prescribed for Asterisk 13.7.2. I
>>>>> made the changes you proposed re: --enable-epoll, recompiled PJSIP/Asterisk
>>>>> and redid the tests.
>>>>>
>>>>> I am attempting a total of 100 or so connections (50 SIP/TCP callers
>>>>> REGISTERing, INVITEing; 50 SIP/TCP callees REGISTERing, accepting calls). I
>>>>> am afraid the latest Asterisk is not something I can try right now.
>>>>>
>>>>>
>>>> How many sipp instance are you running?
>>>> Can you share the command lines and scenario xml files?
>>>>
>>>>
>>>> I am left now with an issue that I have not been able to get help
>>>>> elsewhere re: SIPp. I hope I can ask them here, but if I can't, I am sorry
>>>>> in advance!
>>>>>
>>>>> I get these errors:
>>>>>
>>>>> Unable to bind audio RTP socket (IP=127.0.0.1, port=6100), errno = 98
>>>>> (Address already in use). (also get the same error but with video RTP
>>>>> socket, but I am NOT running any video tests).
>>>>>
>>>>> OR
>>>>>
>>>>> Unable to bind main socket, errno = 98 (Address already in use).
>>>>>
>>>>> OR
>>>>>
>>>>> Unable to bind remote control socket (tried UDP ports 8888-8947):
>>>>> Address already in use. (no idea what this is, and why this occurs)
>>>>>
>>>>> I tried passing the -mp parameter (for sipp, i.e.,) a random port
>>>>> number (e.g., see
>>>>> http://stackoverflow.com/questions/2556190/random-number-from-a-range-in-a-bash-script)
>>>>> but I still get these issues (though they dramatically decreased the number
>>>>> of issues I see due to port number).
>>>>>
>>>>> Apart from ulimit/FD_SETSIZE related changes, what else can I do?
>>>>>
>>>>> Where can I get information about load testing Asterisk for more than
>>>>> 100 concurrent calls (I use ARI, so I have to test my backend application
>>>>> too) etc.?
>>>>>
>>>>> Thanks!
>>>>>
>>>>> On Sat, Mar 19, 2016 at 5:13 PM, George Joseph <
>>>>> george.joseph at fairview5.com> wrote:
>>>>>
>>>>>>
>>>>>>
>>>>>> On Sat, Mar 19, 2016 at 1:30 PM, Tickling Contest <
>>>>>> tickling.contest at gmail.com> wrote:
>>>>>>
>>>>>>> Thank you, George!
>>>>>>>
>>>>>>> That did solve the trouble for the most part, but I still get a few
>>>>>>> of these (not rarely, unfortunately):
>>>>>>>
>>>>>>> Mar 19 15:23:06] ERROR[1981]: pjsip:0 <?>: tcpc0x7fb0083a TCP
>>>>>>> connect() error: Connection refused [code=120111]
>>>>>>> [Mar 19 15:23:06] WARNING[1981]: pjsip:0 <?>: tsx0x7fb00008c Failed
>>>>>>> to send Request msg BYE/cseq=8737 (tdta0x7fb010246eb0)! err=120111
>>>>>>> (Connection refused)
>>>>>>> [Mar 19 15:23:16] ERROR[1981]: pjsip:0 <?>: tcpc0x7fb0083a TCP
>>>>>>> connect() error: Connection refused [code=120111]
>>>>>>> [Mar 19 15:23:16] WARNING[1981]: pjsip:0 <?>: tsx0x7fb010169 Failed
>>>>>>> to send Request msg BYE/cseq=5278 (tdta0x7fb010096950)! err=120111
>>>>>>> (Connection refused)
>>>>>>>
>>>>>>> I set the value of PJ_IOQUEUE_MAX_HANDLES to FD_SETSIZE per the link
>>>>>>> you mentioned and ulimit for the root account, which runs asterisk is 8192.
>>>>>>>
>>>>>>> The Asterisk VM has been upped to 8GB memory and 4 cores now. There
>>>>>>> cannot be network related latencies as the entire test is in the local
>>>>>>> network.
>>>>>>>
>>>>>>> Any insight is deeply appreciated.
>>>>>>>
>>>>>>
>>>>>>
>>>>>> T
>>>>>> hose errors you're seeing are outgoing connection attempts
>>>>>> so there a few things to check...
>>>>>>
>>>>>>
>>>>>> What version of pjproject are you running? There's an issue in
>>>>>> 2.4.5 and earlier where TCP sockets aren't being reused
>>>>>> . It's fixed in their trunk. Unfortunately, you can't use their
>>>>>> trunk with Asterisk 13.7.2 because of a new api they introduced. You'll
>>>>>> have to use Asterisk's current 13 branch from git. If you 're going to do
>>>>>> that, check out the bundled pjproject option which also has that patch.
>>>>>>
>>>>>>
>>>>>> Check that sipp isn't terminating early and forcing Asterisk to open
>>>>>> a new connection just to send the BYE.
>>>>>>
>>>>>>
>>>>>>
>>>>>> How many connections are you attempting?
>>>>>>
>>>>>> If you really want to get the max connections, set the --enable-epoll
>>>>>> option on pjproject's ./configure line (assuming you're on Linux) and set PJ_IOQUEUE_MAX_HANDLES
>>>>>> to 5000 or something. This won't fix the connection refused messages
>>>>>> however.
>>>>>>
>>>>>>
>>>>>>> On Sat, Mar 19, 2016 at 12:09 PM, George Joseph <
>>>>>>> george.joseph at fairview5.com> wrote:
>>>>>>>
>>>>>>>> I'll bet your pjproject install still has the default value of 64
>>>>>>>> for PJ_IOQUEUE_MAX_HANDLES. That limits the number of simultaneous TCP
>>>>>>>> sockets.
>>>>>>>>
>>>>>>>>
>>>>>>>> https://wiki.asterisk.org/wiki/display/AST/Building+and+Installing+pjproject
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> On Sat, Mar 19, 2016 at 9:20 AM, Tickling Contest <
>>>>>>>> tickling.contest at gmail.com> wrote:
>>>>>>>>
>>>>>>>>> I am load-testing an Asterisk 13.7.2 installation with SIPp 3.5.1.
>>>>>>>>>
>>>>>>>>> I am running into an issue where Asterisk (core set debug 99)
>>>>>>>>> complains about the following:
>>>>>>>>>
>>>>>>>>> [Mar 19 11:12:55] WARNING[13078]: pjsip:0 <?>: tsx0x7fc60840e
>>>>>>>>> ...Failed to send Request msg INVITE/cseq=28144 (tdta0x7fc60840b590)!
>>>>>>>>> err=70010 (Too many objects of the specified type (PJ_ETOOMANY))
>>>>>>>>> [Mar 19 11:12:55] WARNING[13078]: pjsip:0 <?>: tsx0x7fc60841a
>>>>>>>>> ...Failed to send Request msg INVITE/cseq=31094 (tdta0x7fc6140ebc10)!
>>>>>>>>> err=70010 (Too many objects of the specified type (PJ_ETOOMANY))
>>>>>>>>> [Mar 19 11:13:22] ERROR[13083]: pjsip:0 <?>: tcpc0x7fc6082b TCP
>>>>>>>>> connect() error: Connection refused [code=120111]
>>>>>>>>> [Mar 19 11:13:22] WARNING[13083]: pjsip:0 <?>: tsx0x7fc60822e
>>>>>>>>> Failed to send Request msg BYE/cseq=29352 (tdta0x7fc6080e3600)! err=120111
>>>>>>>>> (Connection refused)
>>>>>>>>> [Mar 19 11:13:25] ERROR[13083]: pjsip:0 <?>: tcpc0x7fc6083a TCP
>>>>>>>>> connect() error: Connection refused [code=120111]
>>>>>>>>> [Mar 19 11:13:25] WARNING[13083]: pjsip:0 <?>: tsx0x7fc60822e
>>>>>>>>> Failed to send Request msg BYE/cseq=13911 (tdta0x7fc6140bc200)! err=120111
>>>>>>>>> (Connection refused)
>>>>>>>>>
>>>>>>>>> Any help figuring out this issue is deeply appreciated.
>>>>>>>>>
>>>>>>>>> Thanks!
>>>>>>>>>
>>>>>>>>> _______________________________________________
>>>>>>>>> asterisk-app-dev mailing list
>>>>>>>>> asterisk-app-dev at lists.digium.com
>>>>>>>>> http://lists.digium.com/cgi-bin/mailman/listinfo/asterisk-app-dev
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>> _______________________________________________
>>>>>>>> asterisk-app-dev mailing list
>>>>>>>> asterisk-app-dev at lists.digium.com
>>>>>>>> http://lists.digium.com/cgi-bin/mailman/listinfo/asterisk-app-dev
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> asterisk-app-dev mailing list
>>>>>>> asterisk-app-dev at lists.digium.com
>>>>>>> http://lists.digium.com/cgi-bin/mailman/listinfo/asterisk-app-dev
>>>>>>>
>>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> asterisk-app-dev mailing list
>>>>>> asterisk-app-dev at lists.digium.com
>>>>>> http://lists.digium.com/cgi-bin/mailman/listinfo/asterisk-app-dev
>>>>>>
>>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> asterisk-app-dev mailing list
>>>>> asterisk-app-dev at lists.digium.com
>>>>> http://lists.digium.com/cgi-bin/mailman/listinfo/asterisk-app-dev
>>>>>
>>>>>
>>>>
>>>> _______________________________________________
>>>> asterisk-app-dev mailing list
>>>> asterisk-app-dev at lists.digium.com
>>>> http://lists.digium.com/cgi-bin/mailman/listinfo/asterisk-app-dev
>>>>
>>>>
>>>
>>> _______________________________________________
>>> asterisk-app-dev mailing list
>>> asterisk-app-dev at lists.digium.com
>>> http://lists.digium.com/cgi-bin/mailman/listinfo/asterisk-app-dev
>>>
>>>
>>
>> _______________________________________________
>> asterisk-app-dev mailing list
>> asterisk-app-dev at lists.digium.com
>> http://lists.digium.com/cgi-bin/mailman/listinfo/asterisk-app-dev
>>
>>
>
> _______________________________________________
> asterisk-app-dev mailing list
> asterisk-app-dev at lists.digium.com
> http://lists.digium.com/cgi-bin/mailman/listinfo/asterisk-app-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-app-dev/attachments/20160320/c7576f40/attachment-0001.html>
More information about the asterisk-app-dev
mailing list