What does node.js --trace-gc output mean?

I get below output from node.js when the -trace-gc option is used

[24851]      852 ms: Scavenge 26.8 (57.2) -> 20.8 (58.2) MB, 3.1 ms [allocation failure].
[24851]      927 ms: Scavenge 28.7 (58.2) -> 22.4 (59.2) MB, 2.0 ms [allocation failure].
[24851]     1013 ms: Scavenge 30.4 (61.2) -> 24.1 (61.2) MB, 2.3 ms [allocation failure].
[24851]     1067 ms: Scavenge 31.6 (62.2) -> 24.8 (62.2) MB, 2.1 ms [allocation failure].
[24851] Speed up marking because marker was not keeping up
[24851] Postponing speeding up marking until marking starts
[24851] Speed up marking because marker was not keeping up
[24851] Postponing speeding up marking until marking starts
[24851] Speed up marking because marker was not keeping up
[24851] Postponing speeding up marking until marking starts
[24851]     1359 ms: Mark-sweep 90.9 (115.1) -> 53.6 (113.7) MB, 9.0 ms (+ 19.3 ms in 105 steps since start of marking, biggest step 1.7 ms) [GC interrupt] [GC in old space requested].
[24851]     1578 ms: Scavenge 69.6 (113.7) -> 62.4 (115.7) MB, 6.0 ms [allocation failure].
[24851]     1676 ms: Scavenge 73.1 (117.7) -> 64.1 (121.7) MB, 5.9 ms [allocation failure].

Can someone explain the meaning of each element in the output above?

+4
source share
2 answers

I also did not see any documentation, but I look at the result process.memoryusage()along with the use of --trace_gcoffers:

Scavenge <heapUsed before> (<heapTotal before>) -> <heapUsed after> (<heapTotal after>) MB, <how long the GC pause was>

Where heapUsedand heapTotaldescribed as process.memoryusage(), but better explained with this answer .

0
source

, node --trace_gc server.js, Activity Monitor => Memory => Search node . , , . : Scavenge & Mark-sweep. Scavenge , , ... Mark-sweep, , , . , , , , . Mark-sweep . , !

0

Source: https://habr.com/ru/post/1616136/


All Articles