AutobahnTestSuite: mass connections testing

#1

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 ..

0 Likes

#2

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”

}

]

}

···

===============================================================

  1. 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

— —

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

On Thursday, July 19, 2012 4:53:53 AM UTC+5:30, Tobias Oberstein wrote:

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 …

0 Likes

#3

Hi,

you need to tweak your OS and resource limits.

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

Tobias

···

Am 06.05.2013 11:33, schrieb vinay bhalerao:

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

On Thursday, July 19, 2012 4:53:53 AM UTC+5:30, Tobias Oberstein wrote:

    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
    <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 ..

--
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.

0 Likes

#4

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

···

On Monday, May 6, 2013 8:41:09 PM UTC+5:30, Tobias Oberstein wrote:

Hi,

  you need to tweak your OS and resource limits.



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



  Tobias



  Am 06.05.2013 11:33, schrieb vinay bhalerao:

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

— —

    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

  On Thursday, July 19, 2012 4:53:53 AM UTC+5:30, Tobias Oberstein > > wrote:
    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](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 ..

  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](https://groups.google.com/groups/opt_out).
0 Likes