How to view the log of gc in Node application
This article mainly explains "how to view the gc log in the Node application". The content in the article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "how to view the gc log in the Node application".
By enabling parameters-- trace-gc and-- trace-gc-verbose
$node-trace-gc index.js
[10711:0x3507b20] 36425 ms: Mark-sweep 28.6 (48.2)-> 19.3 (46.7) MB, 3.90.0 ms (+ 10.4 ms in 8 steps since start of marking, biggest step 6.9 ms, walltime since start of marking 77 ms) (average mu = 0.997, current mu = 0.997) finalize incremental marking via task GC in old space requested
[10711:0x3507b20] 36434 ms: Scavenge 21.0,46.7-> 5.746.7 MB, 1.00.0 ms (average mu = 0.997, current mu = 0.997) allocation failure
[10711:0x3507b20] 36494 ms: Scavenge 21.146. 7-> 6. 2 (46. 7) MB, 2. 3 / 0. Ms (average mu = 0.997, current mu = 0.997) allocation failure
[10711:0x3507b20] 36562 ms: Scavenge 21.1 (46.7)-> 6.0 (46.7) MB, 2.80.0 ms (average mu = 0.997, current mu = 0.997) allocation failure
Thank you for reading, the above is the content of "how to view the gc log in the Node application". After the study of this article, I believe you have a deeper understanding of how to view the gc log in the Node application, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!