thread_pool.asciidoc 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. [[cat-thread-pool]]
  2. == cat thread pool
  3. The `thread_pool` command shows cluster wide thread pool statistics per node. By default the active, queue and rejected
  4. statistics are returned for the bulk, index and search thread pools.
  5. [source,sh]
  6. --------------------------------------------------
  7. % curl 192.168.56.10:9200/_cat/thread_pool
  8. host1 192.168.1.35 0 0 0 0 0 0 0 0 0
  9. host2 192.168.1.36 0 0 0 0 0 0 0 0 0
  10. --------------------------------------------------
  11. The first two columns contain the host and ip of a node.
  12. [source,sh]
  13. --------------------------------------------------
  14. host ip
  15. host1 192.168.1.35
  16. host2 192.168.1.36
  17. --------------------------------------------------
  18. The next three columns show the active queue and rejected statistics for the bulk thread pool.
  19. [source,sh]
  20. --------------------------------------------------
  21. bulk.active bulk.queue bulk.rejected
  22. 0 0 0
  23. --------------------------------------------------
  24. The remaining columns show the active queue and rejected statistics of the index and search thread pool respectively.
  25. Also other statistics of different thread pools can be retrieved by using the `h` (header) parameter.
  26. [source,sh]
  27. --------------------------------------------------
  28. % curl 'localhost:9200/_cat/thread_pool?v&h=id,host,suggest.active,suggest.rejected,suggest.completed'
  29. host suggest.active suggest.rejected suggest.completed
  30. host1 0 0 0
  31. host2 0 0 0
  32. --------------------------------------------------
  33. Here the host columns and the active, rejected and completed suggest thread pool statistic are displayed. The suggest
  34. thread pool won't be displayed by default, so you always need to be specific about what statistic you want to display.
  35. [float]
  36. === Available Thread Pools
  37. Currently available <<modules-threadpool,thread pools>>:
  38. [cols="<,<,<",options="header"]
  39. |=======================================================================
  40. |Thread Pool |Alias |Description
  41. |`bulk` |`b` |Thread pool used for <<docs-bulk,bulk>> operations
  42. |`flush` |`f` |Thread pool used for <<indices-flush,flush>> operations
  43. |`generic` |`ge` |Thread pool used for generic operations (e.g. background node discovery)
  44. |`get` |`g` |Thread pool used for <<docs-get,get>> operations
  45. |`index` |`i` |Thread pool used for <<docs-index_,index>>/<<docs-delete,delete>> operations
  46. |`management` |`ma` |Thread pool used for management of Elasticsearch (e.g. cluster management)
  47. |`optimize` |`o` |Thread pool used for <<indices-optimize,optimize>> operations
  48. |`percolate` |`p` |Thread pool used for <<search-percolate,percolator>> operations
  49. |`refresh` |`r` |Thread pool used for <<indices-refresh,refresh>> operations
  50. |`search` |`s` |Thread pool used for <<search-search,search>>/<<search-count,count>> operations
  51. |`snapshot` |`sn` |Thread pool used for <<modules-snapshots,snapshot>> operations
  52. |`suggest` |`su` |Thread pool used for <<search-suggesters,suggester>> operations
  53. |`warmer` |`w` |Thread pool used for <<indices-warmers,index warm-up>> operations
  54. |=======================================================================
  55. The thread pool name (or alias) must be combined with a thread pool field below
  56. to retrieve the requested information.
  57. [float]
  58. ==== Thread Pool Fields
  59. For each thread pool, you can load details about it by using the field names
  60. in the table below, either using the full field name (e.g. `bulk.active`) or
  61. its alias (e.g. `sa` is equivalent to `search.active`).
  62. [cols="<,<,<",options="header"]
  63. |=======================================================================
  64. |Field Name |Alias |Description
  65. |`type` |`t` |The current (*) type of thread pool (`cached`, `fixed` or `scaling`)
  66. |`active` |`a` |The number of active threads in the current thread pool
  67. |`size` |`s` |The number of threads in the current thread pool
  68. |`queue` |`q` |The number of tasks in the queue for the current thread pool
  69. |`queueSize` |`qs` |The maximum number of tasks in the queue for the current thread pool
  70. |`rejected` |`r` |The number of rejected threads in the current thread pool
  71. |`largest` |`l` |The highest number of active threads in the current thread pool
  72. |`completed` |`c` |The number of completed threads in the current thread pool
  73. |`min` |`mi` |The configured minimum number of active threads allowed in the current thread pool
  74. |`max` |`ma` |The configured maximum number of active threads allowed in the current thread pool
  75. |`keepAlive` |`k` |The configured keep alive time for threads
  76. |=======================================================================
  77. [float]
  78. === Other Fields
  79. In addition to details about each thread pool, it is also convenient to get an
  80. understanding of where those thread pools reside. As such, you can request
  81. other details like the `ip` of the responding node(s).
  82. [cols="<,<,<",options="header"]
  83. |=======================================================================
  84. |Field Name |Alias |Description
  85. |`id` |`nodeId` |The unique node ID
  86. |`pid` |`p` |The process ID of the running node
  87. |`host` |`h` |The hostname for the current node
  88. |`ip` |`i` |The IP address for the current node
  89. |`port` |`po` |The bound transport port for the current node
  90. |=======================================================================