Closed ramboza closed 8 years ago
First of all you testing a dev server that loads react app each time, per request It's toooooo slow, of course. Also you testing a node.js proxy.
To test production performance you need to build app for production and start it like that:
$ NODE_ENV=production make build
...
$ ./bin/app run -c production > /dev/null
and test it with
$ boom -n 1000 -c 64 http://localhost:5000/
1000 / 1000 Booooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo! 100.00 %
Summary:
Total: 4.4886 secs.
Slowest: 0.8239 secs.
Fastest: 0.0158 secs.
Average: 0.2788 secs.
Requests/sec: 222.7886
Total Data Received: 1533526 bytes.
Response Size per Request: 1533 bytes.
Status code distribution:
[200] 1000 responses
Response time histogram:
0.016 [1] |
0.097 [50] |∎∎
0.177 [43] |∎∎
0.258 [43] |∎∎
0.339 [797] |∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎
0.420 [17] |
0.501 [19] |
0.581 [24] |∎
0.662 [5] |
0.743 [0] |
0.824 [1] |
Latency distribution:
10% in 0.2018 secs.
25% in 0.2782 secs.
50% in 0.2854 secs.
75% in 0.2925 secs.
90% in 0.3055 secs.
95% in 0.4168 secs.
99% in 0.5551 secs.
Duktape itself slower than v8 about 2-5 times. There is bad news - react apps render is pretty slow an node.js too. It depends of components amount of you app. Mostly this problems solved via front cache proxy inside the server app or outside. It's up to you which tool to use. If you write performant app you have to use cache independently of render engine, django or RoR or React+Duktape and so on.
Due to performance improvement there are new benchmarks - Requests/sec: 432.2885 for OS X 10.10.4 (14E46), 2,7 GHz Intel Core i5, 8 GB 1867 MHz DDR3
/cc @ramboza
Full boom output is:
$ boom -n 1000 -c 64 http://localhost:5000/
1000 / 1000 Booooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo! 100.00 %
Summary:
Total: 2.3133 secs.
Slowest: 0.3573 secs.
Fastest: 0.0077 secs.
Average: 0.1437 secs.
Requests/sec: 432.2885
Total Data Received: 1534073 bytes.
Response Size per Request: 1534 bytes.
Status code distribution:
[200] 1000 responses
Response time histogram:
0.008 [1] |
0.043 [46] |∎∎∎
0.078 [24] |∎
0.113 [41] |∎∎∎
0.148 [502] |∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎
0.182 [294] |∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎
0.217 [42] |∎∎∎
0.252 [20] |∎
0.287 [12] |
0.322 [14] |∎
0.357 [4] |
Latency distribution:
10% in 0.1081 secs.
25% in 0.1328 secs.
50% in 0.1413 secs.
75% in 0.1598 secs.
90% in 0.1785 secs.
95% in 0.2188 secs.
99% in 0.3072 secs.
Wow Oleg, 2x faster!! Thanks !!
Awesome work !
But a bit slow (just 16 resp/sec)