0

I am trying to understand this logging:

2017-01-19T12:01:11.058+0000: [GC (Allocation Failure) [PSYoungGen: 172192K->1760K(171520K)] 379103K->208719K(521216K), 0.2104413 secs] [Times: user=0.02 sys=0.00, real=0.21 secs]
         vmop                    [threads: total initially_running wait_to_block]    [time: spin block sync cleanup vmop] page_trap_count
50409.055: ParallelGCFailedAllocation       [     392          3              4    ]      [     0     0     0     0   210    ]  0
2017-01-19T12:01:11.268+0000: Total time for which application threads were stopped: 0.2115093 seconds, Stopping threads took: 0.0001451 seconds

Let me present what I think I know and please correct me if I'm wrong:

First the young part: PSYoungGen: 172192K->1760K(171520K)

This means young generation had capacity of 171520K of which 172192K was in use. As a result the VM triggered a GC while trying to allocate memory and after that the young generation was trimmed down to 1760K used.

What bothers me here is that used 172192K > 171520K total.

Now, on to the other part: 379103K->208719K(521216K)

This means old generation had capacity 521216K and only 379103K was in use. Somehow it went down to 208719K???

So, my question is, why is the old generation reducing usage if this is a young generation collection? Shouldn't the old generation remain the same, or increase (if something was promoted)? What am I missing here?

And what about the used / total size of the young generation where it manages to use more than what is available?

Alexandros
  • 2,097
  • 20
  • 27

1 Answers1

1

1) For the question:

So, my question is, why is the old generation reducing usage if this is a young generation collection?

The values 379103K->208719K(521216K) define the size before GC -> after GC (total) of the entire heap, not the old generation.

2) To explain the differences between used / total size of the young generation let look at the definition of each part (In bold the parts that i think make the difference):

The numbers before and after the arrow (172192K->1760K) indicate the combined size of live objects before and after garbage collection, respectively. After minor collections the size includes some objects that are garbage (no longer alive) but that cannot be reclaimed. These objects are either contained in the tenured generation, or referenced from the tenured or permanent generations.

The next number in parentheses ( 171520K) is the committed size of the heap: the amount of space usable for java objects without requesting more memory from the operating system. Note that this number does not include one of the survivor spaces, since only one can be used at any given time, and also does not include the permanent generation, which holds metadata used by the virtual machine.

More information are available here

Community
  • 1
  • 1
hasnae
  • 2,137
  • 17
  • 21