node-cache-stats.asciidoc 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  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. include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=master-timeout]
  27. [role="child_attributes"]
  28. [[searchable-snapshots-api-cache-stats-response-body]]
  29. ==== {api-response-body-title}
  30. `nodes`::
  31. (object)
  32. Contains statistics for the nodes selected by the request.
  33. +
  34. .Properties of `nodes`
  35. [%collapsible%open]
  36. ====
  37. `<node_id>`::
  38. (object)
  39. Contains statistics for the node with the given identifier.
  40. +
  41. .Properties of `<node_id>`
  42. [%collapsible%open]
  43. =====
  44. `shared_cache`::
  45. (object)
  46. Contains statistics about the shared cache file.
  47. +
  48. .Properties of `shared_cache`
  49. [%collapsible%open]
  50. ======
  51. `reads`::
  52. (long) Number of times the shared cache is used to read data from.
  53. `bytes_read_in_bytes`::
  54. (long) The total of bytes read from the shared cache.
  55. `writes`::
  56. (long) Number of times data from the blob store repository is written in the shared cache.
  57. `bytes_written_in_bytes`::
  58. (long) The total of bytes written in the shared cache.
  59. `evictions`::
  60. (long) Number of regions evicted from the shared cache file.
  61. `num_regions`::
  62. (integer) Number of regions in the shared cache file.
  63. `size_in_bytes`::
  64. (long) The total size in bytes of the shared cache file.
  65. `region_size_in_bytes`::
  66. (long) The size in bytes of a region in the shared cache file.
  67. ======
  68. =====
  69. ====
  70. [[searchable-snapshots-api-cache-stats-example]]
  71. ==== {api-examples-title}
  72. Gets the statistics about the shared cache for partially mounted indices from
  73. all data nodes:
  74. [source,console]
  75. --------------------------------------------------
  76. GET /_searchable_snapshots/cache/stats
  77. --------------------------------------------------
  78. // TEST[setup:node]
  79. The API returns the following response:
  80. [source,console-result]
  81. ----
  82. {
  83. "nodes" : {
  84. "eerrtBMtQEisohZzxBLUSw" : {
  85. "shared_cache" : {
  86. "reads" : 6051,
  87. "bytes_read_in_bytes" : 5448829,
  88. "writes" : 37,
  89. "bytes_written_in_bytes" : 1208320,
  90. "evictions" : 5,
  91. "num_regions" : 65536,
  92. "size_in_bytes" : 1099511627776,
  93. "region_size_in_bytes" : 16777216
  94. }
  95. }
  96. }
  97. }
  98. ----
  99. // TESTRESPONSE[s/"reads" : 6051/"reads" : 0/]
  100. // TESTRESPONSE[s/"bytes_read_in_bytes" : 5448829/"bytes_read_in_bytes" : 0/]
  101. // TESTRESPONSE[s/"writes" : 37/"writes" : 0/]
  102. // TESTRESPONSE[s/"bytes_written_in_bytes" : 1208320/"bytes_written_in_bytes" : 0/]
  103. // TESTRESPONSE[s/"evictions" : 5/"evictions" : 0/]
  104. // TESTRESPONSE[s/"num_regions" : 65536/"num_regions" : 0/]
  105. // TESTRESPONSE[s/"size_in_bytes" : 1099511627776/"size_in_bytes" : 0/]
  106. // TESTRESPONSE[s/"eerrtBMtQEisohZzxBLUSw"/\$node_name/]