ml-settings.asciidoc 4.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. [role="xpack"]
  2. [[ml-settings]]
  3. === Machine learning settings in Elasticsearch
  4. ++++
  5. <titleabbrev>Machine learning settings</titleabbrev>
  6. ++++
  7. You do not need to configure any settings to use {ml}. It is enabled by default.
  8. All of these settings can be added to the `elasticsearch.yml` configuration file.
  9. The dynamic settings can also be updated across a cluster with the
  10. <<cluster-update-settings,cluster update settings API>>.
  11. TIP: Dynamic settings take precedence over settings in the `elasticsearch.yml`
  12. file.
  13. [float]
  14. [[general-ml-settings]]
  15. ==== General machine learning settings
  16. `node.ml`::
  17. Set to `true` (default) to identify the node as a _machine learning node_. +
  18. +
  19. If set to `false` in `elasticsearch.yml`, the node cannot run jobs. If set to
  20. `true` but `xpack.ml.enabled` is set to `false`, the `node.ml` setting is
  21. ignored and the node cannot run jobs. If you want to run jobs, there must be at
  22. least one machine learning node in your cluster. +
  23. +
  24. IMPORTANT: On dedicated coordinating nodes or dedicated master nodes, disable
  25. the `node.ml` role.
  26. `xpack.ml.enabled`::
  27. Set to `true` (default) to enable {ml} on the node. +
  28. +
  29. If set to `false` in `elasticsearch.yml`, the {ml} APIs are disabled on the node.
  30. Therefore the node cannot open jobs, start {dfeeds}, or receive transport (internal)
  31. communication requests related to {ml} APIs. It also affects all {kib} instances
  32. that connect to this {es} instance; you do not need to disable {ml} in those
  33. `kibana.yml` files. For more information about disabling {ml} in specific {kib}
  34. instances, see
  35. {kibana-ref}/ml-settings-kb.html[{kib} Machine Learning Settings].
  36. +
  37. IMPORTANT: If you want to use {ml} features in your cluster, you must have
  38. `xpack.ml.enabled` set to `true` on all master-eligible nodes. This is the
  39. default behavior.
  40. `xpack.ml.max_machine_memory_percent`::
  41. The maximum percentage of the machine's memory that {ml} may use for running
  42. analytics processes. (These processes are separate to the {es} JVM.) Defaults to
  43. `30` percent. The limit is based on the total memory of the machine, not current
  44. free memory. Jobs will not be allocated to a node if doing so would cause the
  45. estimated memory use of {ml} jobs to exceed the limit.
  46. `xpack.ml.max_model_memory_limit`::
  47. The maximum `model_memory_limit` property value that can be set for any job on
  48. this node. If you try to create a job with a `model_memory_limit` property value
  49. that is greater than this setting value, an error occurs. Existing jobs are not
  50. affected when you update this setting. For more information about the
  51. `model_memory_limit` property, see <<ml-apilimits>>.
  52. `xpack.ml.max_open_jobs`::
  53. The maximum number of jobs that can run on a node. Defaults to `20`.
  54. The maximum number of jobs is also constrained by memory usage, so fewer
  55. jobs than specified by this setting will run on a node if the estimated
  56. memory use of the jobs would be higher than allowed.
  57. `xpack.ml.node_concurrent_job_allocations`::
  58. The maximum number of jobs that can concurrently be in the `opening` state on
  59. each node. Typically, jobs spend a small amount of time in this state before
  60. they move to `open` state. Jobs that must restore large models when they are
  61. opening spend more time in the `opening` state. Defaults to `2`.
  62. [float]
  63. [[advanced-ml-settings]]
  64. ==== Advanced machine learning settings
  65. These settings are for advanced use cases; the default values are generally
  66. sufficient:
  67. `xpack.ml.max_anomaly_records` (<<cluster-update-settings,Dynamic>>)::
  68. The maximum number of records that are output per bucket. The default value is
  69. `500`.
  70. `xpack.ml.max_lazy_ml_nodes` (<<cluster-update-settings,Dynamic>>)::
  71. The number of lazily spun up Machine Learning nodes. Useful in situations
  72. where ML nodes are not desired until the first Machine Learning Job
  73. is opened. It defaults to `0` and has a maximum acceptable value of `3`.
  74. If the current number of ML nodes is `>=` than this setting, then it is
  75. assumed that there are no more lazy nodes available as the desired number
  76. of nodes have already been provisioned. When a job is opened with this
  77. setting set at `>0` and there are no nodes that can accept the job, then
  78. the job will stay in the `OPENING` state until a new ML node is added to the
  79. cluster and the job is assigned to run on that node.
  80. +
  81. IMPORTANT: This setting assumes some external process is capable of adding ML nodes
  82. to the cluster. This setting is only useful when used in conjunction with
  83. such an external process.