0

I am looking at a garbage collection report and at the bottom there is the Tenuring Summary section which contains a metric Survival Count - what is this? This is not a metric that I can explicitly see in the GC logs when adding -XX:+PrintTenuringDistribution, is GCeasy intuiting this somehow?


    Age      Survival Count   Average size (kb)   Average Total 'To' size (kb)
    age 1    110              96693.33            96693.33
    age 2    110              2187.87             98881.2

Follow up question - would you consider a high survival count good? Bad? Is it natural for the number to go up? There is a lot of documentation around tenuring threshold which I understand, along with how the G1 gc works, but I cannot find anything regarding this metric.

Thanks for any input!

Tim
  • 284
  • 1
  • 4
  • 20
  • 1
    Why to you care whether a number whose meaning you don’t understand is “good” or “bad”? You have an average pause time of 75.3 ms and a maximum pause time of 110 ms. Is that ok for your application or do you need less latency? Your application ran 29 min 15 sec and spent 8.5 sec of that time for garbage collection. Is that too much for you? I think, spending 0.05% of the time for GC is fine. So all those other numbers are irrelevant noise, recorded and presented to make the report look impressive. – Holger Apr 16 '21 at 09:48
  • 1
    @Holger Your comment isn't helpful at all. I'm not concerned about GC performance, I want to know what the difference between Tenuring Threshold and Survival Count is. These are real GC metrics that aren't "noise". – Tim Apr 16 '21 at 16:44
  • 1
    Of course, it is noise. This report even has a section labelled as “Important section of the report”, admitting that the rest is not important. And among the unimportant stuff, the “Survival Count” stuff comes last. But why don’t you ask those who generated that shiny report about the meaning of the stuff they included? And why do you ask whether we “consider a high survival count good? Bad?” if you are “not concerned about GC performance”? What kind of “good” or “bad” do you have in mind? – Holger Apr 16 '21 at 16:56
  • 1
    Tenuring threshold is not noise, do you know how garbage collection works? You cannot be so naive as to suggest that just because something is at the bottom of a report does not mean it's important. You've clearly never looked much into garbage collection. Please stop. I'm trying to understand patterns and gc behavior. – Tim Apr 16 '21 at 18:31

1 Answers1

1

Posting answer from Ram Lakshmanan here

Survival Count - what is this? This is not a metric that I can explicitly see in the GC logs when adding -XX:+PrintTenuringDistribution, is GCeasy intuiting this somehow?

You are right, this field is not printed in the raw GC log file. GCeasy adds this column.

Below is how tenuring distribution information is printed in the raw GC log:

Desired survivor size 25165824 bytes, new threshold 15 (max 15)

  • age 1: 975840 bytes, 975840 total
  • age 2: 3250392 bytes, 4226232 total

Desired survivor size 125829120 bytes, new threshold 15 (max 15)

  • age 1: 1955504 bytes, 1955504 total
  • age 2: 861448 bytes, 2816952 total
  • age 3: 3221904 bytes, 6038856 total

Desired survivor size 109051904 bytes, new threshold 15 (max 15)

  • age 1: 12321336 bytes, 12321336 total
  • age 2: 1567088 bytes, 13888424 total
  • age 3: 717304 bytes, 14605728 total
  • age 4: 3153216 bytes, 17758944 total

GCeasy counts number of times 'age 1', 'age 2', 'age 3'.... is present in the GC logs and prints it's sum in the 'survival count' column. It takes average of the second column in the raw GC log and prints it under the 'Average size (kb)' column. It takes average of the third column in the raw GC log and prints it under the 'Average Total 'To' size (kb)' column.

Follow up question - would you consider a high survival count good? Bad? Is it natural for the number to go up?

Based on our calculation, it's natural of for earlier ages (i.e. age 1, age 2) to be higher. I don't have much grip on this subject, you may refer to '-XX:+PrintTenuringDistribution' section of this blog.

Tim
  • 284
  • 1
  • 4
  • 20
  • 2
    So I stand corrected. Knowing, the “*number of times 'age 1', 'age 2', 'age 3'.... is present in the GC logs*” is a highly valuable information, every developer should pay attention for. It *could* be identical to the number of GC cycles, as each of them generates such a log entry, but we all should better re-check every time we run an application. Not having an actual garbage collection problem is not an excuse for not checking whether this number still is identical to the number of GC cycles. – Holger Apr 17 '21 at 09:54