[ntp:questions] ntp daemon wakeup/sleep patch by RedHat
David L. Mills
mills at udel.edu
Thu Jun 14 21:19:25 UTC 2007
There are two reasons why this is a terrible idea. In your example you
assume that only one sleep per server, rather than one sleep per second.
The first problem is that the frequency is disciplined once each second.
While in principle it would be possible to recompute the frequency at
longer intervals, the code would become extremely complex and fragile.
The maximum interval between frequency updates depends on the time
constant, which changes with poll interval.
The second problem is that several other things are going on at the
seconds sleep. These include interface scan, statistics recording,
leapseconds counter, garbage collect expired keys, manage the
huff-n'-puff filter and write the frequency file.
In priniciple a conventional multiple-timer facility could be written
and this might make everybody happy. In fact, once upon a time such a
facility was used, but it became overwhelmingly complex and fragile, so
was replace by the current crudity.
So, if Linux has a patch, the patchers need to address the issues in
Hal Murray wrote:
>>It should be widely understood that patching out the 1-s will completely
>>disable any verions of NTP. That done, no polls will be sent, the
>>frequency will not be disciplined, and on and on.
> I haven't looked at the patch, but I assume it is peeking ahead
> to find out when the next poll will happen and does one long
> sleep rather than N sleeps for 1 second.
> If the poll interval is 256 seconds and you have 4 servers configured,
> that's 4 wakesup vs 256. I guess it would be 8 if the responses are slow
More information about the questions