indexing-pressure.asciidoc 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. [[index-modules-indexing-pressure]]
  2. == Indexing pressure
  3. Indexing documents into {es} introduces system load in the form of memory and
  4. CPU load. Each indexing operation includes coordinating, primary, and replica
  5. stages. These stages can be performed across multiple nodes in a cluster.
  6. Indexing pressure can build up through external operations, such as indexing
  7. requests, or internal mechanisms, such as recoveries and {ccr}. If too much
  8. indexing work is introduced into the system, the cluster can become saturated.
  9. This can adversely impact other operations, such as search, cluster
  10. coordination, and background processing.
  11. To prevent these issues, {es} internally monitors indexing load. When the load
  12. exceeds certain limits, new indexing work is rejected
  13. [discrete]
  14. [[indexing-stages]]
  15. === Indexing stages
  16. External indexing operations go through three stages: coordinating, primary, and
  17. replica. See <<basic-write-model>>.
  18. [discrete]
  19. [[memory-limits]]
  20. === Memory limits
  21. The `indexing_pressure.memory.limit` node setting restricts the number of bytes
  22. available for outstanding indexing requests. This setting defaults to 10% of
  23. the heap.
  24. At the beginning of each indexing stage, {es} accounts for the
  25. bytes consumed by an indexing request. This accounting is only released at the
  26. end of the indexing stage. This means that upstream stages will account for the
  27. request overheard until all downstream stages are complete. For example, the
  28. coordinating request will remain accounted for until primary and replica
  29. stages are complete. The primary request will remain accounted for until each
  30. in-sync replica has responded to enable replica retries if necessary.
  31. A node will start rejecting new indexing work at the coordinating or primary
  32. stage when the number of outstanding coordinating, primary, and replica indexing
  33. bytes exceeds the configured limit.
  34. A node will start rejecting new indexing work at the replica stage when the
  35. number of outstanding replica indexing bytes exceeds 1.5x the configured limit.
  36. This design means that as indexing pressure builds on nodes, they will naturally
  37. stop accepting coordinating and primary work in favor of outstanding replica
  38. work.
  39. The `indexing_pressure.memory.limit` setting's 10% default limit is generously
  40. sized. You should only change it after careful consideration. Only indexing
  41. requests contribute to this limit. This means there is additional indexing
  42. overhead (buffers, listeners, etc) which also require heap space. Other
  43. components of {es} also require memory. Setting this limit too high can deny
  44. operating memory to other operations and components.
  45. [discrete]
  46. [[indexing-pressure-monitoring]]
  47. === Monitoring
  48. You can use the
  49. <<cluster-nodes-stats-api-response-body-indexing-pressure,node stats API>> to
  50. retrieve indexing pressure metrics.
  51. [discrete]
  52. [[indexing-pressure-settings]]
  53. === Indexing pressure settings
  54. `indexing_pressure.memory.limit` {ess-icon}::
  55. Number of outstanding bytes that may be consumed by indexing requests. When
  56. this limit is reached or exceeded, the node will reject new coordinating and
  57. primary operations. When replica operations consume 1.5x this limit, the node
  58. will reject new replica operations. Defaults to 10% of the heap.