[ntp:hackers] Dynamic minsane at start up?
brian.utterback at oracle.com
Sun Aug 11 16:01:06 UTC 2013
I have been thinking about some issues that have always bugged me one
way or another about the reference implementation and how to go about
fixing them. One of these is the fact that when NTP first starts up, the
server that is chosen to provide the very first offset is essentially
chosen without regard to how good its time might be, and may even be a
The problem is that for the first few polls, all of the servers are
marked as insane and don't even make it to the clock select phase.
Eventually, one of the servers is the first one that becomes sane and so
it is the only one that gets to the selection, and of course it gets
You can get around this problem by using the minsane option. Just set
minsane to something a bit bigger than 1, and then at least you will
need a consensus before a clock is chosen which at least means you will
avoid the falseticker in the bunch.
The thing is though, ideally NTP should handle this itself. The correct
value for minsane in this situation depends on the number of reachable
servers. If you only have one server then you should accept it no matter
what. But if you have 10, what should minsane be? 5? 7? Depends on your
It seems to me that we ought to be able to handle this better than we do
know. Maybe we should suppress the clocks going to the selection phase
after the first clock becomes sane until the last one in the series has
sent a packet after that.
What do you think?
More information about the hackers