elasticsearch/elasticsearch — pull request #6261 by polyfractal (2014-05-21 15:37:02+00:00)
Title: Add FieldData and Filter eviction rates to stats

This adds one-, five- and fifteen-minute eviction rates for FieldData and Filter stats. Cumulative eviction counts don't give much insight into the nature and frequency of evictions. Particularly as server uptime increases, cumulative counts become relatively useless.

By measuring and the rates over short time intervals, the user can more easily understand how their system is behaving. Rates are backed by an exponentially weighted moving average, so more recent evictions contribute to the counter moreso than older evictions.

Example output:

```json
{
"filter_cache": {
"memory_size_in_bytes": 62312,
"evictions": 135,
"rates": [
69.08162576026469,
14.280663898122489,
4.786691323769226
]
},
"fielddata": {
"memory_size_in_bytes": 2101455,
"evictions": 42,
"rates": [
40.29761502682106,
8.330387273904783,
2.7922366055320484
]
}
}
```

I like the array notation because it is concise and matches linux `load` formatting, but it might be better to display this as a map that labels each rate for people unfamiliar with `load` ?