Troubleshooting high CPU on Windows hosts caused by PowerShell processes (KBA10705)
KBA
KBA#Applicable Delphix Versions
- Click here to view the versions of the Delphix engine to which this article applies
-
Date Release Dec 20, 2023 | Jan 10, 2024 18.0.0.0 | 18.0.0.1 Nov 21, 2023 17.0.0.0 Oct 18,2023 16.0.0.0 Sep 21, 2023 15.0.0.0 Aug 24, 2023 14.0.0.0 Jul 24, 2023 13.0.0.0 Jun 21, 2023 12.0.0.0 May 25, 2023 11.0.0.0 Apr 13, 2023 10.0.0.0 Mar 13, 2023 | Mar 20, 2023 9.0.0.0 | 9.0.0.1 Feb 13, 2023 8.0.0.0 Jan 12, 2023 7.0.0.0 Releases Prior to 2023 Major Release All Sub Releases 6.0 6.0.0.0, 6.0.1.0, 6.0.1.1, 6.0.2.0, 6.0.2.1, 6.0.3.0, 6.0.3.1, 6.0.4.0, 6.0.4.1, 6.0.4.2, 6.0.5.0, 6.0.6.0, 6.0.6.1, 6.0.7.0, 6.0.8.0, 6.0.8.1, 6.0.9.0, 6.0.10.0, 6.0.10.1, 6.0.11.0, 6.0.12.0, 6.0.12.1, 6.0.13.0, 6.0.13.1, 6.0.14.0, 6.0.15.0, 6.0.16.0, 6.0.17.0, 6.0.17.1, 6.0.17.2 5.3
5.3.0.0, 5.3.0.1, 5.3.0.2, 5.3.0.3, 5.3.1.0, 5.3.1.1, 5.3.1.2, 5.3.2.0, 5.3.3.0, 5.3.3.1, 5.3.4.0, 5.3.5.0, 5.3.6.0, 5.3.7.0, 5.3.7.1, 5.3.8.0, 5.3.8.1, 5.3.9.0 5.2
5.2.2.0, 5.2.2.1, 5.2.3.0, 5.2.4.0, 5.2.5.0, 5.2.5.1, 5.2.6.0, 5.2.6.1
5.1
5.1.0.0, 5.1.1.0, 5.1.2.0, 5.1.3.0, 5.1.4.0, 5.1.5.0, 5.1.5.1, 5.1.6.0, 5.1.7.0, 5.1.8.0, 5.1.8.1, 5.1.9.0, 5.1.10.0
5.0
5.0.1.0, 5.0.1.1, 5.0.2.0, 5.0.2.1, 5.0.2.2, 5.0.2.3, 5.0.3.0, 5.0.3.1, 5.0.4.0, 5.0.4.1, 5.0.5.0, 5.0.5.1, 5.0.5.2, 5.0.5.3, 5.0.5.4
Troubleshooting high CPU on Windows hosts
PowerShell processes tend to be CPU intensive on their own. There are some known reasons why Delphix-spawned PowerShell processes may drive CPU higher than normal on Windows hosts. This article will help identify which scenario is causing the high CPU usage. Some of the most common reasons include:
- Often new Mircrosoft patches will invalidate the .NET libraries causing high CPU (Resolving high CPU on Windows VDB hosts after applying Windows Updates (KBA6024)).
- Older versions of the Delphix Connector made excessive PowerShell calls. A bug fix went into Delphix Connector 1.27 and higher that reduces the number of PowerShell calls by about 40%.
- Windows hosts that are designated as staging hosts where Delphix restores source database transaction logs and database dumps can undergo a significant load. Determining how many staging databases the Windows host is able to support is outlined in the documentation (Best practices for staging targets).
- Antivirus programs add to the amount of CPU a given PowerShell process consumes. Delphix recommends excluding the Delphix Connector directory from antivirus scanning:
Prerequisites
It may be helpful to install the Microsofts Process Monitor utility. This utility records real-time file access and allows you to set a filter to a specific file or directory to limit the output and see which processes are accessing the file. If an antivirus program is actively scanning the Delphix Connector directory, it will likely be displayed in this trace. Details on using this utility can be seen in (Troubleshooting File Access Issues Caused By Windows Defender (KBA10458)).
Resolution
As mentioned, PowerShell processes tend to be CPU intensive. The following steps can be used to help narrow down the reason for the high CPU usage on a Windows target or staging host.
- The most frequent reason for high CPU usage is after applying a Microsoft patch, the Microsoft .NET libraries are invalidated and need to be rebuilt. The following command can be run at a DOS command prompt to dump out a listing of patches and when they were applied. If a Microsoft patch has been applied recently, the first thing to try to resolve the problem would be the steps outlined in KBA6024.
wmic qfe > c:\temp\patches.out
- Next, open the Windows Control Panel and review the list of installed programs/applications to confirm that the Delphix Connector version is 1.27 or higher:
Generally speaking, the Delphix Connector and Engine are generally backward-compatible. Not all new releases of Delphix release a new version of the Delphix Connector. Please see the following documentation links for more information on the Delphix Connector version release matrix and how to upgrade it to a new version:
- The next most common reason for seeing high CPU usage is when the Windows staging host is overloaded with Delphix staging databases. Follow the documentation on how to determine how many staging databases the Windows host is able to support (Best practices for staging targets).
- Lastly, try to exclude the Delphix Connector directory from any antivirus software. Antivirus programs can cause a number of issues, as noted in the previously mentioned article Delphix Environment Hosts and Antivirus / Endpoint Security Software (KBA8490). Excluding the Delphix Connector directory from antivirus scanning can help rule out the antivirus program from adding to the CPU usage.