Server stats
Memgraph supports multiple queries to get information about the instance that is being queried.
Instance version
To get the version of the instance being queried, run the following query:
SHOW VERSION;Storage information
SHOW STORAGE INFO comes in two flavors:
- The unscoped
SHOW STORAGE INFOquery returns instance-level (process-wide) metrics only. - The
ON DATABASE <name>andON CURRENT DATABASEvariants return per-database metrics. See Per-database storage information.
Breaking change (Memgraph 3.11): The unscoped SHOW STORAGE INFO no longer
returns database-level metrics. Columns such as name, database_uuid,
vertex_count, edge_count, average_degree, unreleased_delta_objects,
db_memory_tracked, db_storage_memory_tracked, db_embedding_memory_tracked
and db_query_memory_tracked are no longer part of its result set. Use
SHOW STORAGE INFO ON CURRENT DATABASE (or ON DATABASE <name>) to obtain
those per-database metrics.
Several instance-level fields were also renamed:
| Old name | New name |
|---|---|
global_memory_tracked | memory_tracked |
global_runtime_allocation_limit | memory_limit |
global_license_allocation_limit | license_memory_limit |
global_disk_usage | disk_usage |
storage_mode | global_storage_mode |
global_isolation_level keeps its name but its semantics changed: it now reports
the startup-default isolation level (the --isolation-level
flag) instead of the current database’s runtime isolation level. The same applies
to global_storage_mode (renamed from storage_mode), which now reflects the
startup-default --storage-mode. To observe
runtime changes made via SET GLOBAL TRANSACTION ISOLATION LEVEL or
STORAGE MODE …, query SHOW STORAGE INFO ON CURRENT DATABASE and read
storage_isolation_level / storage_mode.
Running the following query returns instance-level (process-wide) information about the storage of the current instance:
SHOW STORAGE INFO;The result contains the following fields, all scoped to the entire Memgraph process (across all databases):
| Field | Description |
|---|---|
| vm_max_map_count | The number of memory-mapped areas that the kernel allows a process to have. If it is unknown, returns -1. For more info, check out the virtual memory section. |
| memory_res | The non-swapped physical RAM memory (RSS) used by the whole Memgraph process, as reported by the OS (in B, KiB, MiB, GiB or TiB). |
| peak_memory_res | Peak RAM memory (RSS) usage of the Memgraph process during the whole run. |
| disk_usage | The amount of disk space used by the data directory (--data-directory, in B, KiB, MiB, GiB or TiB). |
| memory_tracked | The total amount of RAM allocated across the instance and tracked by Memgraph (in B, KiB, MiB, GiB or TiB). For more info, check out memory control. |
| memory_limit | The active instance-level runtime memory limit, taken from the --memory-limit flag (in B, KiB, MiB, GiB or TiB). |
| license_memory_limit | The memory limit imposed by the active license, or "unlimited" if no license is active. With an enterprise license this gates total tracked memory; with an ai_platform license it gates only graph and query memory. See License types. |
| query+graph_memory_tracked | The process-wide graph-arena tracked memory. Captures all default new allocations across the instance — both graph data and query-execution heap allocations. |
| vector_index_memory_tracked | The process-wide memory tracked for vector indices and embeddings across the instance. |
| global_isolation_level | The startup-default isolation level (the --isolation-level flag). It does not reflect runtime SET GLOBAL TRANSACTION ISOLATION LEVEL changes — read storage_isolation_level from the per-database variant for those.For more info, check out isolation levels. |
| session_isolation_level | The current session isolation level. |
| next_session_isolation_level | The current next isolation level. |
| global_storage_mode | The startup-default storage mode (the --storage-mode flag). It does not reflect runtime STORAGE MODE … changes — read storage_mode from the per-database variant for those.For more info, check out storage modes. |
Per-database storage information
To get storage information for a specific database, use the ON CURRENT DATABASE
or ON DATABASE <name> variant. Both return the same per-database field set.
SHOW STORAGE INFO ON CURRENT DATABASE;ON CURRENT DATABASE targets the database the session is currently using.
SHOW STORAGE INFO ON DATABASE mydb;ON DATABASE <name> targets a named database. Accessing a non-default
database this way requires Memgraph Enterprise Edition; the default database is
available in all editions. Both variants require the STATS privilege.
Process-wide fields such as vm_max_map_count, memory_res, peak_memory_res,
memory_tracked and the license/runtime memory limits are not included —
those are only available from the unscoped SHOW STORAGE INFO.
| Field | Description |
|---|---|
name | Name of the database the result refers to. |
database_uuid | Unique UUID of the database. |
storage_mode | The storage mode of the database. See storage modes. |
vertex_count | Number of stored nodes (vertices). |
edge_count | Number of stored relationships (edges). |
average_degree | Average number of relationships of a single node. |
unreleased_delta_objects | Number of still-allocated Delta objects for this database. |
disk_usage | Disk space used by this database’s portion of the data directory. |
graph_memory_tracked | Memory used by this database’s graph structures (vertices, edges, properties). |
query_memory_tracked | Memory used by this database’s query execution. |
vector_index_memory_tracked | Memory used by this database’s vector indices. |
tenant_memory_tracked | Current tracked memory for the database (sum of the three memory fields above). |
tenant_peak_memory_tracked | Peak memory tracked for the database. |
tenant_memory_limit | The memory limit set by the tenant profile attached to this database, or "unlimited" if no profile is attached. |
storage_isolation_level | The isolation level used by this database’s storage. See isolation levels. |
Memory information Enterprise
Running the following query returns per-database memory tracking information.
It requires the STATS privilege and is available only in Memgraph Enterprise Edition.
SHOW MEMORY INFO;The result contains these fields:
| Field | Description |
|---|---|
name | Database name |
tenant_memory_tracked | Current tracked memory for the database in bytes |
profile | Active tenant profile name, or null if none is attached |
tenant_memory_limit | Configured memory limit (e.g. "4096 MB"), or "unlimited" |
License information
Running the following query will return information about the active Memgraph Enterprise license (the winning license selected from all configured sources).
SHOW LICENSE INFO;| Field | Description |
|---|---|
| organization_name | Organization name for the enterprise license. |
| license_key | Encoded license key. |
| is_valid | Whether the license is currently valid. Uses the same validation logic as enterprise feature checks. |
| license_type | enterprise / ai_platform / oem / oem_community |
| valid_until | Date when the license expires, or FOREVER for non-expiring licenses. |
| memory_limit | The maximum tracked-memory value allowed by this license (in GiB), or UNLIMITED if the license sets no limit. When tracked memory reaches this limit, write queries are blocked. |
| status | Descriptive status of the license validity. |
| memory_limit_policy | A human-readable description of how the license’s memory_limit is enforced (see the table below). |
The value of memory_limit_policy depends on the license_type and whether
the license carries a non-zero memory_limit:
| License type | memory_limit | memory_limit_policy |
|---|---|---|
ai_platform | > 0 | "Graph and query memory are limited. Vector index memory is not limited." |
enterprise / oem / other | > 0 | "All memory usage is limited." |
Any license type (incl. ai_platform) | == 0 | "Memory usage is not limited." |
| No / invalid license | n/a | "Memory usage is not limited." |
An ai_platform license with memory_limit == 0 reports the unlimited string,
not the AI Platform policy string.
If no license has been provided, is_valid is false and status reads
"You have not provided any license!".
Metrics information
Running this query will show the system metrics for the current database, combined with global metrics. Same metrics can be provided from the HTTP endpoint at default port 9091. This is a query that only works with the Memgraph Enterprise License. For the information about the metrics, please see the information about monitoring via HTTP server.
SHOW METRICS INFO;Users can also use the following query to get the same information:
SHOW METRICS;The output includes per-database metrics (scoped to the database you are connected to) and global metrics (sessions, high availability). Histogram values are reported in microseconds.
+------------------------------------------+---------------------+-------------+------------+
| name | type | metric type | value |
+------------------------------------------+---------------------+-------------+------------+
| "ActiveExistenceConstraints" | "Constraint" | "Gauge" | 0 |
| "ActiveTypeConstraints" | "Constraint" | "Gauge" | 0 |
| "ActiveUniqueConstraints" | "Constraint" | "Gauge" | 0 |
| "AverageDegree" | "General" | "Gauge" | 41.2732 |
| "EdgeCount" | "General" | "Gauge" | 871978 |
| "VertexCount" | "General" | "Gauge" | 42254 |
| ... | "HighAvailability" | ... | ... |
| "ActiveEdgePropertyIndices" | "Index" | "Gauge" | 0 |
| "ActiveEdgeTypeIndices" | "Index" | "Gauge" | 0 |
| "ActiveEdgeTypePropertyIndices" | "Index" | "Gauge" | 0 |
| "ActiveLabelIndices" | "Index" | "Gauge" | 6 |
| "ActiveLabelPropertyIndices" | "Index" | "Gauge" | 18 |
| "ActivePointIndices" | "Index" | "Gauge" | 0 |
| "ActiveTextIndices" | "Index" | "Gauge" | 0 |
| "ActiveTextEdgeIndices" | "Index" | "Gauge" | 0 |
| "ActiveVectorEdgeIndices" | "Index" | "Gauge" | 0 |
| "ActiveVectorIndices" | "Index" | "Gauge" | 0 |
| "DbEmbeddingMemoryTracked" | "Memory" | "Gauge" | 0 |
| "DbMemoryTracked" | "Memory" | "Gauge" | 81508835 |
| "DbPeakMemoryTracked" | "Memory" | "Gauge" | 81508835 |
| "DbQueryMemoryTracked" | "Memory" | "Gauge" | 0 |
| "DbStorageMemoryTracked" | "Memory" | "Gauge" | 81508835 |
| "DiskUsage" | "Memory" | "Gauge" | 81508835 |
| "MemoryRes" | "Memory" | "Gauge" | 339640320 |
| "PeakMemoryRes" | "Memory" | "Gauge" | 339775488 |
| "UnreleasedDeltaObjects" | "Memory" | "Gauge" | 0 |
| "GCLatency_us_50p" | "Memory" | "Histogram" | 1000 |
| "GCLatency_us_90p" | "Memory" | "Histogram" | 1000 |
| "GCLatency_us_99p" | "Memory" | "Histogram" | 1000 |
| "GCSkiplistCleanupLatency_us_50p" | "Memory" | "Histogram" | 500 |
| "GCSkiplistCleanupLatency_us_90p" | "Memory" | "Histogram" | 500 |
| "GCSkiplistCleanupLatency_us_99p" | "Memory" | "Histogram" | 500 |
| "AccumulateOperator" | "Operator" | "Counter" | 0 |
| "AggregateOperator" | "Operator" | "Counter" | 0 |
| "ApplyOperator" | "Operator" | "Counter" | 0 |
| "CallProcedureOperator" | "Operator" | "Counter" | 0 |
| "CartesianOperator" | "Operator" | "Counter" | 0 |
| "ConstructNamedPathOperator" | "Operator" | "Counter" | 0 |
| "CreateExpandOperator" | "Operator" | "Counter" | 0 |
| "CreateNodeOperator" | "Operator" | "Counter" | 0 |
| "DeleteOperator" | "Operator" | "Counter" | 0 |
| "DistinctOperator" | "Operator" | "Counter" | 0 |
| "EdgeUniquenessFilterOperator" | "Operator" | "Counter" | 0 |
| "EmptyResultOperator" | "Operator" | "Counter" | 0 |
| "EvaluatePatternFilterOperator" | "Operator" | "Counter" | 0 |
| "ExpandOperator" | "Operator" | "Counter" | 0 |
| "ExpandVariableOperator" | "Operator" | "Counter" | 0 |
| "FilterOperator" | "Operator" | "Counter" | 0 |
| "ForeachOperator" | "Operator" | "Counter" | 0 |
| "HashJoinOperator" | "Operator" | "Counter" | 0 |
| "IndexedJoinOperator" | "Operator" | "Counter" | 0 |
| "LimitOperator" | "Operator" | "Counter" | 0 |
| "MergeOperator" | "Operator" | "Counter" | 0 |
| "OnceOperator" | "Operator" | "Counter" | 0 |
| "OptionalOperator" | "Operator" | "Counter" | 0 |
| "OrderByOperator" | "Operator" | "Counter" | 0 |
| "PeriodicCommitOperator" | "Operator" | "Counter" | 0 |
| "PeriodicSubqueryOperator" | "Operator" | "Counter" | 0 |
| "ProduceOperator" | "Operator" | "Counter" | 0 |
| "RemoveLabelsOperator" | "Operator" | "Counter" | 0 |
| "RemoveNestedPropertyOperator" | "Operator" | "Counter" | 0 |
| "RemovePropertyOperator" | "Operator" | "Counter" | 0 |
| "RollUpApplyOperator" | "Operator" | "Counter" | 0 |
| "ScanAllByEdgeIdOperator" | "Operator" | "Counter" | 0 |
| "ScanAllByEdgeOperator" | "Operator" | "Counter" | 0 |
| "ScanAllByEdgePropertyOperator" | "Operator" | "Counter" | 0 |
| "ScanAllByEdgePropertyRangeOperator" | "Operator" | "Counter" | 0 |
| "ScanAllByEdgePropertyValueOperator" | "Operator" | "Counter" | 0 |
| "ScanAllByEdgeTypeOperator" | "Operator" | "Counter" | 0 |
| "ScanAllByEdgeTypePropertyOperator" | "Operator" | "Counter" | 0 |
| "ScanAllByEdgeTypePropertyRangeOperator" | "Operator" | "Counter" | 0 |
| "ScanAllByEdgeTypePropertyValueOperator" | "Operator" | "Counter" | 0 |
| "ScanAllByIdOperator" | "Operator" | "Counter" | 0 |
| "ScanAllByLabelOperator" | "Operator" | "Counter" | 0 |
| "ScanAllByLabelPropertiesOperator" | "Operator" | "Counter" | 0 |
| "ScanAllByPointDistanceOperator" | "Operator" | "Counter" | 0 |
| "ScanAllByPointWithinbboxOperator" | "Operator" | "Counter" | 0 |
| "ScanAllOperator" | "Operator" | "Counter" | 0 |
| "SetLabelsOperator" | "Operator" | "Counter" | 0 |
| "SetNestedPropertyOperator" | "Operator" | "Counter" | 0 |
| "SetPropertiesOperator" | "Operator" | "Counter" | 0 |
| "SetPropertyOperator" | "Operator" | "Counter" | 0 |
| "SkipOperator" | "Operator" | "Counter" | 0 |
| "UnionOperator" | "Operator" | "Counter" | 0 |
| "UnwindOperator" | "Operator" | "Counter" | 0 |
| "QueryExecutionLatency_us_50p" | "Query" | "Histogram" | 0 |
| "QueryExecutionLatency_us_90p" | "Query" | "Histogram" | 0 |
| "QueryExecutionLatency_us_99p" | "Query" | "Histogram" | 0 |
| "ReadQuery" | "QueryType" | "Counter" | 0 |
| "ReadWriteQuery" | "QueryType" | "Counter" | 0 |
| "WriteQuery" | "QueryType" | "Counter" | 0 |
| "ShowSchema" | "SchemaInfo" | "Counter" | 0 |
| "ActiveBoltSessions" | "Session" | "Gauge" | 1 |
| "ActiveSSLSessions" | "Session" | "Gauge" | 0 |
| "ActiveSessions" | "Session" | "Gauge" | 1 |
| "ActiveTCPSessions" | "Session" | "Gauge" | 1 |
| "ActiveWebSocketSessions" | "Session" | "Gauge" | 0 |
| "BoltMessages" | "Session" | "Counter" | 4 |
| "SnapshotCreationLatency_us_50p" | "Snapshot" | "Histogram" | 0 |
| "SnapshotCreationLatency_us_90p" | "Snapshot" | "Histogram" | 0 |
| "SnapshotCreationLatency_us_99p" | "Snapshot" | "Histogram" | 0 |
| "SnapshotRecoveryLatency_us_50p" | "Snapshot" | "Histogram" | 10924534 |
| "SnapshotRecoveryLatency_us_90p" | "Snapshot" | "Histogram" | 10924534 |
| "SnapshotRecoveryLatency_us_99p" | "Snapshot" | "Histogram" | 10924534 |
| "ShowStorageInfo" | "StorageInfo" | "Counter" | 0 |
| "ShowStorageInfoOnDatabase" | "StorageInfo" | "Counter" | 0 |
| "MessagesConsumed" | "Stream" | "Counter" | 0 |
| "StreamsCreated" | "Stream" | "Counter" | 0 |
| "DeletedEdges" | "TTL" | "Counter" | 0 |
| "DeletedNodes" | "TTL" | "Counter" | 0 |
| "ActiveTransactions" | "Transaction" | "Gauge" | 1 |
| "CommitedTransactions" | "Transaction" | "Counter" | 0 |
| "FailedPrepare" | "Transaction" | "Counter" | 0 |
| "FailedPull" | "Transaction" | "Counter" | 0 |
| "FailedQuery" | "Transaction" | "Counter" | 0 |
| "RolledBackTransactions" | "Transaction" | "Counter" | 0 |
| "SuccessfulQuery" | "Transaction" | "Counter" | 1 |
| "TransientErrors" | "Transaction" | "Counter" | 0 |
| "WriteWriteConflicts" | "Transaction" | "Counter" | 0 |
| "TriggersCreated" | "Trigger" | "Counter" | 0 |
| "TriggersExecuted" | "Trigger" | "Counter" | 0 |
+------------------------------------------+---------------------+-------------+------------+Build information
Running the following query will return certain information about the build type of the current instance:
SHOW BUILD INFO;| Field | Description |
|---|---|
| build_type | The optimization level the instance was built with. |
Active users information
Running this query will provide information about currently logged-in Memgraph users and their session details.
SHOW ACTIVE USERS INFO;Identical information can be obtained by executing the following command:
SHOW ACTIVE USERS;| username | session uuid | login timestamp |
|----------|----------------------------------------|-----------------------|
| test | "550e8400-e29b-41d4-a716-446655440000" | "2024-08-03 18:53:00" |