Hello All, I have been playing a lot with Per-Thread monitoring of perfmon for characterization of database server workloads. The results that I have gotten in per-thread mode are quite accurate.
However, I did the same analysis in a system-wide measurement mode and I am getting values which seem wrong to me. I would like any of your inputs on this. The following is the detailed listing for system-wide mode. [EMAIL PROTECTED] pfmon --aggregate-results --system-wide -uk --verbose -e CPU_CLK_UNHALTED,DISPATCH_STALLS -- <command to start the sql client> selected CPUs (2 CPU in set, 2 CPUs online): CPU0 CPU1 <startup information> using hardware breakpoints unavailable_pmcs=0xfffffffffffffff0 [PERFSEL0(pmc0)=0x530076 emask=0x76 umask=0x0 os=1 usr=1 inv=0 en=1 int=1 edge=0 cnt_mask=0] CPU_CLK_UNHALTED [PERFCTR0(pmd0)] [PERFSEL1(pmc1)=0x5300d1 emask=0xd1 umask=0x0 os=1 usr=1 inv=0 en=1 int=1 edge=0 cnt_mask=0] DISPATCH_STALLS [PERFCTR1(pmd1)] <other unrelated info> system wide session on 2 processor(s) vCPU0 -> pCPU0 vCPU1 -> pCPU1 results are on terminal starting process [3230]: <command to start the mysql client> waiting for [3230] to exec results are on terminal CPU1 started monitoring CPU0 started monitoring <output here> CPU0 stopped monitoring set0 runs=1 duration=181498010 CPU1 stopped monitoring set0 runs=1 duration=181500829 results are on terminal CPU0 341291164 CPU_CLK_UNHALTED CPU0 507284317 DISPATCH_STALLS As can be seen from the above verbose listing. [PERFSEL0(pmc0)=0x530076 emask=0x76 umask=0x0 os=1 usr=1 inv=0 en=1 int=1 edge=0 cnt_mask=0] CPU_CLK_UNHALTED [PERFCTR0(pmd0)] [PERFSEL1(pmc1)=0x5300d1 emask=0xd1 umask=0x0 os=1 usr=1 inv=0 en=1 I am counting the events for both OS and user level. However, if you see the aggregated output, the total number of cycles is less than the dispatch stalls. How can a processor be stalled more than the time it is executing. I checked in detail trying to capture user and kernel level events individually. For user level events DISPATCH_STALLS are always less than the CPU_CLK_UNHALTED. But this is not the case for kernel level events. I am wondering what I am doing wrong or is it a bug in perfmon. Also note that DISPATCH_STALLS are very accurate when counting in per-thread mode. In fact when I captured events which can contribute to DISPATCH_STALLS in per thread mode, I got an error percentage of less than 2-3 % (which was quite good). But this is not the case for system-wide mode (where error percentage is as much as 40%). Following are my machine specs (pfmon -I) detected host CPUs: 2-way 1000MHz/0.5MB -- AMD Athlon(tm) 64 X2 Dual Core Processor 4200+ (stepping 2) detected PMU model: AMD64 max counters/set: 4 supported PMU models: [AMD64] [Pentium 4] [Intel Core] [Intel architectural PMU] supported sampling modules: [inst-hist] [detailed] [compact] [raw] pfmlib version: 3.2 kernel perfmon version: 2.7 Thanks and Regards, Pranav ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace _______________________________________________ perfmon2-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/perfmon2-devel
