Apache vs NodeJs Performance Testing

I am currently testing performance between Node.js and Apache.

I want to prove:

  • Apache is slower because it requires a lot more Thread switches than Node.js, which uses a single-threaded Event-Loop.
  • Apache requires a lot more RAM / Connection compared to Node.js, which uses epoll.

This means that I want to check:

  • Requests / second per processor
  • RAM Connections

Good, what I want to do! But the question is: HOW should I do this? For the request / second test, I could just use Apache Benchmark (ab) (but ab is even suitable for Node.js?) And the biggest question is: how can I check the connections / RAM?

+5
source share
2 answers

β€œI want to prove” is a very wrong attitude when doing desktop marking. You do not prove anything; you measure actual performance. You might or might not be surprised at the result, but you really need to start with "Let's see what this can do."

Apparently, of all the tests I've seen, node appears first in terms of raw speed, but uses MORE memory and then apache, so your proof is coming.

+17
source

Connections / second: I recently tested this test from a simple hello world node.js server and received ~ 9,000 requests / second to the processor core. (Using ab, btw. Testing on a 2.5-GHz Xeon linux quad core).

: # . ( ) . Mac Pro, /, HTTP-. "top", . node RSIZE 14 . , 2000 , RSIZE 24 . , ~ 5 /1000.

# node, Apache ? .

+4

All Articles