Concurrent Humongous Allocations

Article ID:360001019012
2 minute readKnowledge base

Issue

  • I found a number of concurrent humongous allocation messages in my garbage collection log

 59.584: [G1Ergonomics (Concurrent Cycles) do not request concurrent cycle initiation, reason: still doing mixed collections, occupancy: 1891631104 bytes, allocation request: 1972856 bytes, threshold: 966367620 bytes (45.00 %), source: concurrent humongous allocation]
 59.593: [G1Ergonomics (Concurrent Cycles) do not request concurrent cycle initiation, reason: still doing mixed collections, occupancy: 1893728256 bytes, allocation request: 1972760 bytes, threshold: 966367620 bytes (45.00 %), source: concurrent humongous allocation]
 59.595: [G1Ergonomics (Concurrent Cycles) do not request concurrent cycle initiation, reason: still doing mixed collections, occupancy: 1895825408 bytes, allocation request: 1971840 bytes, threshold: 966367620 bytes (45.00 %), source: concurrent humongous allocation]
 59.597: [G1Ergonomics (Concurrent Cycles) do not request concurrent cycle initiation, reason: still doing mixed collections, occupancy: 1897922560 bytes, allocation request: 1971584 bytes, threshold: 966367620 bytes (45.00 %), source: concurrent humongous allocation]

To see these errors in your GC logs, you’ll need to have verbose GC logging enabled as mentioned in Prepare CloudBees CI for Support.

A humongous allocation when using the G1 garbage collection algorithm, are allocations that are larger than 50% of the region size.

Having frequent humongous allocations can trigger GC performance issues, considering the way that G1 handles such allocations.

It’s important to be running an updated JDK, such as 1.8.0_202 or above in order to take advantage of the multitude of improvements to the G1 Garbage Collection algorithm.

Environment

Resolution

  1. Ensure that you are following Best Practices

Tuning humongous allocation settings are a deprecated method of working around known issues as G1 matured, and in essence, were a way for Java Developers to be smarter than the GC algorithm which in the most recent versions of the JDK does more harm than good.

Instead, please ensure you are following the aforementioned best practices, and provide a support bundle with GC logs to CloudBees Support for analysis if you see this error.