Get cache statistics Technical preview; Added in 7.13.0

GET /_searchable_snapshots/cache/stats

Get statistics about the shared cache for partially mounted indices.

Required authorization

  • Cluster privileges: manage
More about searchable snapshots

Responses

  • 200 application/json
    Hide response attribute Show response attribute object
    • nodes object Required
      Hide nodes attribute Show nodes attribute object
      • * object Additional properties
        Hide * attribute Show * attribute object
        • shared_cache object Required
          Hide shared_cache attributes Show shared_cache attributes object
          • reads number Required
          • bytes_read_in_bytes
          • writes number Required
          • bytes_written_in_bytes
          • evictions number Required
          • num_regions number Required
          • size_in_bytes
          • region_size_in_bytes
GET /_searchable_snapshots/cache/stats
curl \
 --request GET 'http://api.example.com/_searchable_snapshots/cache/stats'
Response examples (200)
A successful response from `GET /_searchable_snapshots/cache/stats`.
{
  "nodes" : {
    "eerrtBMtQEisohZzxBLUSw" : {
      "shared_cache" : {
        "reads" : 6051, // The number of cache region read operations. If reads > writes, the difference represents requests successfully served from the cache without accessing the snapshot repository.
        "bytes_read_in_bytes" : 5448829,
        "writes" : 37, // The number of cache region write operations. If reads == writes, every request required fetching data from the snapshot repository into the cache.
        "bytes_written_in_bytes" : 1208320,
        "evictions" : 5, // The number of cache region evictions. A low eviction count indicates the cache is effectively serving requests. Use this metric to evaluate cache sizing.
        "num_regions" : 65536,
        "size_in_bytes" : 1099511627776,
        "region_size_in_bytes" : 16777216 // The size of each cache region. A region is a contiguous byte range stored on local disk.
      }
    }
  }
}