PowerToys icon indicating copy to clipboard operation
PowerToys copied to clipboard

[Tracker] PowerLauncher cycles high CPU usage

Open WesleyM77 opened this issue 6 years ago • 55 comments

PowerLauncher.exe keeps ramping up to ~60% CPU usage in task manager and then back down to 0%. It happens about every 2 seconds or so.

Environment

Windows [Version 10.0.18363.720] PowerToys 0.18 PowerLauncher

Steps to reproduce

Start PowerToys.

Screenshots

Taskmgr_2020-05-19_16-10-54

WesleyM77 avatar May 19 '20 20:05 WesleyM77

I have the same problem. Moreover, it eats quite a lot of memory and almost continuously works with the disk. obrazek

jspitz-git avatar May 20 '20 09:05 jspitz-git

same here, using quite a bit more ram though image

lftrejo avatar May 20 '20 17:05 lftrejo

This is same as #3365, I also have almost 1GB of RAM usage.

sondreb avatar May 21 '20 18:05 sondreb

I have a similar problem but it peaks usually at 20%. It will spike for about 10 seconds to 18%-20% then release for about 30 seconds, then repeat. I noticed it also then triggered Cisco AMP and System to spike at same time, causing my computer to often hit 100%.

kozloffj avatar May 21 '20 18:05 kozloffj

Proactively monitoring it, yes, I'm starting to see it creep up as well. This could be one of two things off top of my head.

crutkas avatar May 22 '20 03:05 crutkas

@crutkas I'm a bit suspicious of the file watchers here, particularly for settings. They trigger on changes within the directory. We should look at if we are updating a setting at a regular interval. It also could be triggered by changes in the program files directory which would cause us to reindex the applications, but that shouldnt happen at a regular interval.

ryanbodrug-microsoft avatar May 22 '20 05:05 ryanbodrug-microsoft

The same thing here: image have to kill it, because computer really gets slow sometimes.

bcsanches avatar May 23 '20 13:05 bcsanches

I'm having the same problem here, PowerLauncher spikes the cpu usage to 70% - 80% and it almost uses 50% of the cpu constantly Screenshot (379)

WaterBlueNewWorld avatar Jun 02 '20 13:06 WaterBlueNewWorld

Doesn't appear to happen for me. image

PowerToys v0.18.2, AMD Ryzen 3900X non-oc'd, 32GB DDR4@3200MHz RAM.

favna avatar Jun 08 '20 14:06 favna

Hi, I had the same problem today, noticed my PC fans were suddenly blowing quite a lot, so looked at the Task Manager, and PowerLauncher was using a lot of CPU (around 50% if I remember correctly). I believe it has happened before, but probably didn't catch my attention at that point. Disabled it for the time being.

RensTillmann avatar Jun 09 '20 22:06 RensTillmann

Hi, I had the same problem today, noticed my PC fans were suddenly blowing quite a lot, so looked at the Task Manager, and PowerLauncher was using a lot of CPU (around 50% if I remember correctly). I believe it has happened before, but probably didn't catch my attention at that point. Disabled it for the time being.

@RensTillmann. Just trying to identify some potential causes. Do any of the following apply to you?

  1. Symbolic links in any of the directories that are being index.
  2. Something running on your machine that could be writing to the %ProgramFiles% directory (or subdirectories) frequently?
  3. Any cutomizations to the windows search settings as per below: image

ryanbodrug-microsoft avatar Jun 10 '20 19:06 ryanbodrug-microsoft

@ryanbodrug-microsoft Thanks.

  1. Yes I do have a couple of symlinks inside the indexing directory
  2. Not that I know of but how can I determine this exactly? I just went over and looked at "Last modified column" there were only 2 folders which were modified yesterday. So I think that's a No. (?)
  3. Didn't change anything there.

RensTillmann avatar Jun 11 '20 10:06 RensTillmann

I just want to flesh out some details of the processor usage spikes.

Looking at % Processor Time in PerfMon.exe, the spikes occur in roughly 30-second intervals. Processor usage in performance monitor

Analyzing using Process Explorer

The PowerLauncher.exe process is only able to run because its threads are executing code. We can inspect which functions in various DLLs the threads are executing using Process Explorer created by the SysInternals team.

After opening Process Explorer, follow these steps to view the thread activity of PowerLauncher.exe:

  1. Double click PowerLauncher.exe in the list of processes
  2. Navigate to the threads tab

Initially, you can only see entries with a byte offset like +0x2d8374 on the end. The offsets are actually functions inside the DLL they are referencing, but you need to fetch the debug symbols from the symbol server to access the names. Mark Russinovich briefly shows it at 24:45 in this talk.

I recorded PowerLauncher.exe's thread activity over time. Thread activity spikes at the start of the video and 0:30.

Analyzing using Process Monitor

In order to measure the amount and type of operations PowerLauncher.exe is performing, we can use Process Monitor, also created by the SysInternals team.

After opening Process Monitor, follow these steps to view the list of operations PowerLauncher.exe is performing:

  1. Press Ctrl + L or go to Filter > Filter... to open the filter
  2. Filter by Process name begins with PowerLauncher, then click Add and OK Adding a filter

It's useful to know that monitoring means continuously capturing the operations (described in the next section) the process is performing, and can be toggled with Ctrl+E. Ctrl+X clears the list. You can alternatively use the buttons at the top. Toggling capturing and clearing the list

Looking at the overall information I have gathered over a single spike (a time span of 3.7643472‬ seconds), there is a whopping 61 070 operations being carried out.

Amount Operation
15 573 RegQueryKey
14 741 RegOpenKey
12 506 RegCloseKey
10 987 RegQueryValue
1 443 ReadFile
1 374 CreateFile
1 089 CloseFile
575 RegEnumKey
506 RegSetInfoKey
506 RegCreateKey
496 QueryDirectory
496 QueryRemoteProtocolInformation
184 QueryStandardInformationFile
148 QueryNetworkOpenInformationFile
136 QueryAllInformationFile
136 QueryBasicInformationFile
136 QueryInformationVolume
22 FileSystemControl
11 DeviceIoControl
9 WriteFile
4 Thread Create
1 Thread Exit

Although I am far from knowledgeable enough to make any conclusions from the data, there are some interesting relations I see. Firstly, registry operations make up over 80% of all operations. Secondly, 1443 ReadFile and 1374 CreateFile operations are performed, in stark contrast to 9 WriteFile operations.

If you want to dig into the exact same data I have worked with, you can download this .pml file, open Process Monitor, press Ctrl+O or click the open icon in the top left corner, and open the .pml file.


Process Explorer and Process Monitor are great programs, it's incredible how much insight you can get from using them. Highly recommended to learn to use them for these kinds of scenarios. Watch the series "The Case of the Unexplained" by Mark Russinovich for more info on using both programs.

revosw avatar Jun 17 '20 21:06 revosw

For whatever help this is worth, I had this installed on both a desktop machine and a laptop. The desktop had no issues, while the laptop exhibited these issues.

After turning off BitLocker on my laptop (not for the purpose of debugging this but for linux dual boot convenience), I noticed the CPU issues seem to have gone away. In fact a lot of processes seem to be running a little bit better since then, though there was nothing as extreme as these CPU spikes with other processes. I checked on my desktop and found that, sure enough, it was not running BitLocker either.

So, possibly something related to Bitlocker encryption?

jbravata avatar Jun 19 '20 02:06 jbravata

For whatever help this is worth, I had this installed on both a desktop machine and a laptop. The desktop had no issues, while the laptop exhibited these issues.

After turning off BitLocker on my laptop (not for the purpose of debugging this but for linux dual boot convenience), I noticed the CPU issues seem to have gone away. In fact a lot of processes seem to be running a little bit better since then, though there was nothing as extreme as these CPU spikes with other processes. I checked on my desktop and found that, sure enough, it was not running BitLocker either.

So, possibly something related to Bitlocker encryption?

Maybe it also causes the problem, but I do not have bitlocker enabled and I have the issue.

bcsanches avatar Jun 19 '20 12:06 bcsanches

if it was bitlocker, the entire PowerToy team would have seen it instantly.

crutkas avatar Jun 19 '20 15:06 crutkas

Same thing happens for me on Microsoft Windows [Version 10.0.19041.329] and PowerToys v0.18.2.

RAM usage for me is around 300-400 MB with 8GB installed in the laptop. I think the RAM usage is dependent on how much is installed in your system.

@lftrejo, you had almost 1GB used by the PowerLauncher process, how much RAM do you have installed in your system?

theS1LV3R avatar Jun 20 '20 13:06 theS1LV3R

Ram usage and CPU I think are different things. For Ram, we believe we have at least one thing we can do to improve it.

crutkas avatar Jun 20 '20 17:06 crutkas

Same thing happens for me on Microsoft Windows [Version 10.0.19041.329] and PowerToys v0.18.2.

RAM usage for me is around 300-400 MB with 8GB installed in the laptop. I think the RAM usage is dependent on how much is installed in your system.

@lftrejo, you had almost 1GB used by the PowerLauncher process, how much RAM do you have installed in your system?

Running on 32GB

lftrejo avatar Jun 20 '20 20:06 lftrejo

Consumes crazy amounts of CPU for me too

object404 avatar Jun 24 '20 18:06 object404