From a5a6d25deeb0cf2daff7696704deec70733a80ac Mon Sep 17 00:00:00 2001 From: danshalev7 Date: Sun, 20 Apr 2025 09:36:19 +0300 Subject: [PATCH 1/2] Update graph.memory.md Syntax / readability --- commands/graph.memory.md | 38 ++++++++++++++++++-------------------- 1 file changed, 18 insertions(+), 20 deletions(-) diff --git a/commands/graph.memory.md b/commands/graph.memory.md index 297566e..a3bd4a0 100644 --- a/commands/graph.memory.md +++ b/commands/graph.memory.md @@ -1,31 +1,29 @@ --- -title: "GRAPH.MEMORY" -description: > - The GRAPH.MEMORY command returns detailed memory usage statistics for the specified graph. - This command can be used to monitor memory consumption at the graph level, - providing insight into how much memory is used by various internal data structures such as - nodes, edges, schemas, and indices. - +Command: "GRAPH.MEMORY" +Description: > + Returns detailed memory usage statistics for a specified graph. Useful for monitoring and optimizing internal structures like nodes, edges, schemas, and indices within FalkorDB deployments. This information is useful for debugging, monitoring, and optimizing graph workloads in FalkorDB deployments. -parent: "Commands" +Parent: "Commands" --- # GRAPH.MEMORY -The GRAPH.MEMORY command returns detailed memory usage statistics for the specified graph. -This command can be used to monitor memory consumption at the graph level, -providing insight into how much memory is used by various internal data structures such as -nodes, edges, schemas, and indices. +Returns detailed memory usage metrics for a given graph. This command helps diagnose memory bottlenecks and assess storage overhead across internal components such as: -This information is useful for debugging, monitoring, and optimizing graph workloads in FalkorDB deployments. +- Label and relation matrices +- Node and edge storage +- Indices and schema allocations -The optional `SAMPLES` option can be provided, where count is the number of sampled graph entities. -The samples are averaged to estimate the total size. By default, this option is set to 100. +You can optionally sample a subset of graph entities to estimate usage. The default sample size is 100 entities. +## Syntax -Usage: `GRAPH.MEMORY USAGE [SAMPLES ]` +`GRAPH.MEMORY USAGE [SAMPLES ]` +- graph_id: ID of the target graph. +- SAMPLES (optional): Number of entities to sample for estimation (default: 100). -```sh +## Example +``` 127.0.0.1:6379> GRAPH.MEMORY USAGE flights 1) "total_graph_sz_mb" 2) (integer) 1086 @@ -43,14 +41,14 @@ Usage: `GRAPH.MEMORY USAGE [SAMPLES ]` ## Output -The command returns an array of key-value pairs, where each pair represents a specific memory metric and its value (in MB). +The command returns an array of key-value pairs, each representing a specific memory metric and its value (in MB). | Metric Name | Type | Description | |:---------------------------|:--------|:---------------------------------------------------| | `total_graph_sz_mb` | integer | Total memory consumed by the graph. | | `label_matrices_sz_mb` | integer | Amount of memory used for node labels tracking. | | `relation_matrices_sz_mb` | integer | Amount of memory used for graph topology tracking. | -| `node_storage_sz_mb` | integer | Amount of memory used for nodes storage. | -| `edge_storage_sz_mb` | integer | Amount of memory used for relationships storage. | +| `node_storage_sz_mb` | integer | Amount of memory used for node storage. | +| `edge_storage_sz_mb` | integer | Amount of memory used for relationship storage. | | `indices_sz_mb` | integer | Amount of memory consumed by indices. | From c655c9bde22d8d66e55d82530d2e372679b512c8 Mon Sep 17 00:00:00 2001 From: Guy Korland Date: Sun, 22 Jun 2025 19:14:15 +0300 Subject: [PATCH 2/2] Update graph.memory.md --- commands/graph.memory.md | 1 + 1 file changed, 1 insertion(+) diff --git a/commands/graph.memory.md b/commands/graph.memory.md index 86be964..992669c 100644 --- a/commands/graph.memory.md +++ b/commands/graph.memory.md @@ -23,6 +23,7 @@ You can optionally sample a subset of graph entities to estimate usage. The defa - SAMPLES (optional): Number of entities to sample for estimation (default: 100). ## Example + ``` 127.0.0.1:6379> GRAPH.MEMORY USAGE flights 1) "total_graph_sz_mb"