node-cache-stats.asciidoc 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. [role="xpack"]
  2. [[searchable-snapshots-api-cache-stats]]
  3. === Cache stats API
  4. ++++
  5. <titleabbrev>Cache stats</titleabbrev>
  6. ++++
  7. Retrieves statistics about the shared cache for <<partially-mounted,partially
  8. mounted indices>>.
  9. [[searchable-snapshots-api-cache-stats-request]]
  10. ==== {api-request-title}
  11. `GET /_searchable_snapshots/cache/stats` +
  12. `GET /_searchable_snapshots/<node_id>/cache/stats`
  13. [[searchable-snapshots-api-cache-stats-prereqs]]
  14. ==== {api-prereq-title}
  15. If the {es} {security-features} are enabled, you must have the
  16. `manage` cluster privilege to use this API.
  17. For more information, see <<security-privileges>>.
  18. [[searchable-snapshots-api-cache-stats-path-params]]
  19. ==== {api-path-parms-title}
  20. `<node_id>`::
  21. (Optional, string) The names of particular nodes in the cluster to target.
  22. For example, `nodeId1,nodeId2`. For node selection options, see
  23. <<cluster-nodes>>.
  24. //[[searchable-snapshots-api-cache-stats-query-params]]
  25. //==== {api-query-parms-title}
  26. [role="child_attributes"]
  27. [[searchable-snapshots-api-cache-stats-response-body]]
  28. ==== {api-response-body-title}
  29. `nodes`::
  30. (object)
  31. Contains statistics for the nodes selected by the request.
  32. +
  33. .Properties of `nodes`
  34. [%collapsible%open]
  35. ====
  36. `<node_id>`::
  37. (object)
  38. Contains statistics for the node with the given identifier.
  39. +
  40. .Properties of `<node_id>`
  41. [%collapsible%open]
  42. =====
  43. `shared_cache`::
  44. (object)
  45. Contains statistics about the shared cache file.
  46. +
  47. .Properties of `shared_cache`
  48. [%collapsible%open]
  49. ======
  50. `reads`::
  51. (long) Number of times the shared cache is used to read data from.
  52. `bytes_read_in_bytes`::
  53. (long) The total of bytes read from the shared cache.
  54. `writes`::
  55. (long) Number of times data from the blob store repository is written in the shared cache.
  56. `bytes_written_in_bytes`::
  57. (long) The total of bytes written in the shared cache.
  58. `evictions`::
  59. (long) Number of regions evicted from the shared cache file.
  60. `num_regions`::
  61. (integer) Number of regions in the shared cache file.
  62. `size_in_bytes`::
  63. (long) The total size in bytes of the shared cache file.
  64. `region_size_in_bytes`::
  65. (long) The size in bytes of a region in the shared cache file.
  66. ======
  67. =====
  68. ====
  69. [[searchable-snapshots-api-cache-stats-example]]
  70. ==== {api-examples-title}
  71. Gets the statistics about the shared cache for partially mounted indices from
  72. all data nodes:
  73. [source,console]
  74. --------------------------------------------------
  75. GET /_searchable_snapshots/cache/stats
  76. --------------------------------------------------
  77. // TEST[setup:node]
  78. The API returns the following response:
  79. [source,console-result]
  80. ----
  81. {
  82. "nodes" : {
  83. "eerrtBMtQEisohZzxBLUSw" : {
  84. "shared_cache" : {
  85. "reads" : 6051,
  86. "bytes_read_in_bytes" : 5448829,
  87. "writes" : 37,
  88. "bytes_written_in_bytes" : 1208320,
  89. "evictions" : 5,
  90. "num_regions" : 65536,
  91. "size_in_bytes" : 1099511627776,
  92. "region_size_in_bytes" : 16777216
  93. }
  94. }
  95. }
  96. }
  97. ----
  98. // TESTRESPONSE[s/"reads" : 6051/"reads" : 0/]
  99. // TESTRESPONSE[s/"bytes_read_in_bytes" : 5448829/"bytes_read_in_bytes" : 0/]
  100. // TESTRESPONSE[s/"writes" : 37/"writes" : 0/]
  101. // TESTRESPONSE[s/"bytes_written_in_bytes" : 1208320/"bytes_written_in_bytes" : 0/]
  102. // TESTRESPONSE[s/"evictions" : 5/"evictions" : 0/]
  103. // TESTRESPONSE[s/"num_regions" : 65536/"num_regions" : 0/]
  104. // TESTRESPONSE[s/"size_in_bytes" : 1099511627776/"size_in_bytes" : 0/]
  105. // TESTRESPONSE[s/"eerrtBMtQEisohZzxBLUSw"/\$node_name/]