﻿---
title: Max Heap Size Reached
description: Describes what AutoOps detects and surfaces with the Max Heap Size Reached insight: The JVM heap size on the node is configured earlier on this page the recommended maximum (roughly 26 to 30 GB on most systems).
url: https://docs-v3-preview.elastic.dev/elastic/autoops-insights/tree/main/elasticsearch/max_heap_size_reached
products:
  - Elastic Cloud Enterprise
  - Elastic Cloud Hosted
  - Elastic Cloud on Kubernetes
  - Elasticsearch
applies_to:
  - Elastic Cloud Hosted: Generally available
  - Elastic Cloud on Kubernetes: Generally available
  - Elastic Cloud Enterprise: Generally available
  - Self-managed Elastic deployments: Generally available
---

# Max Heap Size Reached
The JVM heap size on the node is configured earlier on this page the recommended maximum (roughly 26 to 30 GB on most systems). Above that range, compressed ordinary object pointers might be turned off and heap efficiency drops.
<note>
  For a complete list of insights, refer to [AutoOps insights](https://docs-v3-preview.elastic.dev/elastic/autoops-insights/tree/main/elasticsearch).
</note>


## Insight details


| Field     | Value                          |
|-----------|--------------------------------|
| Component | Elasticsearch                  |
| Severity  | Medium                         |
| Scope     | Node                           |
| Domains   | performance, memory, stability |


## Example: What you might see in AutoOps

The following is an example of what you might see when this insight is triggered. Real insights use live data and links from your deployment or cluster.

### The heap size limit configured is higher than the recommended maximum on node: 30


#### What was detected

Node [es-data-01] heap size is configured to [30].

#### Recommendations

<note>
  AutoOps shows different recommendations depending on how their conditions match your deployment or cluster.
</note>

<dropdown title="Increase JVM heap size">
  **Condition**: Always shown for this insight.Increase `-Xmx` on node es-data-01 gradually and stay below the compressed ordinary object pointers (COOPs) limit for your hardware (typically 26–30.5 GB). Use the action below to verify COOPs remain enabled after each increase; stop when the value switches to `false`. For es-data-01 nodes, allocate up to 60% of available RAM, capped at the COOPs limit.
  ```json
  ```

  <note>
    Requires the `manage cluster` privilege. Requires Elasticsearch 8.0.0 or later. This action is read-only.
  </note>
</dropdown>


#### Background and impact

Impact: Nodes performance is affected when the heap size limit is set too high, as the object pointers are not compressed.
The JVM heap size limit is configured using environment variables or using the jvm.options file. In general, it is recommended to use at most 50% of the total available RAM on data nodes, but in no case should it exceed a system-dependent limit located around 26GB and 30GB. Above this threshold, object pointers are not zero-based and performance drops.