1
0

estimate-memory-usage-dfanalytics.asciidoc 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. [role="xpack"]
  2. [testenv="platinum"]
  3. [[estimate-memory-usage-dfanalytics]]
  4. === Estimate memory usage API
  5. [subs="attributes"]
  6. ++++
  7. <titleabbrev>Estimate memory usage for {dfanalytics-jobs}</titleabbrev>
  8. ++++
  9. Estimates memory usage for the given {dataframe-analytics-config}.
  10. experimental[]
  11. [[ml-estimate-memory-usage-dfanalytics-request]]
  12. ==== {api-request-title}
  13. `POST _ml/data_frame/analytics/_estimate_memory_usage`
  14. [[ml-estimate-memory-usage-dfanalytics-prereq]]
  15. ==== {api-prereq-title}
  16. * You must have `monitor_ml` privilege to use this API. For more
  17. information, see <<security-privileges>> and <<built-in-roles>>.
  18. [[ml-estimate-memory-usage-dfanalytics-desc]]
  19. ==== {api-description-title}
  20. This API estimates memory usage for the given {dataframe-analytics-config} before the {dfanalytics-job} is even created.
  21. Serves as an advice on how to set `model_memory_limit` when creating {dfanalytics-job}.
  22. [[ml-estimate-memory-usage-dfanalytics-request-body]]
  23. ==== {api-request-body-title}
  24. `data_frame_analytics_config`::
  25. (Required, object) Intended configuration of {dfanalytics-job}. For more information, see
  26. <<ml-dfanalytics-resources>>.
  27. Note that `id` and `dest` don't need to be provided in the context of this API.
  28. [[ml-estimate-memory-usage-dfanalytics-results]]
  29. ==== {api-response-body-title}
  30. `expected_memory_without_disk`::
  31. (string) Estimated memory usage under the assumption that the whole {dfanalytics} should happen in memory
  32. (i.e. without overflowing to disk).
  33. `expected_memory_with_disk`::
  34. (string) Estimated memory usage under the assumption that overflowing to disk is allowed during {dfanalytics}.
  35. `expected_memory_with_disk` is usually smaller than `expected_memory_without_disk` as using disk allows to
  36. limit the main memory needed to perform {dfanalytics}.
  37. [[ml-estimate-memory-usage-dfanalytics-example]]
  38. ==== {api-examples-title}
  39. [source,console]
  40. --------------------------------------------------
  41. POST _ml/data_frame/analytics/_estimate_memory_usage
  42. {
  43. "data_frame_analytics_config": {
  44. "source": {
  45. "index": "logdata"
  46. },
  47. "analysis": {
  48. "outlier_detection": {}
  49. }
  50. }
  51. }
  52. --------------------------------------------------
  53. // TEST[skip:TBD]
  54. The API returns the following results:
  55. [source,console-result]
  56. ----
  57. {
  58. "expected_memory_without_disk": "128MB",
  59. "expected_memory_with_disk": "32MB"
  60. }
  61. ----