3

I am looking at GC.stat metrics and it seems like there are not good official docs about them.

These 2 articles were helpful:

Can someone clarify what is the time frame for which the metrics are reported.

eg:

 {:count=>258,
 :heap_used=>2186,
 :heap_length=>3202,
 :heap_increment=>1016,
 :heap_live_num=>673453,
 :heap_free_num=>239928,
 :heap_final_num=>0,
 :total_allocated_object=>11211755,
 :total_freed_object=>10538302}

Here is what I know and what I don't:

 :count=> Since the start of the process 
 :heap_used=> Since ?
 :heap_length=>Since ?
 :heap_increment=>Since ?
 :heap_live_num=>Since ?
 :heap_free_num=>Since ?
 :heap_final_num=>Since ?
 :total_allocated_object=> Since the start of the process
 :total_freed_object=> Since the start of the process

Can someone clarify for the metrics with '?' the timeframe. It could be since the start of the process or since the last GC .

I am guessing its all 'Since start of the process' to be consistant, but I want to be sure .

Ruby2.0

Community
  • 1
  • 1
codeObserver
  • 6,521
  • 16
  • 76
  • 121
  • 1
    My guess would be that "heap_free_num" is basically the number available right when you made the call to GC.stat (it has that much free space that it will fill before it performs the next GC) – rogerdpack Dec 17 '13 at 22:19
  • heap_live_num: updated at each GC.stat call heap_free_num: updated at last GC run heap_final_num: updated at last GC run – mestachs Jan 20 '14 at 08:09

1 Answers1

0

Based on the first resource you already posted, we can conclude the following:

  • heap_used: currently
  • heap_length: currently
  • heap_increment: currently (updated if after a GC run there is not enough space)
  • heap_live_num: currently (updated after each GC run)
  • heap_free_num: currently (updated after each GC run)
  • heap_final_num: curently (updated after each GC run)
Agis
  • 32,639
  • 3
  • 73
  • 81