[Internal]: Clarify circuit breaker diagnostics and JVM memory pressure

Aperta Adatta ai principianti
#9,579 2 commenti 1 reazione 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 2 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
72/100
Tipo di issue
Documentazione
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Ambito
documentation

Direzione di ricerca

Apri il Markdown sorgente della pagina circuit-breaker-errors e della pagina sulla pressione di memoria JVM ECH/ECE (deploy-manage/monitor/ec-memory-pressure) in questo repo; l’issue fornisce la bozza di formulazione per tutte e cinque le modifiche, quindi inizia individuando ciascuna delle frasi citate e le sezioni in cui si trovano. Verifica i valori predefiniti del breaker padre e indices.breaker.total.use_real_memory rispetto al riferimento circuit-breaker-settings e alle fonti collegate HierarchyCircuitBreakerService e JvmStats prima di incollare. Fatto significa che tutte e cinque le modifiche sono presenti, i link incrociati si risolvono e le due pagine concordano tra loro.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Team:Admin triaged
Description

What: Improve Circuit breaker errors, and clarify the breaker-threshold explanation on JVM memory pressure indicator.

Why: Readers need help interpreting parent breaker errors when monitored memory percentages are below the breaker threshold, checking customized breaker limits, and understanding fielddata breaker errors on keyword fields. These questions came up repeatedly in support cases.

circuit-breaker-errors page

  1. Explain the parent breaker message. The page shows example errors but doesn't explain the fields. With indices.breaker.total.use_real_memory: true (the default), would be equals real usage plus new bytes reserved (the page's own example adds up: 120182112 + 3666526 = 123848638). real usage is whole-heap usage measured at the time of the check. usages [...] lists each child breaker's tracked usage multiplied by its overhead, not a breakdown of all heap usage.

    References: KB https://support.elastic.co/knowledge/d3cb4f31

  2. Say which metric the 95% applies to. The intro says: "By default, the parent circuit breaker triggers at 95% JVM memory usage. To prevent errors, we recommend taking steps to reduce memory pressure if usage consistently exceeds 85%." It doesn't say which metric the 95% refers to. Suggested wording, for example under "Check JVM memory usage":

    "With indices.breaker.total.use_real_memory: true (the default), the parent breaker compares measured total JVM heap usage plus newly reserved bytes with indices.breaker.total.limit, which defaults to 95% of the maximum JVM heap. Monitoring samples heap usage separately, and the JVM memory pressure metric described in High JVM memory pressure measures the old-generation pool rather than total heap usage. A parent breaker error therefore doesn't require either monitored percentage to show 95%. See Parent circuit breaker settings for other configurations."

    The intro could also say "95% of the maximum JVM heap by default" instead of "95% JVM memory usage".

    References: Circuit breaker settings, High JVM memory pressure

  3. Check for customized breaker limits. The page doesn't mention that a lowered limit makes the breaker reject requests at lower memory usage than the defaults. Suggested wording:

    "Check the breaker named in the error and its reported limit. Customized breaker limits can cause requests to be rejected at lower memory usage than the defaults. Use GET _cluster/settings to inspect persistent and transient overrides, and review breaker settings in your node configuration, for example elasticsearch.yml or user settings on Elastic Cloud Hosted. If a limit was lowered unintentionally, you can clear persistent and transient overrides by setting them to null; Elasticsearch then uses any value from the node configuration, and otherwise the default. Don't raise or reset a limit only because monitored memory usage looks low: first find out why it was configured."

    References: KB https://support.elastic.co/knowledge/745357f1, cluster update settings (order of precedence, null reset), Circuit breaker settings (limits marked as supported on Elastic Cloud Hosted), ECH user settings

  4. Mention global ordinals next to "Avoid using fielddata on text fields". The section suggests a keyword field instead of fielddata on text, but aggregations on keyword fields can still trip the fielddata breaker through global ordinals. On a test deployment with a lowered fielddata limit, a terms aggregation on a keyword field failed with [fielddata] Data too large, data for [Global Ordinals]. Suggested wording:

    "A keyword field can still use field data cache heap through global ordinals. Aggregations on fields with many unique values can therefore trigger the fielddata circuit breaker even without fielddata enabled on text fields. See Reduce field data usage and Avoiding global ordinal loading."

    References: eager_global_ordinals

JVM memory pressure indicator page (ECH/ECE)

  1. Clarify the breaker-threshold sentence. The page says: "When the JVM memory pressure indicator rises above 95%, Elasticsearch's real memory circuit breaker triggers to prevent your instance from running out of memory." That's accurate, but it's the only link the page makes between the indicator and the breaker, and it doesn't say that the breaker can also trip below 95%: the indicator measures the old-generation pool, while the parent breaker checks total heap usage. Suggested replacement for that sentence, keeping the resizing advice that follows:

    "With indices.breaker.total.use_real_memory: true (the default), the parent circuit breaker compares JVM-reported total heap usage plus newly reserved bytes with its configured limit, which defaults to 95% of the maximum JVM heap. With G1, total heap usage includes young-generation memory, whereas this indicator measures old-generation occupancy. The parent breaker can therefore reject operations while the indicator is below 95%. See Circuit breaker errors."

    References: JVM memory pressure indicator, Parent circuit breaker settings

Resources
Which deployment methods does this change impact?

Elastic On-Prem and Cloud (all)

Feature differences

Items 1–4 apply to self-managed, ECE, ECK, and Elastic Cloud Hosted. Item 5 applies only to ECH and ECE, where the JVM memory pressure indicator exists. Elastic Cloud Serverless is outside this request.

What Elastic Stack release is this request related to?

N/A

Serverless release

No response

Collaboration model

The documentation team will create the first draft

Point of contact.

Main contact: @anmironov

Stakeholders: @consulthys

Lingua principale
Nessun dato sulla lingua
Stelle
50
Fork
269
Merge medio
4g 4h
PR unite (30g)
238

Preparare l'ambiente

  • Nessun Dockerfile né file Docker Compose
  • Ha un modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di elastic/docs-content

Tutte le issue di elastic/docs-content

Issue simili

Altre issue su Documentation

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.