Home Arrow Icon Knowledge base Arrow Icon Global Arrow Icon what are the main use cases for Shenandoah and ZGC
    Shenandoah GC ZGC garbage collection low latency high throughput large heaps NUMA-aware Java garbage collectors


what are the main use cases for Shenandoah and ZGC


The main use cases for Shenandoah and ZGC are:

Shenandoah GC:

1. Low Latency: Shenandoah is designed to minimize pause times by performing most garbage collection work concurrently with the application. This ensures that the application remains responsive and performs well even under heavy memory usage.

2. High Throughput: Shenandoah is designed to provide high throughput by minimizing the time spent on garbage collection. This ensures that the application can continue to run efficiently even under heavy memory usage.

3. Large Heaps: Shenandoah is designed to handle large heaps efficiently, making it suitable for applications that require large memory allocations.

4. Constant Allocation: Shenandoah is suitable for applications with constant allocation and usage of objects, as it can handle this efficiently.

5. Older Objects: Shenandoah is suitable for applications where objects are older and the overhead of creating new objects is small, as it can handle this efficiently.

6. Container Usage: Shenandoah can be used in containerized environments, but it depends on the specific use case.

ZGC:

1. Low Latency: ZGC is designed to minimize pause times by performing most garbage collection work concurrently with the application. This ensures that the application remains responsive and performs well even under heavy memory usage.

2. High Throughput: ZGC is designed to provide high throughput by minimizing the time spent on garbage collection. This ensures that the application can continue to run efficiently even under heavy memory usage.

3. Large Heaps: ZGC is designed to handle large heaps efficiently, making it suitable for applications that require large memory allocations.

4. NUMA-Aware: ZGC is designed to be NUMA-aware, which means it can efficiently handle large heaps and multiple CPU cores.

5. Experimental Feature: ZGC is an experimental feature and requires specific command-line options to enable. It is suitable for applications that require very short pause times and can handle large memory allocations.

In summary, both Shenandoah and ZGC are designed to provide low latency and high throughput, making them suitable for applications that require efficient memory management.

Citations:
[1] https://www.opsian.com/blog/aleksey-shipilev-shenandoah-concurrent-gcs/
[2] https://clojure-goes-fast.com/blog/shenandoah-in-production/
[3] https://wiki.openjdk.org/display/shenandoah/Main
[4] https://www.diva-portal.org/smash/get/diva2:1466940/FULLTEXT01.pdf
[5] https://developers.redhat.com/articles/2024/05/28/beginners-guide-shenandoah-garbage-collector