5

I'm currently testing the performance between Node.js and Apache.

What I want to prove is:

  • Apache is slower because it needs a lot more Thread-switches than Node.js which uses a single threaded Event-Loop.
  • Apache needs a lot more RAM / Connection in comparison with Node.js which uses epoll.

That means, that what I want to test is:

  1. Requests/Second per CPU
  2. Connections per RAM

Ok that's what I want to do! But the question is HOW I should do this? For the Request/second-Test I could just use the Apache Benchmark (ab) (But is ab even suitable for Node.js?) And the biggest question is: How can I test the Connections/RAM?

0

2 Answers 2

18

"I want to prove" is a very wrong attitude when doing bench-marking. You are not proving anything, you measuring the actual performance. You might or might not be surprised by the outcome, but you really have to start with the "Let's see what this thing can do".

Apparently btw, from all the benchmarks I've seen, node comes up first in terms of raw speed but uses MORE memory then apache, so there goes your 'proof'.

Sign up to request clarification or add additional context in comments.

Comments

4

Connections/second: I did this test recently with a simple "hello world" node.js server, and got ~9,000 requests/second per CPU core. (Using ab, btw. Testing on a 2.5GHz, quad-core, Xeon linux box).

Connections per RAM: There's two #'s here you care about. Baseline memory (memory required with no connections), and memory per connection. I tested this on my Mac Pro by spinning up a simple server/client that hold HTTP connections open. I ran the 'top' command to watch memory usage. At zero connections, node had a 14MB RSIZE. Then, with the client running and holding 2000 concurrent connections open, RSIZE grew to 24MB. So ~5MB/1000 connections.

When you get #'s for Node and Apache can you post them here? I'm curious as well.

1 Comment

With ab i get ~6300 R/S with a concurrency of 100 on a 2.5ghz dualcore K8 AMD. Regarding the Connections/Ram i used tautologics script -> github.com/tautologistics/node_loadtest where i achive around ridiculous 61000 Connections with around 250MB. What i do need know is a method to test the max concurrency / Ram with apache. Any suggestions??? Oh and could u post ur script which how u achieved 5MB/1000 connections?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.