[ML] relax throttling on expired data cleanup (#56711)

Throttling nightly cleanup as much as we do has been over cautious.

Night cleanup should be more lenient in its throttling. We still
keep the same batch size, but now the requests per second scale
with the number of data nodes. If we have more than 5 data nodes,
we don't throttle at all.

Additionally, the API now has `requests_per_second` and `timeout` set.
So users calling the API directly can set the throttling.

This commit also adds a new setting `xpack.ml.nightly_maintenance_requests_per_second`.
This will allow users to adjust throttling of the nightly maintenance.
This commit is contained in:
Benjamin Trent 2020-05-18 07:21:06 -04:00 committed by GitHub
parent 79a69cb676
commit 8fed077b0a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
32 changed files with 577 additions and 181 deletions

View file

@ -21,6 +21,10 @@ A `DeleteExpiredDataRequest` object does not require any arguments.
include-tagged::{doc-tests-file}[{api}-request]
---------------------------------------------------
<1> Constructing a new request.
<2> Providing requests per second throttling for the
deletion processes. Default is no throttling.
<3> Setting how long the deletion processes will be allowed
to run before they are canceled. Default value is `8h` (8 hours).
[id="{upid}-{api}-response"]
==== Delete Expired Data Response