Increasing concurrent connections beyond ~1000

80 views
Skip to first unread message

Brian Cardarella

unread,
May 23, 2012, 2:19:32 PM5/23/12
to EventMachine
So I have an em-websocket server running and I'm trying to see how
well it can scale. So I've written a small script that loops through
and creates a ton of em-http-requests that each connect to the server.
It scales just fine to around 1008 connections then the server blows
up.

I have already searched through this group and have tried the
following:

* increasing the ulimit -n to 5000
* switching to EM.epoll
* setting EM.set_max_timers(10_000)
* setting EM.set_descriptor_table_size(10_000)

I have done all of this and the server still craps out after 1008
connections. Thoughts?

Brian Cardarella

unread,
May 23, 2012, 2:43:23 PM5/23/12
to EventMachine
I should have included this, I am on OSX. The server and clients are
running from the same machine. I understand that I am not creating a
very accurate test by doing this but I wanted to try on my dev machine
before I go onto a dedicated server.

Brian Cardarella

unread,
May 23, 2012, 2:47:56 PM5/23/12
to EventMachine
Let me clear up "crapping out". The server is not allowing any more
connections beyond 1008.

On May 23, 2:19 pm, Brian Cardarella <bcardare...@gmail.com> wrote:

Mark

unread,
May 23, 2012, 2:50:11 PM5/23/12
to eventm...@googlegroups.com
Could you provide a source code you use for testing?

Aman Gupta

unread,
May 23, 2012, 3:08:13 PM5/23/12
to eventm...@googlegroups.com
On Wed, May 23, 2012 at 11:43 AM, Brian Cardarella
<bcard...@gmail.com> wrote:
> I should have included this, I am on OSX. The server and clients are
> running from the same machine. I understand that I am not creating a
> very accurate test by doing this but I wanted to try on my dev machine
> before I go onto a dedicated server.

EM.kqueue = true

You'll have better luck on linux though, with EM.epoll = true

Aman

>
> On May 23, 2:19 pm, Brian Cardarella <bcardare...@gmail.com> wrote:
>> So I have an em-websocket server running and I'm trying to see how
>> well it can scale. So I've written a small script that loops through
>> and creates a ton of em-http-requests that each connect to the server.
>> It scales just fine to around 1008 connections then the server blows
>> up.
>>
>> I have already searched through this group and have tried the
>> following:
>>
>> * increasing the ulimit -n to 5000
>> * switching to EM.epoll
>> * setting EM.set_max_timers(10_000)
>> * setting EM.set_descriptor_table_size(10_000)
>>
>> I have done all of this and the server still craps out after 1008
>> connections. Thoughts?
>
> --
> You received this message because you are subscribed to the Google Groups "EventMachine" group.
> To post to this group, send email to eventm...@googlegroups.com.
> To unsubscribe from this group, send email to eventmachine...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/eventmachine?hl=en.
>

Brian Cardarella

unread,
May 23, 2012, 4:11:07 PM5/23/12
to EventMachine
Aman,

That was it. Scales beautifully now. Thank you. Definitely moving over
to Linux.

- Brian

On May 23, 3:08 pm, Aman Gupta <themastermi...@gmail.com> wrote:
> On Wed, May 23, 2012 at 11:43 AM, Brian Cardarella
>
Reply all
Reply to author
Forward
0 new messages