8

I am boggled when I click on an application in windows and have to wait 10 seconds for it to respond. I wonder "you can run 16 billion instructions a second, what are you doing that keeps you from responding to my mouse click." Because of that I would be interested in gathering together ideas on how to design an application that could diagnose these kinds of problems. I am no windows expert and wonder what methods others would suggest. Here is what I would ideally like to be able to do:

Recognize any applications, drivers, or operating system states (e.g. the oft-blamed registry) that are slowing down the system and bring those to the attention of the user. Some of this could be garnered using performance counters, other aspects I am less certain of. I would be inclined to use machine learning methods to determine whether the system is bogged down and to help determine the culprit (which is workable as long as I can both contrive examples that recreate the major sources of problem, as well as garner enough data to be able to determine the culprit).

3
  • 1
    Buy more RAM...
    – Albin Sunnanbo
    Nov 2, 2010 at 7:18
  • Then how is it I had enough RAM 6 months ago? :) I am being facetious of course, but if the delay really is that it has been paged I want it to become clear that unpaging is the cause of the delay as well as clear what is eating up my RAM that wasn't 6 months previously.
    – John Robertson
    Nov 2, 2010 at 7:55
  • @John, Maybe you have more programs eating away your RAM? The 10 second app switch time is typically due to your application being swapped out, hence to little RAM or to many other programs eating up your RAM. Why your machine is like that is unfortunately not a programming related question. Voting for close (of topic).
    – Albin Sunnanbo
    Nov 2, 2010 at 8:30

3 Answers 3

9

Try the free Microsoft SysInternals tool suite: lots of tools for profiling. Take a look at: http://technet.microsoft.com/en-us/sysinternals/default.aspx

Update:

You should also consider what Internet Security/Anti-virus you have installed and is running on your system. These will have a, hopefully small, but significant impact on your system performance. You can adjust the settings on this, one of the main ones that will have significant activity is background scanning. I've used AVG, McAfee and Norton, and Norton appears to provide the most transparent view as to what it is doing as it has its own task manager and resource usage graph over time. I don't work for any of them but I would recommend Norton over McAfee as McAfee mysteriously periodically severely slowed down my machine for a minute or so on occasions.

Update 2:

You said:

"you can run 16 billion instructions a second, what are you doing that keeps you from responding to my mouse click."

Just a further comment. Computing activity can be described as falling into 2 kinds: Compute-bound and IO-bound. Compute-bound is where the activity is mostly or all of calculations, IO bound is where the activity is mostly or all of accessing input output devices, such as hard disks, other peripherals such as a network. Useful activities are seldom one or the other, as you can't really do just IO without using compute to make it useful and if you don't have any IO then you have nothing to compute. In your case it would seem that the activities involve an IO component - accessing the hard disk, which is the slowest component.

Update 3: Re:McAfee occasional CPU hog issue, at appears that Norton has its own version of this, to my won discovery recently, though I'm not seeing such a thing as much as I had with McAfee. The Norton CPU hog is discussed here: http://community.norton.com/t5/Norton-Internet-Security-Norton/ccsvchst-exe-cpu-usage-Issue/m-p/2888 "ccsvchst.exe cpu usage Issue". So thought I would mention to provide a balanced opinion. I would however still recommend Norton as from my experience my version shows detailed resource usage statistics which would go toward explaning your original question if you install the same.

3
  • Both Antivirus software are hogs. Go with MSE.
    – surfasb
    Jul 10, 2011 at 12:39
  • @surfasb MSE? You mean Microsoft Essentials? Fair enough. I hope that is effective. With Norton installed, I get good performance out of my 1.6GHz atom 2Gb RAM toshiba NB100 netbook running XP --AND-- the entire drive is encrypted with truecrypt. Pre-installed windows usually has a lot of trialware guff - if you get an genuine OEM re-install CD/DVD off ebay and change the key to your valid one, then you have a nice clean install. Jul 11, 2011 at 14:57
  • Yeah, Microsoft essentials is the way to go. You get updates through Windows Update. And it's pretty secure even against kernel hooks. It is kind of ironic though. Microsoft wanted to push this product out through Windows Update, especially to users who don't have anti-virus. But they got threats of lawsuits so they had to scrap that idea. That would be a headline: "Micorosoft gets sued by trying to make their OS more secure. . ."arstechnica.com/microsoft/news/2010/05/…
    – surfasb
    Jul 11, 2011 at 17:32
3

Try the tool Process Monitor if you want to see what all a process is doing when it starts up. And for the record, most of the "waiting" these days is waiting on the harddrive - CPU and memory improvements are quickly outpacing the rate at which harddrives are getting faster. If you open Task Manager, and then watch it while you launch a program, you can see how much of the CPU is actually being used - unless the CPu hits 100% and pegs there, then the CPU is sitting idle while the harddisk is trying to feed it information.

1
  • 1
    +1 for a more specific answer out of the sysinternals suite, also upvoted because of the harddrive comment. In any system - computer, chemical reaction, business activity etc - the slowest part is always going to have the biggest influence on the overall duration of a process to complete. To reiterate others comments: adding RAM will mean lesser time spent going to the hard disk to fetch temporary data and program and instead going to the faster chip RAM. Nov 2, 2010 at 17:41
3

To answer the question's title "Profiling your windows operating system" I suggest trying with Microsoft's Windows Performance Toolkit V5.0 - that includes WPR (Windows Performance Recorder) and WPA (Windows Performance Analyzer).

It is included in the Windows ADK.
It works with Windows 7 and later.


Additional starting points:

  • Resource Monitor (resmon.exe) - included in Windows Vista (and later).
  • Microsoft's Sysinternals has various tools.

You must log in to answer this question.

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