[ML] add max_model_memory parameter to forecast request (#57254)

This adds a max_model_memory setting to forecast requests. 
This setting can take a string value that is formatted according to byte sizes (i.e. "50mb", "150mb").

The default value is `20mb`.

There is a HARD limit at `500mb` which will throw an error if used.

If the limit is larger than 40% the anomaly job's configured model limit, the forecast limit is reduced to be strictly lower than that value. This reduction is logged and audited.

related native change: https://github.com/elastic/ml-cpp/pull/1238

closes: https://github.com/elastic/elasticsearch/issues/56420
This commit is contained in:
Benjamin Trent 2020-05-29 08:59:50 -04:00 committed by GitHub
parent e50f5d5d86
commit ec67787a2e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 320 additions and 12 deletions

View file

@ -34,6 +34,10 @@ include-tagged::{doc-tests-file}[{api}-request-options]
--------------------------------------------------
<1> Set when the forecast for the job should expire
<2> Set how far into the future should the forecast predict
<3> Set the maximum amount of memory the forecast is allowed to use.
Defaults to 20mb. Maximum is 500mb, minimum is 1mb. If set to
40% or more of the job's configured memory limit, it is
automatically reduced to below that number.
[id="{upid}-{api}-response"]
==== Forecast Job Response