Estimate memory usage APIedit

Estimates memory usage for the given data frame analytics config.

Deprecated in 7.5.

Replaced by the explain data frame analytics API in later releases.

This functionality is in technical preview and may be changed or removed in a future release. Elastic will apply best effort to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.

Requestedit

POST _ml/data_frame/analytics/_estimate_memory_usage

Prerequisitesedit

If the Elasticsearch security features are enabled, you must have the following privileges:

  • cluster: monitor_ml

For more information, see Security privileges and Built-in roles.

Descriptionedit

This API estimates memory usage for the given data frame analytics config before the data frame analytics job is even created.

Serves as an advice on how to set model_memory_limit when creating data frame analytics job.

Request bodyedit

data_frame_analytics_config
(Required, object) Intended configuration of data frame analytics job. For more information, see Create data frame analytics jobs. Note that id and dest don’t need to be provided in the context of this API.

Response bodyedit

expected_memory_without_disk
(string) Estimated memory usage under the assumption that the whole data frame analytics should happen in memory (in other words, without overflowing to disk).
expected_memory_with_disk
(string) Estimated memory usage under the assumption that overflowing to disk is allowed during data frame analytics. expected_memory_with_disk is usually smaller than expected_memory_without_disk as using disk allows to limit the main memory needed to perform data frame analytics.

Examplesedit

POST _ml/data_frame/analytics/_estimate_memory_usage
{
  "data_frame_analytics_config": {
    "source": {
      "index": "logdata"
    },
    "analysis": {
      "outlier_detection": {}
    }
  }
}

The API returns the following results:

{
  "expected_memory_without_disk": "128MB",
  "expected_memory_with_disk": "32MB"
}