> On Feb 9, 2012, at 5:01 PM, Craig Small wrote: > > The problem is that top sees 500 user ticks out of 2000 user ticks > > in > > the first instance and 500 user ticks out of 1000 user ticks in the > > second. > > > > Is that the problem here? > > > > It sounds like Jaromir needs the kernel to have a "CPU bludging > > because > > its running slower" tick. > > > > If so, is there something in the kernel to see this? > > Craig, > > I'm pretty sure those weren't top results, but some other tool. > > I believe the tics top sees will always remain the same, regardless > of the cpu's frequency. > > Jim > > > Guys, let me share my results ... My testing application is triggered each second to produce a fixed amount of work units per CPU core (thus the load produced by the app doesn't depend on the CPU frequency) ... The following table shows counter differences between two subsequent samples (interval 1.0s) Results (all 4 cores - first /proc/stat line): f[GHz] user[] idle[] total[] 1.73 218 180 398 2.66 142 257 399 Results (first core - second /proc/stat line): f[GHz] user[] idle[] total[] 1.73 55 43 98 2.66 37 63 100 The rest counters are almost zero and intentionally omitted ... As You see, that's exactly what /proc/stat docs say ... the units represent hundredth of seconds "consumed" by the processes (or by the idle state). So ... the distortion is caused by the kernel and we get already distorted values. And as they represent time units instead of work units, it's impossible to recalculate them in any way to suppress the distortion. I had a discussion about that here in the office and I'm going to contact guys from the kernel team and ask them for help. Kernel was recently equipped with performance measuring counters and it's pretty possible, that it already supports what we need, but it probably isn't exported in the /proc yet. Regards, Jaromir.