6

How do you fix the Microsoft "Diagnostic Policy Service" taking up about 4GB memory and about 1 cpu core at 100%?

I found out there is a process that keeps using up tons of CPU because my computer fans keep spinning up for heat. But the problem is that the cpu/memory usage wasn't always bad. And when you restart the process it SEEMS to go away for a while.

I used a python program psrecord to measure the cpu usage and memory usage of the process (and children) to find out that this process takes about 12 hours to get to maximum memory usage and it has lots of CPU usage:

enter image description here

The first graph is:

  • x-axis time in seconds
  • y-axis cpu usage in percent (100% is one full core)

The second graph is memory usage:

  • x-axis is time in days
  • y-axis is memory usage in MB

1 Answer 1

8

In a nutshell: You have to stop the process, delete the directory C:\Windows\System32\sru that is used by the process, start the process back up. Once I did this the service now uses about 20 MB memory and 0% CPU.

Here's a quick screenshot of the memory usage going down:

enter image description here


Long story:

*1 here's the low level steps of the script:

  • calls sc. set the service "DPS" to "demand" (aka "manual")
  • calls sc to get the "DPS" process id number (PID)
  • calls taskkill to stop the PID
  • calls rd to delete the src directory
  • calls sc to change the "DPS" service to "auto"
  • calls sc to start "DPS" service

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .