AutobahnTestSuite: mass connections testing

226 views
Skip to first unread message

Tobias Oberstein

unread,
Jul 18, 2012, 7:23:53 PM7/18/12
to autob...@googlegroups.com
I've taken up further development of AutobahnTestSuite again.

As a first, there is now a "massconnect" mode for wstest:

Mass connect mode can be used to test the maximum number of WebSocket
connections a server can sustain and how many WebSocket opening
handshakes a server can do per second.

See at the end of README:
https://github.com/tavendo/AutobahnTestSuite

PS:
Currently only in Git, not yet released on PyPi.

PS2:
If you want to hammer AutobahnPython, make sure you run on
epoll/kqueue/IOCP reactors and tune your kernel. We have tested
AutobahnPython up to 200k connections on a small (2 core / 4GB)
machine ..

vinay bhalerao

unread,
May 6, 2013, 5:33:56 AM5/6/13
to autob...@googlegroups.com
Hi Tobias,

I am trying the massconnect usecase with Authobahn but I am seeing few error while executing

Please find the steps;
1) Installed the latest Autobahn from branch
2) Run the echo server using command wstest -m echoserver -s ws://10.35.34.172:9000
3) Created a massconnect.json for 1000 connections and got all successful
.
root@vinay-VirtualBox:/home/AutobahnPython# wstest -m massconnect -s massconnect.json
Using Twisted reactor class <class 'twisted.internet.epollreactor.EPollReactor'>
.......... connected 1000 clients to AutobahnPython at ws://10.35.34.172:9000 in 0.58 seconds (retries 0 = failed 0 + lost 0)
[{'retries': 0, 'name': u'AutobahnPython', 'lost': 0, 'uri': u'ws://10.35.34.172:9000', 'connections': 1000, 'failed': 0, 'duration': 0.58}]

My massconnect.json
{
   "options": {
   "connections": 1000,
      "batchsize": 100,
      "batchdelay": 10,
      "retrydelay": 10
   },
   "servers":  [
                  {
                     "name": "AutobahnPython",
                     "uri": "ws://10.35.34.172:9000",
                     "desc": "Autobahn WebSocket Python on localhost"
                  }
               ]
}
===============================================================

4) Now when I edit the above massconnect.json to 1100 request and run it, I get following errors

ERRORS:
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/Twisted-13.0.0-py2.7-linux-x86_64.egg/twisted/python/log.py", line 88, in callWithLogger

  File "/usr/local/lib/python2.7/dist-packages/Twisted-13.0.0-py2.7-linux-x86_64.egg/twisted/python/log.py", line 73, in callWithContext

  File "/usr/local/lib/python2.7/dist-packages/Twisted-13.0.0-py2.7-linux-x86_64.egg/twisted/python/context.py", line 118, in callWithContext

  File "/usr/local/lib/python2.7/dist-packages/Twisted-13.0.0-py2.7-linux-x86_64.egg/twisted/python/context.py", line 81, in callWithContext

--- <exception caught here> ---
  File "/usr/local/lib/python2.7/dist-packages/Twisted-13.0.0-py2.7-linux-x86_64.egg/twisted/internet/posixbase.py", line 619, in _doReadOrWrite

  File "/usr/local/lib/python2.7/dist-packages/Twisted-13.0.0-py2.7-linux-x86_64.egg/twisted/internet/tcp.py", line 593, in doConnect

  File "/usr/local/lib/python2.7/dist-packages/Twisted-13.0.0-py2.7-linux-x86_64.egg/twisted/internet/tcp.py", line 612, in _connectDone

  File "/usr/local/lib/python2.7/dist-packages/Twisted-13.0.0-py2.7-linux-x86_64.egg/twisted/internet/protocol.py", line 460, in makeConnection

  File "/usr/local/lib/python2.7/dist-packages/autobahn-0.6.0-py2.7.egg/autobahn/websocket.py", line 3347, in connectionMade

  File "/usr/local/lib/python2.7/dist-packages/autobahn-0.6.0-py2.7.egg/autobahn/websocket.py", line 3433, in startHandshake

exceptions.OSError: [Errno 24] Too many open files: '/dev/urandom'
Unhandled Error

===============================================================
I am running this above use case on 8GB RAM and 3 core

Do I have to tweak twisted in order to achieve the massconnect?

Thanks,
Vinay

Tobias Oberstein

unread,
May 6, 2013, 11:11:09 AM5/6/13
to autob...@googlegroups.com, vinay bhalerao
Hi,

you need to tweak your OS and resource limits.

Your process seems to be limited to 1k open FDs ..

Tobias
--
You received this message because you are subscribed to the Google Groups "Autobahn" group.
To unsubscribe from this group and stop receiving emails from it, send an email to autobahnws+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

vinay bhalerao

unread,
May 9, 2013, 2:27:30 AM5/9/13
to autob...@googlegroups.com, vinay bhalerao
Thanks. 

We need to increase the fd limit using command ulimit -n xxx or enter necessary hard and soft limits to file limits.conf
where xxx= any integer no.

Regards,
Vinay
Reply all
Reply to author
Forward
0 new messages