Get machine learning memory usage info
Generally available; Added in 8.2.0
All methods and paths for this operation:
Get information about how machine learning jobs and trained models are using memory, on each node, both within the JVM heap, and natively, outside of the JVM.
highlight#highlightFromAnchor" href="#topic-required-authorization"> Required authorization
- Cluster privileges:
monitor_ml
Path parameters
-
The names of particular nodes in the cluster to target. For example,
nodeId1,nodeId2
orml:true
Query parameters
-
Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error.
Values are
-1
or0
. -
Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.
Values are
-1
or0
.
Responses
-
details#setActive"> Hide response attributes Show response attributes object
-
Contains statistics about the number of nodes selected by the request.
details#setActive"> Hide _nodes attributes Show _nodes attributes object
-
Cause and details about a request failure. This class defines the properties common to all error types. Additional details are also provided, that depend on the error type.
details#setActive"> Hide failures attributes Show failures attributes object
-
The type of error
reason
string | null A human-readable explanation of the error, in English.
alternative#change alternative:form->explorer-send-request#updateRequest" data-tabs-scroll="true">One of: tabs#change click->alternative#change " data-tabs-target="tab" href="#operation-ml-get-memory-stats-200-body-application-json-_nodes-failures-reason" role="tab" aria-controls="operation-ml-get-memory-stats-200-body-application-json-_nodes-failures-reason" tabindex="0"> string-1string tabs#change click->alternative#change " data-tabs-target="tab" href="#operation-ml-get-memory-stats-200-body-application-json-_nodes-failures-string-2-reason-string-null" role="tab" aria-controls="operation-ml-get-memory-stats-200-body-application-json-_nodes-failures-string-2-reason-string-null" tabindex="0"> string-2string | null -
The server stack trace. Present only if the
error_trace=true
parameter was sent with the request. -
Cause and details about a request failure. This class defines the properties common to all error types. Additional details are also provided, that depend on the error type.
-
Cause and details about a request failure. This class defines the properties common to all error types. Additional details are also provided, that depend on the error type.
Cause and details about a request failure. This class defines the properties common to all error types. Additional details are also provided, that depend on the error type.
-
Cause and details about a request failure. This class defines the properties common to all error types. Additional details are also provided, that depend on the error type.
Cause and details about a request failure. This class defines the properties common to all error types. Additional details are also provided, that depend on the error type.
-
-
Total number of nodes selected by the request.
-
Number of nodes that responded successfully to the request.
-
Number of nodes that rejected the request or failed to respond. If this value is not 0, a reason for the rejection or failure is included in the response.
-
-
details#setActive"> Hide nodes attribute Show nodes attribute object
-
details#setActive"> Hide * attributes Show * attributes object
-
details#setActive"> Hide jvm attributes Show jvm attributes object
heap_max
number | string alternative#change alternative:form->explorer-send-request#updateRequest" data-tabs-scroll="true">One of: tabs#change click->alternative#change " data-tabs-target="tab" href="#operation-ml-get-memory-stats-200-body-application-json-nodes-jvm" role="tab" aria-controls="operation-ml-get-memory-stats-200-body-application-json-nodes-jvm" tabindex="0"> number-1number tabs#change click->alternative#change " data-tabs-target="tab" href="#operation-ml-get-memory-stats-200-body-application-json-nodes-jvm-string-2-string" role="tab" aria-controls="operation-ml-get-memory-stats-200-body-application-json-nodes-jvm-string-2-string" tabindex="0"> string-2string -
Maximum amount of memory, in bytes, available for use by the heap.
java_inference
number | string alternative#change alternative:form->explorer-send-request#updateRequest" data-tabs-scroll="true">One of: tabs#change click->alternative#change " data-tabs-target="tab" href="#operation-ml-get-memory-stats-200-body-application-json-nodes-jvm" role="tab" aria-controls="operation-ml-get-memory-stats-200-body-application-json-nodes-jvm" tabindex="0"> number-1number tabs#change click->alternative#change " data-tabs-target="tab" href="#operation-ml-get-memory-stats-200-body-application-json-nodes-jvm-string-2-string" role="tab" aria-controls="operation-ml-get-memory-stats-200-body-application-json-nodes-jvm-string-2-string" tabindex="0"> string-2string -
Amount of Java heap, in bytes, currently being used for caching inference models.
java_inference_max
number | string alternative#change alternative:form->explorer-send-request#updateRequest" data-tabs-scroll="true">One of: tabs#change click->alternative#change " data-tabs-target="tab" href="#operation-ml-get-memory-stats-200-body-application-json-nodes-jvm" role="tab" aria-controls="operation-ml-get-memory-stats-200-body-application-json-nodes-jvm" tabindex="0"> number-1number tabs#change click->alternative#change " data-tabs-target="tab" href="#operation-ml-get-memory-stats-200-body-application-json-nodes-jvm-string-2-string" role="tab" aria-controls="operation-ml-get-memory-stats-200-body-application-json-nodes-jvm-string-2-string" tabindex="0"> string-2string -
Maximum amount of Java heap, in bytes, to be used for caching inference models.
-
details#setActive"> Hide mem attributes Show mem attributes object
adjusted_total
number | string alternative#change alternative:form->explorer-send-request#updateRequest" data-tabs-scroll="true">One of: tabs#change click->alternative#change " data-tabs-target="tab" href="#operation-ml-get-memory-stats-200-body-application-json-nodes-mem" role="tab" aria-controls="operation-ml-get-memory-stats-200-body-application-json-nodes-mem" tabindex="0"> number-1number tabs#change click->alternative#change " data-tabs-target="tab" href="#operation-ml-get-memory-stats-200-body-application-json-nodes-mem-string-2-string" role="tab" aria-controls="operation-ml-get-memory-stats-200-body-application-json-nodes-mem-string-2-string" tabindex="0"> string-2string -
If the amount of physical memory has been overridden using the
es.total_memory_bytes
system property then this reports the overridden value in bytes. Otherwise it reports the same value astotal_in_bytes
. total
number | string alternative#change alternative:form->explorer-send-request#updateRequest" data-tabs-scroll="true">One of: tabs#change click->alternative#change " data-tabs-target="tab" href="#operation-ml-get-memory-stats-200-body-application-json-nodes-mem" role="tab" aria-controls="operation-ml-get-memory-stats-200-body-application-json-nodes-mem" tabindex="0"> number-1number tabs#change click->alternative#change " data-tabs-target="tab" href="#operation-ml-get-memory-stats-200-body-application-json-nodes-mem-string-2-string" role="tab" aria-controls="operation-ml-get-memory-stats-200-body-application-json-nodes-mem-string-2-string" tabindex="0"> string-2string -
Total amount of physical memory in bytes.
-
details#setActive"> Hide ml attributes Show ml attributes object
anomaly_detectors
number | string alternative#change alternative:form->explorer-send-request#updateRequest" data-tabs-scroll="true">One of: tabs#change click->alternative#change " data-tabs-target="tab" href="#operation-ml-get-memory-stats-200-body-application-json-nodes-mem-ml" role="tab" aria-controls="operation-ml-get-memory-stats-200-body-application-json-nodes-mem-ml" tabindex="0"> number-1number tabs#change click->alternative#change " data-tabs-target="tab" href="#operation-ml-get-memory-stats-200-body-application-json-nodes-mem-ml-string-2-string" role="tab" aria-controls="operation-ml-get-memory-stats-200-body-application-json-nodes-mem-ml-string-2-string" tabindex="0"> string-2string -
Amount of native memory, in bytes, set aside for anomaly detection jobs.
data_frame_analytics
number | string alternative#change alternative:form->explorer-send-request#updateRequest" data-tabs-scroll="true">One of: tabs#change click->alternative#change " data-tabs-target="tab" href="#operation-ml-get-memory-stats-200-body-application-json-nodes-mem-ml" role="tab" aria-controls="operation-ml-get-memory-stats-200-body-application-json-nodes-mem-ml" tabindex="0"> number-1number tabs#change click->alternative#change " data-tabs-target="tab" href="#operation-ml-get-memory-stats-200-body-application-json-nodes-mem-ml-string-2-string" role="tab" aria-controls="operation-ml-get-memory-stats-200-body-application-json-nodes-mem-ml-string-2-string" tabindex="0"> string-2string -
Amount of native memory, in bytes, set aside for data frame analytics jobs.
max
number | string alternative#change alternative:form->explorer-send-request#updateRequest" data-tabs-scroll="true">One of: tabs#change click->alternative#change " data-tabs-target="tab" href="#operation-ml-get-memory-stats-200-body-application-json-nodes-mem-ml" role="tab" aria-controls="operation-ml-get-memory-stats-200-body-application-json-nodes-mem-ml" tabindex="0"> number-1number tabs#change click->alternative#change " data-tabs-target="tab" href="#operation-ml-get-memory-stats-200-body-application-json-nodes-mem-ml-string-2-string" role="tab" aria-controls="operation-ml-get-memory-stats-200-body-application-json-nodes-mem-ml-string-2-string" tabindex="0"> string-2string -
Maximum amount of native memory (separate to the JVM heap), in bytes, that may be used by machine learning native processes.
native_code_overhead
number | string alternative#change alternative:form->explorer-send-request#updateRequest" data-tabs-scroll="true">One of: tabs#change click->alternative#change " data-tabs-target="tab" href="#operation-ml-get-memory-stats-200-body-application-json-nodes-mem-ml" role="tab" aria-controls="operation-ml-get-memory-stats-200-body-application-json-nodes-mem-ml" tabindex="0"> number-1number tabs#change click->alternative#change " data-tabs-target="tab" href="#operation-ml-get-memory-stats-200-body-application-json-nodes-mem-ml-string-2-string" role="tab" aria-controls="operation-ml-get-memory-stats-200-body-application-json-nodes-mem-ml-string-2-string" tabindex="0"> string-2string -
Amount of native memory, in bytes, set aside for loading machine learning native code shared libraries.
native_inference
number | string alternative#change alternative:form->explorer-send-request#updateRequest" data-tabs-scroll="true">One of: tabs#change click->alternative#change " data-tabs-target="tab" href="#operation-ml-get-memory-stats-200-body-application-json-nodes-mem-ml" role="tab" aria-controls="operation-ml-get-memory-stats-200-body-application-json-nodes-mem-ml" tabindex="0"> number-1number tabs#change click->alternative#change " data-tabs-target="tab" href="#operation-ml-get-memory-stats-200-body-application-json-nodes-mem-ml-string-2-string" role="tab" aria-controls="operation-ml-get-memory-stats-200-body-application-json-nodes-mem-ml-string-2-string" tabindex="0"> string-2string -
Amount of native memory, in bytes, set aside for trained models that have a PyTorch model_type.
-
Roles assigned to the node.
-
-
- doc-examples#toggle click->dropdown#hide" data-doc-examples-target="dropdownExample" data-node-id="operation-ml-get-memory-stats" role="menuitem"> Console
- doc-examples#toggle click->dropdown#hide" data-doc-examples-target="dropdownExample" data-node-id="operation-ml-get-memory-stats" role="menuitem"> Python
- doc-examples#toggle click->dropdown#hide" data-doc-examples-target="dropdownExample" data-node-id="operation-ml-get-memory-stats" role="menuitem"> JavaScript
- doc-examples#toggle click->dropdown#hide" data-doc-examples-target="dropdownExample" data-node-id="operation-ml-get-memory-stats" role="menuitem"> Ruby
- doc-examples#toggle click->dropdown#hide" data-doc-examples-target="dropdownExample" data-node-id="operation-ml-get-memory-stats" role="menuitem"> PHP
- doc-examples#toggle click->dropdown#hide" data-doc-examples-target="dropdownExample" data-node-id="operation-ml-get-memory-stats" role="menuitem"> curl
- doc-examples#toggle click->dropdown#hide" data-doc-examples-target="dropdownExample" data-node-id="operation-ml-get-memory-stats" role="menuitem"> Java
GET _ml/memory/_stats?human
resp = client.ml.get_memory_stats(
human=True,
)
const response = await client.ml.getMemoryStats({
human: "true",
});
response = client.ml.get_memory_stats(
human: "true"
)
$resp = $client->ml()->getMemoryStats([
"human" => "true",
]);
curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_ml/memory/_stats?human"