Skip to content

[Doc] Script Circuit Breaker #85852

Open
Open
@stefnestor

Description

@stefnestor

👋🏼 Howdy, team! I'm trying to learn more about Script Compilation Circuit Breakers and would like your help interpreting this paragraph:

If the cluster regularly hits the given max_compilation_rate (Q1), it’s possible the script cache is undersized, use Nodes Stats to inspect the number of recent cache evictions, script.cache_evictions_history (Q2) and compilations script.compilations_history. If there are a large number of recent cache evictions or compilations, the script cache may be undersized, consider doubling the size of the script cache via the setting script.cache.max_size (Q3). (Q4)

Questions:

  1. Does this refer to script.max_compilations_rate (code)? Doc has compilation (singular), but GET Cluster Settings _cluster/settings?flat_settings=true&include_defaults=true returns it plural on v7.17.2
  2. I don't know how to return this field. Could it possibly have been renamed to cache_evictions (without the history suffix)?
  3. Does this have any performance concerns? I'd be hesitant to increase thresholds when my cluster's circuit breaking & want to make sure this is safe to double.
  4. My ignorance, but default looking at the returned JSON, I'd think to setup monitoring based off compilation_limit_triggered which I assume guarantees an ES CircuitBreakingException log. What's the benefit of triggering off this vs cache_evictions?

TIA!

Two DEV cluster examples to show what I'm basing my questions from:

# v7.17.2
# GET _nodes/stats?filter_path=nodes.*.script` 
{
  "nodes": {
    "SxPxDGv4QOaXGmLhpIX50w": {
      "script": {
        "compilation_limit_triggered": 0,
        "compilations": 20,
        "cache_evictions": 0
      }
    }
  }
}

# v8.1.2
# nodes.json (from ES diagnostic)
$ cat nodes.json | jq '.nodes["SXVjUW5LRieDSdC41cKAUg"].script'
{
  "contexts": [],
  "compilation_limit_triggered": 0,
  "compilations": 38,
  "cache_evictions": 0,
  "compilations_history": {
    "5m": 0,
    "15m": 0,
    "24h": 5
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    :Core/Infra/Circuit BreakersTrack estimates of memory consumption to prevent overloadTeam:Core/InfraMeta label for core/infra team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions