locked
Long term examination of CPU load RRS feed

  • Question

  • I believe that the CPU load of a PC (Windows 7 x64 or Windows8/8.1/10 ditto) runs high from time to time making problems for some processes.
    Basically I don't have a clue of which process(es) are to blame for this (even though I suspect it has to with something started by Task Scheduler).
    I am thus looking for a good way to log the cpu activity for each running process over a period of e.g. one week.

    Details like context switching, IO activity, network activity etc. is not so interesting initially (when I have found which processes to blame this may be highly interesting as well, but then I need only logging for these processes.

    I have been looking at Performance Monitor, but as far as I understand the potensial processes must be known in advance which would be very difficult. It seems like "All processes" means the same as total (which gives me info of when load peeks, but not which process to blame).

    I have also looked at Sysinternals/ProcMon, but I do not understand how this may be set up for this task.

    Any recommendations ?

    It must not increase the memory consumption during run (i.e. it must be running deterministic and not causing resource starvation during e.g. 7 days).
    Likewise it must not eat to many cpu cycles it self (say maximum 10%)

    Sunday, July 10, 2016 3:08 PM

Answers

  • Its easier to do in Xperf

    xperf -on PROC_THREAD+LOADER+DISK_IO+HARD_FAULTS+INTERRUPT+DPC+CSWITCH -maxbuffers 1024

    https://blogs.msdn.microsoft.com/pigscanfly/2008/02/15/using-xperf-to-take-a-trace-updated/


    Wanikiya and Dyami--Team Zigzag Windows IT-PRO (MS-MVP)

    • Marked as answer by EuroEager Wednesday, July 13, 2016 12:20 PM
    Tuesday, July 12, 2016 10:13 AM

All replies

  • In order to diagnose your problem we need to run Windows performance toolkit the instructions for which can be found in this wiki

    If you have any questions feel free to ask

    Please run the trace when you are experiencing the problem

    Wanikiya and Dyami--Team Zigzag Windows IT-PRO (MS-MVP)

    Sunday, July 10, 2016 4:30 PM
  • Thanks, I tried WPR/WPA and it gives me what I need (and much more).
    However, even if I have not tried: Is it for all practical purposes possible to run this for say 7 full days ?
    Monday, July 11, 2016 9:42 AM
  • It is probably not feasible to run it for a week.  You can probably trim the data it collects by selecting fewer items and depending on the computer resources you could probably run it for a day.

    Wanikiya and Dyami--Team Zigzag Windows IT-PRO (MS-MVP)

    Monday, July 11, 2016 10:25 AM
  • Thanks

    I will try for 24 hours with light level, memory mode and only CPU selected

    Monday, July 11, 2016 12:20 PM
  • Its going to be a big file.  Hopefully that computer has more than 4 gb ram.

    Wanikiya and Dyami--Team Zigzag Windows IT-PRO (MS-MVP)

    Monday, July 11, 2016 1:11 PM
  • Sure, but shouldn't that be a function of the buffer size ?
    However, I don't see an option to specify the buffer size... ???
    Monday, July 11, 2016 9:47 PM
  • Are you using logging mode of memory or file?  You can also use detail level of "light"

    If you want to specify buffer size you either need to run command level wpr, or Xperf.


    Wanikiya and Dyami--Team Zigzag Windows IT-PRO (MS-MVP)

    • Proposed as answer by Tony_Tao Tuesday, July 12, 2016 9:20 AM
    Tuesday, July 12, 2016 12:05 AM
  • As ZigZag3143x mentioned, please try it.


    Please mark the reply as an answer if you find it is helpful.

    If you have feedback for TechNet Support, contact tnmff@microsoft.com

    Tuesday, July 12, 2016 9:20 AM
  • Profile: CPU usage (only)
    Scenario: General
    Detail level: Light
    Logging mode: Memory

    Please explain how to specify buffer size (and numbers) by using wpr

    Tuesday, July 12, 2016 9:24 AM
  • Its easier to do in Xperf

    xperf -on PROC_THREAD+LOADER+DISK_IO+HARD_FAULTS+INTERRUPT+DPC+CSWITCH -maxbuffers 1024

    https://blogs.msdn.microsoft.com/pigscanfly/2008/02/15/using-xperf-to-take-a-trace-updated/


    Wanikiya and Dyami--Team Zigzag Windows IT-PRO (MS-MVP)

    • Marked as answer by EuroEager Wednesday, July 13, 2016 12:20 PM
    Tuesday, July 12, 2016 10:13 AM
  • Ok, thanks
    That's for xperf, possible also for cli wpr ?
    Tuesday, July 12, 2016 10:16 AM
  • Not quite sure what you think max buffers will do for you.  Care to explain?

    Wanikiya and Dyami--Team Zigzag Windows IT-PRO (MS-MVP)

    Tuesday, July 12, 2016 10:30 AM
  • Just to be able to control somewhat how big a timespan may be recorded at wpr -stop (which I believe corresponds to the buffer size) and also to be somewhat sure to not starve the machine.

    Tuesday, July 12, 2016 12:25 PM
  • Windows Update malfunction
    Since a month ago that Windows Update is not working properly, contrary to what has always happened before.
    Reason: it is the "check for updates" for 5 hours, consuming a total of 1 CPU (25%) permanently, and does not advance. Please check out what's happening on your side, considering the sotware advanced and privileged communication channels that Microsoft uses.
    Thank you.
    Wednesday, July 13, 2016 6:36 PM