Node.js and V8 garbage collection

后端 未结 1 1587
-上瘾入骨i
-上瘾入骨i 2020-12-24 08:38

Here\'s what\'s I\'ve read so far, and correct me if I\'m wrong:

  1. Node.js is based on V8 JavaScript engine.
  2. V8 JavaScript engine implements stop-the-wo
相关标签:
1条回答
  • 2020-12-24 09:35

    Whether it is acceptable depends on your application and your heap size. Big Gc is around 1.3ms per Mbyte. YMMV. About half that for a compacting GC. Around 1 GC in 10 is big. Around 1 big GC in 3 is compacting. Use V8 flag --trace-gc to log GCs. We have done some work on reducing pauses. No promises, no timetables. See branches/experimental/gc in V8 repo.

    0 讨论(0)
提交回复
热议问题