Does Node.js increase scalability due to garbage collection under high load?

Although Node.js is a pretty hot topic, I found that it was reported that it was Node.js, which may not be suitable for a real-time application due to its Garbage Collection model (http://amix.dk/blog/record / 19577). And some tests show that Node.js responds more slowly compared to RingoJS (http://hns.github.com/2010/09/29/benchmark2.html).

Node.js is currently tied to the JavaScript V8 engine, which uses the global GC global dormancy.

So there will be .js if the incoming requests are massive? If there is real production statistics, it will be better.

thank

+5
source share
1 answer

The cost of garbage collection depends on the number of objects in the heap, in particular on the number of long-lived objects. The more you have, the more time will be spent on the GC.

Yes, the V8 can sometimes take some significant GC pauses, if the heap is big. The V8 team seems to be working to minimize the cost of each GC pause, spreading the work. You can see the cost of GC in your node programs by running it with --trace-gc.

GC . GC, V8, . , GC , .

+2

All Articles