Vector memory pressure
HNSW dense-vector graphs use off-heap RAM on the node. The cushion between available memory and that footprint is tight or shrinking, with elevated heap and other load signals.
For a complete list of insights, refer to AutoOps insights.
| Field | Value |
|---|---|
| Component | Elasticsearch |
| Severity | High |
| Scope | Node |
| Domains | performance, search, memory, vector |
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.
HNSW off-heap vector footprint leaves little free RAM. Affected node(s): es-data-01 and es-data-02.
The node is near its off-heap memory limit.
Heap usage is elevated due to off-heap memory pressure spilling over.
Both search/index latency and disk read activity are elevated; the HNSW graph might start paging.
AutoOps shows different recommendations depending on how their conditions match your deployment or cluster.
Reduce vector footprint
Condition: Shown when vector footprint is growing, off-heap headroom is escaping, or the compression regime is tight.
Reduce HNSW off-heap memory on this node where quality allows: use fewer dimensions, quantized or compressed vector mappings, delete or archive unneeded data, split indices, or reindex with a leaner mapping. See BBQ HNSW for options. Validate recall and latency against your SLOs after changes.
Switch to DiskBBQ vector index
Condition: Shown when JVM heap is elevated above the node's 24-hour median and this event is active.
When HNSW indices keep the full graph in physical memory, switch to DiskBBQ to store most of the graph on disk instead of RAM. Expect different recall and latency versus HNSW; test before changing production mappings.
Upgrade node hardware
Condition: Shown when off-heap headroom is escaping or the compression regime is tight.
This node is under memory pressure. Reduce heap size to less than 31 GB.
Tune kNN query load
Condition: Shown when search latency is elevated relative to baseline without a matching rate increase.
Reduce kNN load when search latency is high: lower num_candidates, reduce concurrent query rate or client fan-out, and narrow knn or script_score usage where possible. Re-check latency and error rates after changes.
Enable and review search slow logs
Condition: Shown when search or index latency is elevated.
Enable search slow logs with the action below, then review the slow log to find expensive queries. See Slow logs for configuration details.
PUT logs-prod-000045/_settings
{
"index.search.slowlog.threshold.query.warn": "10s",
"index.search.slowlog.threshold.query.info": "5s",
"index.search.slowlog.threshold.query.debug": "2s",
"index.search.slowlog.threshold.query.trace": "500ms",
"index.search.slowlog.threshold.fetch.warn": "1s",
"index.search.slowlog.threshold.fetch.info": "800ms",
"index.search.slowlog.threshold.fetch.debug": "500ms",
"index.search.slowlog.threshold.fetch.trace": "200ms"
}
Requires the manage index privilege. Requires Elasticsearch 8.0.0 or later. This action changes cluster or index configuration.
Increase heap on node
Condition: Shown when JVM heap is elevated above the node's 24-hour median.
Current max heap is 30 GB. Set JVM heap to 31 GB (suitable for this machine type), then restart the node.
Tune circuit breakers
Condition: Shown when circuit breaker pressure is elevated and heap, search or index latency, or disk read stress is also present.
Tune circuit breaker limits to prevent out-of-memory errors while allowing legitimate query and aggregation load. Adjust parent, fielddata, and request breaker settings in elasticsearch.yml based on your heap size and workload.
Dense-vector fields that use HNSW keep approximate nearest-neighbor graphs primarily in physical memory, off the Java heap. A node can look healthy on heap charts while vector graphs still consume a large share of RAM.
When that off-heap footprint grows into a tight memory band, kNN and dense-vector workloads compete with indexing, search, and disk I/O on the same node. Latency can rise, thread pools can back up, and circuit breakers might trip if pressure continues.