ml-settings.asciidoc 3.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  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`.