Week 85 — What is the Epsilon GC?
Question of the Week #85
What is the Epsilon GC?
5 Replies
It’s a no-op garbage collector, that collects no garbage. Can be used when we know heap space will be sufficient or for other performance testing
Submission from elspon
It seems like a kind of garbage collector in java11.It is a way to help decrease consume
Submission from love212121
Epsilon GC is a No-op garbage collector. It handles memory allocation but doesn't reclaim memory that other garbage collectors do. That's why it is called a No Operation Garbage Collector. In other words, Epsilon GC doesn't collect garbage, when the heap segment is filled up, it automatically shuts down the JVM. Epsilon GC was introduced in Java 11
⭐ Submission from rakin235
The JDK provides multiple garbage collectors responsible of making sure the memory of unused objects is freed. One special case is the so-called Epsilon gatbage collector which doesn't clean up any objects but just throws an
OutOfMemoryError
when the Java heap is filled up instead.
This behavior is useful if garbage collection overhead and pause times should be avoided and it possible to restart the application before it reaches its memory limit.
This can be the case for:
- certain benchmarks where something should be measured without GC overhead
- as a baseline to compare other GCs
- batch processing tasks that don't reach the memory limit
- high-performance/real-time applications that can be restarted periodically, e.g. every day