[ntp:questions] Tighter regulation?

E-Mail Sent to this address will be added to the BlackLists Null at BlackList.Anitech-Systems.invalid
Mon Jun 3 21:44:33 UTC 2013


Mischanko, Edward T wrote:> I would modify the current algorithm with an exception
>  that if offsets exceed 1 millisecond for more than one
>  polling cycle, then, polling will be reduced by one
>  interval, else, continue normal operation.

Look at ntp_loopfilter.c {around line 650?}

 * Here we adjust the time constant by comparing the current
 * offset with the clock jitter. If the offset is less than the
 * clock jitter times a constant, then the averaging interval is
 * increased, otherwise it is decreased. A bit of hysteresis
 * helps calm the dance.

 if (freq_cnt > 0) {
     tc_counter = 0;
 } else if (fabs(clock_offset) < CLOCK_PGATE * clock_jitter) {
     tc_counter += sys_poll;
     if (tc_counter > CLOCK_LIMIT) {
         tc_counter = CLOCK_LIMIT;
         if (sys_poll < peer->maxpoll) {
             tc_counter = 0;
             sys_poll++;
         }
     }
 } else {
     tc_counter -= sys_poll << 1;
     if (tc_counter < -CLOCK_LIMIT) {
         tc_counter = -CLOCK_LIMIT;
         if (sys_poll > peer->minpoll) {
             tc_counter = 0;
             sys_poll--;
         }
     }
 }


-- 
E-Mail Sent to this address <BlackList at Anitech-Systems.com>
  will be added to the BlackLists.



More information about the questions mailing list