[ntp:questions] Power-saving patch to NTP
David L. Mills
mills at udel.edu
Fri May 16 17:29:23 UTC 2008
Bill,
I have no idea what you are talking about in the timer interrupt issue.
By timer interrupt I mean the kernel facility to create a program
interrupt at specified times, in this case once each second. Even if the
kernel discipline is in use the one-second interrupt is still used to
scan for poll events and several other things, like key expiry,
interface scan, etc.
In modern machines a timer interupt takes about one microsecond and to
scan through the one-second code is really quick. So, we are talking
about an overhead in the order of .00001 percent. A more contentious
issue is that the interrupt could cause a swapped-out ntpd process to be
dragged back in. If this could be the case, the use of NTP is not
justified in the first place and should be replaced by something else.
Dave
Bill Unruh wrote:
> "David L. Mills" <mills at udel.edu> writes:
>
>
>>Jan,
>
>
>>A timer interrupt is required each second to update the clock frequency
>>no matter what. In addition, a sweep is made through the associations to
>
>
> I thought that the ntp daemon runs the per second routine only if the
> kernel discipline is not available.
> And Linux I thought has the kernel discipline.
> Now of course I suspect that the kernel has to wake itself even more often
> than once a second (eg the timer interrupt) and if it did not, the effect
> on the time discipline would be pretty bad.
>
>
>
>>see if a poll is pending. It would be in principle posssible to
>>implement a system of queues to avopid sweeping the associations each
>>second, but that would save very few cycles, add some more cycles and
>>additional complexity. My advice is to avoid the patch; however, be
>>advised if used it might not work in future as the code is further refined.
>
>
>>Dave
>
>
>>Jan Ceuleers wrote:
>>
>>>I came across the following page:
>>>
>>>http://www.lesswatts.org/projects/powertop/known.php
>>>
>>>which says the following on ntpd:
>>>
>>>"By default, the ntp time synchronization daemon will wake up once per
>>>second, and will make the kernel do work on it's behalf even more. Red
>>>Hat has created a patch to ntp to fix this issue and ships it in their
>>>rawhide and FC7 ntp packages. You can download this patch from the
>>>Fedora cvs server."
>>>
>>>Has anyone here looked at that patch? Does it compromise correctness of
>>>the algorithms?
>>>
>>>Thanks, Jan
More information about the questions
mailing list