- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ok, I don't really understand why I would ever use counter monitor as part of my optimizing strategy. What does counter monitor do for me that plain old event based sampling can't do?
Link Copied
11 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
From what I understand, event based sampling is used to take a sampling of the program counter/execution point when a register overflows or underflows. counter monitor is more of a running sampling of a register. But, i've heard that counter monitor is not really that good in the latest rev of vtune.
maybe the vtune experts should answer, not me
maybe the vtune experts should answer, not me
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Counter Monitor is generally used to measure more Operating system type metrics such as memory usage and availability, page faults, file I/O rates, etc. Basically, anything that PerfMon (Task Manager) can measure. The added feature that VTune has is the ability to select a time slice of the overall performance run and drill down to an application's source code to determine what the application was doing during any time intervals when the measured metric had unusual values.
In terms of Counter Monitor not being that good, that idea probably relates to the sampling rate as compared to event based sampling. Counter Monitor's sampling interval is generally 100 milliseconds whereas normal event based sampling is 1 millisecond so event based sampling can produce finer granularity. But the data produced by Counter Monitor can still be very useful, and the sampling rate is configurable.
In terms of Counter Monitor not being that good, that idea probably relates to the sampling rate as compared to event based sampling. Counter Monitor's sampling interval is generally 100 milliseconds whereas normal event based sampling is 1 millisecond so event based sampling can produce finer granularity. But the data produced by Counter Monitor can still be very useful, and the sampling rate is configurable.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
> Counter Monitor is generally used to measure more
> Operating system type metrics such as memory usage,,,
I often use CM for measuring process' virtual memory consumption. (the process object events are available on XP)
> The added feature that VTune has is the
> ability to select a time slice of the overall
> performance run and drill down to an application's
> source code ...
By drilling down inside the slices with virtual memory rising edge /picks I identify modules and functions that perform intensive memory allocations.
> Operating system type metrics such as memory usage,,,
I often use CM for measuring process' virtual memory consumption. (the process object events are available on XP)
> The added feature that VTune has is the
> ability to select a time slice of the overall
> performance run and drill down to an application's
> source code ...
By drilling down inside the slices with virtual memory rising edge /picks I identify modules and functions that perform intensive memory allocations.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I was under the impression that VTune's method of monitoring OS counters had a lot less overhead than Perfmon. Is that correct? Why?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Actually they are about the same since both use the same APIs to access the PerfMon counters. The advantage of using VTune is that you can correlate the perfmon data with sampling data. This gives you the ability to look at where events are occurring or time is being spent for a certain time interval. VTune also has more display options than perfmon.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
So, you are saying that monitoring performance counters using VTune or Perfmon should yield the same performance benchmark results? I was thinking Perfmon alongwith its overhead will yield lower scores because of continuous disk activity (of course the issue gets exaggerated with higher sample rates).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What do you mean by continuous disk activity? Do you mean as a result of storing the data. I am not sure exactly how perfmon stores its data after it collects it but if you collect a few counters at a time the disk activity from perfmon (or vtune) should be negligible. You are correct on both tools however the higher your sampling rate the more overhead you will incur
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I was referring to the disk overhead for the Perfmon tool to dump the collected counters to a file. I think Perfmon dumps the counter info every one second (highest sample rate) which is why disk stays busy continuosly.
Does VTune does counter logging the same way? If so, then both would show the same overhead.
Does VTune does counter logging the same way? If so, then both would show the same overhead.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, VTune does write the counter monitor samples to disk, but not after every sample is taken. If you want to avoid the disk accesses you can display the data in real-time only, and disable the logging of the data. In the "Configure Counter Monitor" screen, select the Counters tab and at the bottom of the screen, unselect Loggin and select "Display in Runtime(RT)".
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
By drilling down inside the slices with virtual memory rising edge /picks I identify modules and functions that perform intensive memory allocations.
Could you please explain, how do you identify the functions?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
By selecting a time range in the Counter Monitor display, you can basically filter the sampling data so that you look at only the samples collected during that time range (you must collect sampling and counter monitor data in the same activity in orderto use this feature).
Once in the sampling data, you can "drill-down" (successive double-clicks to increase granularity of the data) until you get to the Hotspots view, which shows functions. Drilling down on the function will take you to source annotated with the sampling data.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page