At a glance
Total time the JVM spent paused for garbage collection across the cluster in the last 5 minutes, in milliseconds. Garbage collection is unavoidable, but a “stop-the-world” GC pause freezes the node: during a pause it cannot serve searches, accept indexing, or even answer the master’s health pings. Short, frequent young-generation collections are normal and cheap. Long old-generation pauses are the warning sign: they mean the JVM is under heap pressure and is working hard to reclaim memory. Sustained long pauses make a node intermittently unavailable, drive search latency spikes, and in the worst case lead to the master declaring the node dead.
Calculation
The value is the increase in JVM GC collection time over the 5-minute window, summed across collectors and nodes:collection_time_in_millis is a monotonic lifetime counter, the card takes the delta between two samples rather than reading it absolutely. The 1000ms alert is a total across the window: it can be one 1.2-second old-gen pause (one bad event) or many smaller pauses adding up (chronic pressure). Both matter, but a single long pause is usually the more acute signal because that is the node-freeze your users actually felt. The young/old split, available in the native stats, tells you which: dominated by young-gen is benign churn, dominated by old-gen is the heap-pressure red flag.
Worked example
A platform team runs a 3-node Elasticsearch cluster with 16 GB heap per node, serving storefront search. Snapshot taken on 05 May 26 at 13:20 BST. The card reads 1,840ms for the trailing 5 minutes and has raised. At the same moment Search Latency p95 (ms) has jumped from 140ms to 610ms. The on-call pulls the native per-node GC breakdown:- Young or old? Old-gen dominates (1,510ms of 1,840ms). This is heap pressure, not benign churn. Confirmed by es-data-01 at 91% heap.
- What is filling the heap? They check for a runaway query.
GET /_nodes/stats/breakersshows the fielddata and request breakers on es-data-01 near their limits, and the tasks API reveals a large aggregation with a high-cardinalitytermsfield running against that node. A single expensive aggregation was loading huge fielddata into heap. - Relieve the pressure. They cancel the runaway task. Old-gen GC frees the reclaimed memory, heap on es-data-01 drops to 64%, GC pause time falls back under 200ms/5m on the next window, and p95 returns to 150ms.
- Prevent recurrence. They add a
search.max_bucketsguard and route heavy analytics aggregations to a dedicated index/alias so a single bad query cannot freeze the search-serving node again.
- GC pause time is a symptom; heap is the cause. Never treat a GC alert in isolation. Always pull JVM Heap Used % at the same time; the fix is almost always relieving heap pressure, not tuning the collector.
- The young/old split is the diagnosis. Young-gen-dominated pause time is normal churn; old-gen-dominated is the red flag. The headline number alone does not tell you which, so check the native breakdown before acting.
- Long pauses can cost you a node. If a pause exceeds the master’s fault-detection timeout, the node is declared dead and its shards reallocate, turning a memory problem into a Cluster Status yellow and a shard-rebuild storm. Catching sustained pauses early prevents that escalation.
Sibling cards platform teams should reference together
Reconciling against the source
Where to look in Elasticsearch’s own tooling:On managed services the same data appears as the JVM GC young/old collection-time metrics: AWS OpenSearch/Elasticsearch Service CloudWatch (GET /_nodes/stats/jvmfor the authoritativejvm.gc.collectorssection: per-collectorcollection_countandcollection_time_in_millis. The card derives its 5-minute delta from this.GET /_cat/nodes?v&h=name,heap.percent,heap.currentfor a quick per-node heap view to find the pressured node.GET /_nodes/stats/breakersto see whether circuit breakers are near their limits (the companion symptom). The node’s GC log (gc.log, enabled by default in the JVM options) for the ground-truth pause durations and causes (Allocation Failure, Ergonomics, etc.).
JVMGCYoungCollectionTime, JVMGCOldCollectionTime) and the Elastic Cloud monitoring JVM panels.
Why our value may legitimately differ from a manual check:
Cross-connector reconciliation:
Known limitations / FAQs
The card shows GC pause time but my searches feel fine. Should I worry? Check the young/old split first. If the pause time is dominated by young-generation collections it is normal churn and harmless even at a few hundred ms over 5 minutes. Worry when old-generation pauses dominate and the total crosses the 1000ms alert, especially if it coincides with a Search Latency p95 spike. The number alone is not enough; the collector breakdown is the signal. Can I fix this by tuning the garbage collector? Almost never, and you usually should not try. Elasticsearch ships with a well-tuned default collector (G1 on modern versions) and the official guidance is not to change GC settings. Long pauses are a heap-pressure symptom; the fix is reducing what is loaded into heap (cap expensive aggregations, avoid huge fielddata, right-size shards) or adding heap/nodes, not collector flags. Why does one node show high GC pause while the others are fine? GC is per-JVM, so pressure is node-local. A single node can host a hot shard, receive a runaway aggregation, or load large fielddata while its peers stay idle. The nativeGET /_nodes/stats/jvm and a per-node heap check (GET /_cat/nodes?v&h=name,heap.percent) pinpoint the node; the cause is usually a query routed to that node’s shards.
A long pause caused my node to drop out of the cluster. How?
If a stop-the-world pause exceeds the master’s fault-detection timeout (the node cannot answer health pings while frozen), the master concludes the node has failed and removes it. Its shards then reallocate, turning the cluster yellow and triggering a rebuild. This is why sustained long pauses are dangerous: a memory problem becomes an availability problem. Relieve heap pressure before pauses reach that length.
My heap is set above 31 GB. Could that be making GC worse?
Yes, this is a classic pitfall. Heaps above roughly 30 to 32 GB lose compressed object pointers (compressed oops), so the JVM uses more memory per object and GC works harder for less effective heap. The standard guidance is to keep heap under ~31 GB and set Xms equal to Xmx. An oversized heap can paradoxically produce longer, more frequent old-gen pauses.
The pause time spikes briefly then returns to normal on its own. Is that a problem?
A single isolated old-gen pause that clears is worth noting but not alarming; it may have been a one-off expensive query that has since finished. The alert exists for the sustained case. If you see repeated 1000ms+ windows, that is chronic heap pressure and needs the heap-relief actions above. Use the trend, not a single window, to tell a blip from a pattern.
Does this card include the time spent on circuit-breaker rejections?
No. GC pause time measures only JVM garbage-collection stop-the-world time. Circuit-breaker trips are a separate, related symptom of heap pressure (the JVM rejecting requests before they cause OOM). They often fire together, which is why this card pairs with Circuit Breaker Trips (24h), but they are distinct measurements.