When Throughput Matters – Parallel GC

As I mentioned in one of the previous posts, Parallel Collector is also called Throughput Collector, because its main goal is to maximize overall throughput of the application. The two basic operations that Parallel Collector performs are Minor GC and Full GC. These are pretty straightforward.   Minor GC When Eden fills up, the young…

Read more...

GC Algorithms

As described in the previous post, we have four different garbage collectors available in HotSpot JVM. There are some significant differences between them, but the actual concepts behind the algorithms which are used to do the actual job are quite similar. In this short post, I will try to explain three basic algorithms: Mark-sweep Mark-sweep-compact…

Read more...

Garbage Collectors Overview

The current version of HotSpot JVM includes three types of garbage collectors: – Serial Collector – Parallel Collector – The Mostly Concurrent Collectors   All of them are generational ones, meaning that they take advantage of the way the heap is divided.   There are three main operations which garbage collector is responsible for: –…

Read more...

Yet Another Post About Java Heap Space

Generational Garbage Collectors JVM heap is divided into two different Generations. One is called Young and the second one is the Old (sometimes referred to as Tenured). The Young Generation is further separated into two main logical sections: Eden and Survivor spaces. There are also Virtual spaces for both Young and the Old Generations which…

Read more...

What Causes OutOfMemoryError?

OutOfMemoryError might be thrown when one of the following circumstances occurs: JVM has run out of native memory Java heap is out of memory PermGen or Metaspace has run out of memory JVM spent too much time trying to collect the garbage The root cause of OutOfMemoryError can be usually deducted from the error message. Let’s…

Read more...

Shallow, Retained and Deep Size

If you ever worked with heap analysis, you might have encountered terms such as shallow, retained and deep size of an object. It doesn’t really matter if we’re talking about analyzing JVM heap dump with VisualVM or JavaScript heap snapshot with Chrome DevTools – the terms are the same. The difference between shallow, retained and…

Read more...