Hello,
First, to answer your first question, the role of the WMI Performance Adapter (WmiApSrv) service.
Windows Management Instrumentation (WMI) Performance Adapter is a system service, whose main functions are:
- Provide performance counter data
-Allow WMI clients (such as PerfMon
, SQL Server, SCOM, and other monitoring tools) to access performance counter data (CPU, memory, disk, network, etc.) through Win32_Perf*
WMI classes.
-For example, SQL Server might rely on it to collect performance metrics (such as Win32_PerfFormattedData_SQLServer*
).
- Compatibility with old-version applications
-Some older applications (such as .NET 1.1 or earlier performance monitoring tools) may rely on this service to read performance data (rather than directly using the Performance Counters API
).
###Can it be disabled?
✅ Can be disabled, but the impact needs to be evaluated:
-Modern systems typically do not rely on this service because most applications (including SQL Server 2016+) default to using the Performance Counters API
rather than WMI.
-After being disabled, the following scenarios may be affected:
-Old monitoring tools that use WMI
to query performance data (such as some third-party operation and maintenance software).
-Specific SQL Server performance counters (if configured to be collected via WMI).
###Potential Impacts After Being Disabled
Tools that rely on the Win32_Perf*
WMI classes may fail (such as older versions of SCOM, custom scripts)
###How to Disable Safely
- Temporary test (to observe whether SQL Server and monitoring tools are functioning properly):
Stop-Service -Name "WmiApSrv" -Force
Set-Service -Name "WmiApSrv" -StartupType Manual # Disable automatic startup
- Permanently disable (after confirming no impact):
Set-Service -Name "WmiApSrv" -StartupType Disabled
###Special Recommendations for SQL Server
- Check whether SQL Server depends on WMI.
-Run the following query to confirm whether there are any WMI-related counters:
SELECT * FROM sys.dm_os_performance_counters
WHERE counter_name LIKE '%WMI%' OR instance_name LIKE '%WMI%';
-If there is no result, it indicates that SQL Server is not actively using the WMI performance adapter.
- Alternative Monitoring Scheme
-Use SQL Server's built-in DMVs or Extended Events instead of WMI performance queries.
-Make sure that monitoring tools (such as Zabbix, Prometheus) use the Performance Counters API
instead of WMI.