High-resolution user/system times?

High-resolution user/system times?

guy keren guy.choo.keren at gmail.com
Thu Jul 26 01:26:21 IDT 2012


did you consider using oprofile?

On 07/25/2012 03:44 PM, Nadav Har'El wrote:
> On Wed, Jul 25, 2012, Oleg Goldshmidt wrote about "Re: High-resolution user/system times?":
>> Actually, there is the default HZ and inside the kernel HZ there is HZ that
>> you can configure at compile time (with CONFIG_HZ) and USER_HZ, which, I
>> think, is still 100 whether or not the kernel's HZ is customized. I think
>> USER_HZ is what is important for "soft timers" you are interested in.
>
> USER_HZ is just used to fake the reports to user-space, pretending the
> resolution is of USER_HZ. The actual measured resolution is of
> CONFIG_HZ.
>
>> I am used to RedHat systems whose kernels normally come with HZ=100. You
>> are talking about a server as well, right? You may be right about HZ=250 by
>> default in the vanilla kernel that is supposed to be a compromise between
>> 100 and 1000.
>
> Like both you and I already said, the CONFIG_HZ setting is completely
> arbitrary, but it's compiled into the kernel and cannot be changed in
> the kernel. I just checked and in Ubuntu 12.04 the distro set it to 250 Hz,
> as I remembered. But on Fedora 17, it is set to 1000 Hz.
>
> But I noticed another thing which complicates things further - both
> distros seem to enable CONFIG_NO_HZ=y, which means we shoudln't actually
> have timer interrupts at regular intervals - not 250 Hz and not 1000 Hz.
> In that case, I'm not even sure how times() works, and what resolution
> it really has, in this case, and if the number "250" and "1000" have any
> effect on this resolution...
>




More information about the Linux-il mailing list