machine-learning-decider.asciidoc 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. [role="xpack"]
  2. [testenv="enterprise"]
  3. [[autoscaling-machine-learning-decider]]
  4. === Machine learning decider
  5. The {ml} decider (`ml`) calculates the memory required to run
  6. {ml} jobs created by users.
  7. The {ml} decider is enabled for policies governing `ml` nodes.
  8. [[autoscaling-machine-learning-decider-settings]]
  9. ==== Configuration settings
  10. `num_anomaly_jobs_in_queue`::
  11. (Optional, integer)
  12. Number of queued anomaly jobs to allow. Defaults to `0`.
  13. `num_analytics_jobs_in_queue`::
  14. (Optional, integer)
  15. Number of queued analytics jobs to allow. Defaults to `0`.
  16. `down_scale_delay`::
  17. (Optional, <<time-units,time value>>)
  18. Delay before scaling down. Defaults to 1 hour.
  19. [[autoscaling-machine-learning-decider-examples]]
  20. ==== {api-examples-title}
  21. This example puts an autoscaling policy named `my_autoscaling_policy`,
  22. overriding the machine learning decider's configuration.
  23. [source,console]
  24. --------------------------------------------------
  25. PUT /_autoscaling/policy/my_autoscaling_policy
  26. {
  27. "roles" : [ "ml" ],
  28. "deciders": {
  29. "ml": {
  30. "num_anomaly_jobs_in_queue": 5,
  31. "num_analytics_jobs_in_queue": 3,
  32. "down_scale_delay": "30m"
  33. }
  34. }
  35. }
  36. --------------------------------------------------
  37. // TEST
  38. The API returns the following result:
  39. [source,console-result]
  40. --------------------------------------------------
  41. {
  42. "acknowledged": true
  43. }
  44. --------------------------------------------------
  45. //////////////////////////
  46. [source,console]
  47. --------------------------------------------------
  48. DELETE /_autoscaling/policy/my_autoscaling_policy
  49. --------------------------------------------------
  50. // TEST[continued]
  51. //////////////////////////