Windows 10: Fix high cpu usage caused by diagnostic policy service Solved

  1.    25 Jun 2018 #1

    Fix high cpu usage caused by diagnostic policy service


    Hello,

    as mentioned in another thread reply I found a solution by someone for this common problem with high cpu usage by a windows service. In the folder "C:\Windows\system32\sru" are constantly created log files and the directory becomes very large over time. Then I stopped the service, I even needed to force kill the process via taskmanager because the service was too busy The service is part of the svchost process structure so you first need to find the corresponding PID of process. It is much safer via cmd and then "sc stop dps". Then you can delete the whole folder C:\Windows\system32\sru. When you start the service afterwards the folder stays empty or even gone. For me it did not affect the service, troubleshooting does still work and cpu usage is now low

    I attached a Batch which finds the pid of the dps service and stops the service. The it promps the user to delete the folder "sru" and starts the service after that.

    You can also use the code below and paste it in a new text file. Then rename suffix from *.txt to *.bat and run with admin privileges.

    Code:
    @echo off
    echo ... Set DPS service start type to manual ...
    echo.
    sc config DPS start= demand
    
    echo.
    echo ... Find PID of DPS service ...
    
    for /f "tokens=2 delims=[:]" %%f in ('sc queryex dps ^|find /i "PID"') do set PID=%%f
    
    echo.
    echo ... Kill DPS service
    echo.
    
    taskkill /f /pid %PID%
    
    
    echo.
    echo ... Delete sru Folder ...
    echo.
    
    rd /s "%windir%\system32\sru"
    
    echo.
    echo ... Set DPS service start type to auto ...
    echo.
    sc config DPS start= auto
    
    echo.
    echo ... Start DPS service ...
    
    sc start DPS
    echo.
    
    pause
    Fix high cpu usage caused by diagnostic policy service Attached Files
      My ComputerSystem Spec

  2. EyeInTheSky's Avatar
    Posts : 231
    Windows 10 Home x64 - Version 1809 (OS Build 17763.55)
       25 Jun 2018 #2

    At what percentage of the CPU being used would you recommend executing the batch file? I looked at the "sru" folder on my system, and it was 11MB in size.


    It is curious that you mentioned that the folder may not regenerate or even fill up again with files. To me, that doesn't seem right for a System32 folder and seems like an integrity violation to the system.


    I wonder what the long term effects of executing the batch file on this service would be?
    Last edited by EyeInTheSky; 25 Jun 2018 at 08:16. Reason: Correction
      My ComputerSystem Spec

  3.    26 Jun 2018 #3

    EyeInTheSky said: View Post
    At what percentage of the CPU being used would you recommend executing the batch file? I looked at the "sru" folder on my system, and it was 11MB in size.


    It is curious that you mentioned that the folder may not regenerate or even fill up again with files. To me, that doesn't seem right for a System32 folder and seems like an integrity violation to the system.


    I wonder what the long term effects of executing the batch file on this service would be?
    The size of the folder does not really matter, I had sometimes just small files always created again and again, like in a loop. And cpu usage can vary, my laptop has only 2 cores and is an ULV processor, so 30 percent did really affect perfomance and caused heat. I dont think that there are any downsides because even disabling the service has no affect on functionality either. Troubleshooting still works with service disabled, only wlan troubleshooting does not work without this service.

    Here whats happening when service is disabled
    Click image for larger version. 

Name:	Unbenannt.png 
Views:	0 
Size:	312.3 KB 
ID:	193605
    My bat file only stops the service and asks the user to delete the problematic folder. Then the service is started again. I donīt know how widespread this problem is, on laptops it can be very resource hogging. Even microsoft itself admits this solution, and proposes to rename a relevant file in this folder (besides the log files). My approach is to simply delete the whole folder. It is similar to deleting the "software distribution" folder from windows udpate service. The service can create the folder if needed (in my case the folder sru never appeared again). IMHO there are no important files in this folder.

    CPU usage most of the time of service
    Click image for larger version. 

Name:	Unbenannt.png 
Views:	0 
Size:	22.0 KB 
ID:	193606
      My ComputerSystem Spec

  4. EyeInTheSky's Avatar
    Posts : 231
    Windows 10 Home x64 - Version 1809 (OS Build 17763.55)
       26 Jun 2018 #4

    Thanks for the in-depth feedback. It is always appreciated. I have a second computer not listed in "My Computer" and it just so happens to be a laptop. I'll have to look at its CPU usage to see if this nifty little .bat file can help if it is needed.


    Thanks again!
      My ComputerSystem Spec


 

Related Threads
Hello, For a few days now my office desktop has been pretty much running non-stop a svchost.exe process which is linked to Diagnostic Policy Service and seems to consume approximately 25-30% of my CPU max speed. While the PC isn't doing much...
Diagnostic Policy Service - high CPU in Performance & Maintenance
HP laptop problem In the last few days, this laptop started having poor performance, with Task manager showing Diagnostic Policy Service taking up to 30% or more of CPU. HP Spectre x360 - 13-4197dx (ENERGY STAR) 183868 In the last few days...
Hello Guys, I'm using Windows 10 Home Single Language 64-bit. After the latest Windows update in Feb 2018, I've been experiencing consistent CPU Usage (13-14%) by a Windows Process (Service Host: Diagnostic Policy Service). I can't figure out...
This is my first post in TenForums, I'll try not to screw up. And I am not a computer tech. Windows 10 Pro Version 10.0.14393 Build 14393 Dell Optiplex 380 I am trying to network my computers, of which I have too many! LOL These are...
Disabling Diagnostic Policy Service in Performance & Maintenance
I just disabled the Diagnostic Policy Service, Diagnostic Service Host, and the Diagnostic System Host. Is there any adverse actions that this may cause? So far I have not noticed any. Once I get my Windows Settings the way I like, they...

Tags for this Thread

Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

Đ Designer Media Ltd
All times are GMT -5. The time now is 00:53.
Find Us