FAQ
I have been working on a project for a client involving building a
nodejs cluster. I am trying to get a handle on what the performance
characteristics of nodejs should be. I am running the latest stable
node, 0.6.13 on Ubuntu 11.10. I am running tests on Amazon EC2 with
an "m1.small" and a "c1.medium".

Based on say a 1GHz (m1.small) or 2.5GHz (c1.medium) processor how may
concurrent connections should a single nodejs process be able to
handle? I start to see strange performance issues when an instance
has around 500 concurrent HTTP connections. Instead of performance
degrading slowly, there are these strange 1-2 second gaps in
performance where something seems to be waiting.

For this particular test, I used node's http library for the client
load test machine on a "c1.medium", and the nodejs http library again
for the server on a different Amazon "c1.medium". I started 1000
concurrent requests simultaneously. Here is a portion of my results
that illustrate the issue:

Request Number Response Time (ms) Time spent on the Server
(ms)
696 818 0
697 818 0
698 819 1
699 3354 1
700 3356 0
701 3358 0

So here at request number 699, you see the response time jump by about
2500ms. The "response time" is what the load tester reads and the
"time spent on server" is what the server under test reports as its
time spent on the request. Obviously, I realize that if the CPU is
busy requests will queue up, but is there any way to get insight into
this? Is this a problem with TCP tuning on my linux instance? I have
max connections for the instance set to 20,000.

Basically, I am trying to figure out how many concurrent connections
and/or requests/second a single node process should be able to handle
when it is just responding to almost empty HTTP requests.

Thanks.

--
Job Board: http://jobs.nodejs.org/
Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

Search Discussions

  • Brad Carleton at Mar 25, 2012 at 9:21 pm
    Here's that table again it came out kind of weird in the original
    post.

    Request Number Response Time (ms) Server Time (ms)
    696 818 0
    697 818 0
    698 819 1
    699 3354 1
    700 3356 0
    701 3358 0

    --
    Job Board: http://jobs.nodejs.org/
    Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
    You received this message because you are subscribed to the Google
    Groups "nodejs" group.
    To post to this group, send email to nodejs@googlegroups.com
    To unsubscribe from this group, send email to
    nodejs+unsubscribe@googlegroups.com
    For more options, visit this group at
    http://groups.google.com/group/nodejs?hl=en?hl=en
  • Mscdex at Mar 25, 2012 at 9:26 pm

    On Mar 25, 5:18 pm, Brad Carleton wrote:
    So here at request number 699, you see the response time jump by about
    2500ms.  The "response time" is what the load tester reads and the
    "time spent on server" is what the server under test reports as its
    time spent on the request.  Obviously, I realize that if the CPU is
    busy requests will queue up, but is there any way to get insight into
    this?  Is this a problem with TCP tuning on my linux instance?  I have
    max connections for the instance set to 20,000.
    Could you post the code you're using to gist.github.com and describe
    what you're using for creating the concurrent connections (node, ab,
    etc)?

    --
    Job Board: http://jobs.nodejs.org/
    Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
    You received this message because you are subscribed to the Google
    Groups "nodejs" group.
    To post to this group, send email to nodejs@googlegroups.com
    To unsubscribe from this group, send email to
    nodejs+unsubscribe@googlegroups.com
    For more options, visit this group at
    http://groups.google.com/group/nodejs?hl=en?hl=en
  • Brad Carleton at Mar 26, 2012 at 12:50 am
    The server is pretty complex, here is the code for the load tester
    though, it's written in nodejs/coffeescript:

    Coffeescript(source):
    https://gist.github.com/2201903

    Javascript(compiled);
    https://gist.github.com/2201917

    Do you know what kind of performance I should be able to achieve if
    everything is working correctly?

    On Mar 25, 4:26 pm, mscdex wrote:
    On Mar 25, 5:18 pm, Brad Carleton wrote:

    So here at request number 699, you see the response time jump by about
    2500ms.  The "response time" is what the load tester reads and the
    "time spent on server" is what the server under test reports as its
    time spent on the request.  Obviously, I realize that if the CPU is
    busy requests will queue up, but is there any way to get insight into
    this?  Is this a problem with TCP tuning on my linux instance?  I have
    max connections for the instance set to 20,000.
    Could you post the code you're using to gist.github.com and describe
    what you're using for creating the concurrent connections (node, ab,
    etc)?
    --
    Job Board: http://jobs.nodejs.org/
    Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
    You received this message because you are subscribed to the Google
    Groups "nodejs" group.
    To post to this group, send email to nodejs@googlegroups.com
    To unsubscribe from this group, send email to
    nodejs+unsubscribe@googlegroups.com
    For more options, visit this group at
    http://groups.google.com/group/nodejs?hl=en?hl=en
  • Mscdex at Mar 26, 2012 at 1:52 am

    On Mar 25, 8:50 pm, Brad Carleton wrote:
    Do you know what kind of performance I should be able to achieve if
    everything is working correctly?
    It depends on the resources you have available. I have no experience
    with ec2 and node, so I can't really say what you should expect to
    see.

    Regarding your load tester, have you tried increasing
    http.globalAgent.maxSockets? The default is 5. Also, what kind of
    results do you get if you use ab instead of the node script?

    --
    Job Board: http://jobs.nodejs.org/
    Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
    You received this message because you are subscribed to the Google
    Groups "nodejs" group.
    To post to this group, send email to nodejs@googlegroups.com
    To unsubscribe from this group, send email to
    nodejs+unsubscribe@googlegroups.com
    For more options, visit this group at
    http://groups.google.com/group/nodejs?hl=en?hl=en
  • Brad Carleton at Mar 26, 2012 at 2:30 am
    I forgot to throw that into the script, but I have it at 512. Yea, I
    need to give ab a whirl. I mean do you know any performance numbers
    that might be reasonable for a single node process.
    On Mar 25, 8:52 pm, mscdex wrote:
    On Mar 25, 8:50 pm, Brad Carleton wrote:

    Do you know what kind of performance I should be able to achieve if
    everything is working correctly?
    It depends on the resources you have available. I have no experience
    with ec2 and node, so I can't really say what you should expect to
    see.

    Regarding your load tester, have you tried increasing
    http.globalAgent.maxSockets? The default is 5. Also, what kind of
    results do you get if you use ab instead of the node script?
    --
    Job Board: http://jobs.nodejs.org/
    Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
    You received this message because you are subscribed to the Google
    Groups "nodejs" group.
    To post to this group, send email to nodejs@googlegroups.com
    To unsubscribe from this group, send email to
    nodejs+unsubscribe@googlegroups.com
    For more options, visit this group at
    http://groups.google.com/group/nodejs?hl=en?hl=en
  • Christkv at Mar 26, 2012 at 7:45 am
    I've always used

    http://tsung.erlang-projects.org/

    in the past for load testing as it's more versatile than ab and you
    can create different workload scenarios to simulate what you need.
    On Mar 26, 3:29 am, Brad Carleton wrote:
    I forgot to throw that into the script, but I have it at 512.  Yea, I
    need to give ab a whirl.  I mean do you know any performance numbers
    that might be reasonable for a single node process.

    On Mar 25, 8:52 pm, mscdex wrote:






    On Mar 25, 8:50 pm, Brad Carleton wrote:

    Do you know what kind of performance I should be able to achieve if
    everything is working correctly?
    It depends on the resources you have available. I have no experience
    with ec2 and node, so I can't really say what you should expect to
    see.
    Regarding your load tester, have you tried increasing
    http.globalAgent.maxSockets? The default is 5. Also, what kind of
    results do you get if you use ab instead of the node script?
    --
    Job Board: http://jobs.nodejs.org/
    Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
    You received this message because you are subscribed to the Google
    Groups "nodejs" group.
    To post to this group, send email to nodejs@googlegroups.com
    To unsubscribe from this group, send email to
    nodejs+unsubscribe@googlegroups.com
    For more options, visit this group at
    http://groups.google.com/group/nodejs?hl=en?hl=en

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupnodejs @
categoriesnodejs
postedMar 25, '12 at 9:19p
activeMar 26, '12 at 7:45a
posts7
users3
websitenodejs.org
irc#node.js

3 users in discussion

Brad Carleton: 4 posts Mscdex: 2 posts Christkv: 1 post

People

Translate

site design / logo © 2022 Grokbase