forked from arangodb/arangodb
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Apply global AQL query memory limit by default (arangodb#13800)
* Apply global AQL query memory limit by default * Introduce metrics for AQL query memory limit violations: - `arangodb_aql_global_query_memory_limit_reached`: Total number of times the global query memory limit was violated. - `arangodb_aql_local_query_memory_limit_reached`: Total number of times a local query memory limit was violated. * Set the default value for `--query.global-memory-limit` to around 90% of RAM, so that a global memory limit is now effective by default. The default global memory limit value is calculated by a formula depending on the amount of available RAM and will result in the following values for common RAM sizes: RAM: 0 (0MiB) Limit: 0 unlimited, %mem: n/a RAM: 134217728 (128MiB) Limit: 33554432 (32MiB), %mem: 25.0 RAM: 268435456 (256MiB) Limit: 67108864 (64MiB), %mem: 25.0 RAM: 536870912 (512MiB) Limit: 255013683 (243MiB), %mem: 47.5 RAM: 805306368 (768MiB) Limit: 510027366 (486MiB), %mem: 63.3 RAM: 1073741824 (1024MiB) Limit: 765041049 (729MiB), %mem: 71.2 RAM: 2147483648 (2048MiB) Limit: 1785095782 (1702MiB), %mem: 83.1 RAM: 4294967296 (4096MiB) Limit: 3825205248 (3648MiB), %mem: 89.0 RAM: 8589934592 (8192MiB) Limit: 7752415969 (7393MiB), %mem: 90.2 RAM: 17179869184 (16384MiB) Limit: 15504831938 (14786MiB), %mem: 90.2 RAM: 25769803776 (24576MiB) Limit: 23257247908 (22179MiB), %mem: 90.2 RAM: 34359738368 (32768MiB) Limit: 31009663877 (29573MiB), %mem: 90.2 RAM: 42949672960 (40960MiB) Limit: 38762079846 (36966MiB), %mem: 90.2 RAM: 68719476736 (65536MiB) Limit: 62019327755 (59146MiB), %mem: 90.2 RAM: 103079215104 (98304MiB) Limit: 93028991631 (88719MiB), %mem: 90.2 RAM: 137438953472 (131072MiB) Limit: 124038655509 (118292MiB), %mem: 90.2 RAM: 274877906944 (262144MiB) Limit: 248077311017 (236584MiB), %mem: 90.2 RAM: 549755813888 (524288MiB) Limit: 496154622034 (473169MiB), %mem: 90.2 * added "introducedIn" attribute * added unit test for counters
- Loading branch information
1 parent
6b1d8da
commit 727a7b3
Showing
12 changed files
with
502 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
Documentation/Metrics/arangodb_aql_global_query_memory_limit_reached.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
name: arangodb_aql_global_query_memory_limit_reached | ||
introducedIn: "3.8" | ||
help: | | ||
Number of times the global query memory limit threshold was reached. | ||
unit: number | ||
type: counter | ||
category: AQL | ||
complexity: simple | ||
exposedBy: | ||
- coordinator | ||
- dbserver | ||
- agent | ||
- single | ||
description: | | ||
Total number of times the global query memory limit threshold was reached. | ||
This can happen if all running AQL queries in total try to use more memory than | ||
configured via the `--query.global-memory-limit` startup option. | ||
Every time this counter will increase, an AQL query will have aborted with a | ||
"resource limit exceeded" error. |
20 changes: 20 additions & 0 deletions
20
Documentation/Metrics/arangodb_aql_local_query_memory_limit_reached.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: arangodb_aql_local_query_memory_limit_reached | ||
introducedIn: "3.8" | ||
help: | | ||
Number of times a local query memory limit threshold was reached. | ||
unit: number | ||
type: counter | ||
category: AQL | ||
complexity: simple | ||
exposedBy: | ||
- coordinator | ||
- dbserver | ||
- agent | ||
- single | ||
description: | | ||
Total number of times a local query memory limit threshold was reached, i.e. | ||
a single query tried to allocate more memory than configured in the query's | ||
`memoryLimit` attribute or the value configured via the startup option | ||
`--query.memory-limit`. | ||
Every time this counter will increase, an AQL query will have aborted with a | ||
"resource limit exceeded" error. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.