Open
Description
👋🏼 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 compilationsscript.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 settingscript.cache.max_size
(Q3). (Q4)
Questions:
- Does this refer to
script.max_compilations_rate
(code)? Doc hascompilation
(singular), but GET Cluster Settings_cluster/settings?flat_settings=true&include_defaults=true
returns it plural on v7.17.2 - I don't know how to return this field. Could it possibly have been renamed to
cache_evictions
(without thehistory
suffix)? - 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.
- 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 vscache_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
}
}