Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Applies to:
SQL Server 2025 (17.x) on Linux
Returns Linux operating system-level virtual memory statistics, including metrics related to SQL Server and other processes running on the system, in SQL Server 2025 (17.x) Cumulative Update (CU) 1 and later versions.
| Column name | Data type | Nullable | Description |
|---|---|---|---|
vm_metric_name |
nvarchar(256) | No | Virtual memory metric name. |
count |
bigint | No | Corresponding statistic for that metric. |
Permissions
Requires VIEW SERVER PERFORMANCE STATE permission on the server.
Remarks
sys.dm_os_linux_vm_stats provides system-wide memory observability to help you analyze memory pressure, page faults, reclaim activity, non-uniform memory access (NUMA) behavior, and to correlate SQL Server performance with overall OS memory health.
Each row represents a single virtual memory metric, typically sourced from Linux interfaces such as /proc/vmstat. Metric availability and meaning can vary by Linux distribution, kernel version, and configuration.
Use this DMV with other Linux-specific DMVs for holistic monitoring:
Usage scenarios
Common scenarios for using sys.dm_os_linux_vm_stats include:
- Investigating out-of-memory (OOM) events on Linux hosts.
- Correlating SQL Server memory symptoms with OS reclaim activity.
- Understanding NUMA-related memory behavior on multinode systems.
- Performing deep OS-level observability directly from Transact-SQL.
Examples
A. View all virtual memory statistics
The following query returns all available virtual memory metrics reported by the Linux kernel:
SELECT *
FROM sys.dm_os_linux_vm_stats;
B. Identify page fault activity
The following query highlights page fault-related metrics, which can help identify memory pressure or inefficient memory access patterns:
SELECT vm_metric_name,
count
FROM sys.dm_os_linux_vm_stats
WHERE vm_metric_name IN ('pgfault', 'pgmajfault');
C. Monitor locality of NUMA memory
Returns NUMA-related virtual memory metrics to help understand memory locality across nodes:
SELECT vm_metric_name,
count
FROM sys.dm_os_linux_vm_stats
WHERE vm_metric_name LIKE 'numa%';
D. Analyze activity for memory reclaim and compaction
The following query helps you diagnose memory reclaim behavior and compaction pressure on the system:
SELECT vm_metric_name,
count
FROM sys.dm_os_linux_vm_stats
WHERE vm_metric_name LIKE 'pgsteal%'
OR vm_metric_name LIKE 'pgscan%'
OR vm_metric_name LIKE 'compact%';