WMI Performance Adapter这个服务是否可以禁用

Jonas Zhan 0 信誉分
2025-06-12T10:13:20.1633333+00:00

WMI Performance Adapter这个服务的作用是什么?是否可以禁用,禁用有什么影响?我们有一套SQL SERVER前几天这个服务CPU使用飙升,重启后恢复了,但是担心下次又出现,想禁用这个服务,需要确认禁用的影响。

Windows 商业版 Windows Server 用户体验 其他
0 个注释 无注释
{count} 票

1 个答案

排序依据: 非常有帮助
  1. Sherry Yang 80 信誉分 Microsoft 外部员工
    2025-06-17T02:42:38.22+00:00

    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:

    1. 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*).

    1. 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

    1. 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 
    
    
    1. Permanently disable (after confirming no impact):
    
    Set-Service -Name "WmiApSrv" -StartupType Disabled
    
    

    ###Special Recommendations for SQL Server

    1. 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.

    1. 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.

    0 个注释 无注释

你的答案

问题作者可以将答案标记为“接受的答案”,这有助于用户了解已解决作者问题的答案。