How to set a frequent period for NTP client to sync with the NTP server

81,745

Solution 1

You have the list of registry values here.

Referring to this, try setting the following values :

SpecialPollInterval :
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\NtpClient

Explanation :

Version : Windows XP, Windows Vista, Windows Server 2003, and Windows Server 2008
This entry specifies the special poll interval in seconds for manual peers. When the SpecialInterval 0x1 flag is enabled (see next key : NtpServer) , W32Time uses this poll interval instead of a poll interval determine by the operating system. The default value on domain members is 3,600 (1 hour). The default value on stand-alone clients and servers is 604,800 (7 days).


NtpServer
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Parameters

Explanation :

Version : Windows Server 2003 and Windows Server 2008
This entry specifies a space-delimited list of peers from which a computer obtains time stamps, consisting of one or more DNS names or IP addresses per line. Each DNS name or IP address listed must be unique. Computers connected to a domain must synchronize with a more reliable time source, such as the official U.S. time clock.
0x01 SpecialInterval
There is no default value for this registry entry on domain members. The default value on stand-alone clients and servers is time.windows.com,0x1.


UpdateInterval :
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Config

Explanation :

Version : Windows XP, Windows Vista, Windows Server 2003, and Windows Server 2008
This entry specifies the number of clock ticks between phase correction adjustments. The default value for domain controllers is 100. The default value for domain members is 30,000. The default value for stand-alone clients and servers is 360,000.


MinPollInterval :
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Config

Explanation :

Version : Windows XP, Windows Vista, Windows Server 2003, and Windows Server 2008
This entry specifies the smallest interval, in log2 seconds, allowed for the system polling interval. Note that while a system does not request samples more frequently than this, a provider can produce samples at times other than the scheduled interval. The default value for domain controllers is 6. The default value for domain members is 10. The default value for stand-alone clients and servers is 10.

Solution 2

I don't know a lot about Windows time, but last time I checked, Windows doesn't use the "full" NTP algorithm. I believe it uses the less complicated Simple Network Time Protocol (SNTP).

A properly running (full) NTP client will decide on its own how often to poll the servers you've configured. Initially it will probably check every 64 seconds, but once the clock has been stabilized, the polling may be every 1024s (there's a doubling in the algorithm at every step).

If the algorithm detects something wonky with the clock it will automatically start polling more often as needed.

The W32Time can only reach 1-2 second accuracy (good enough for most pedestrian uses), whereas the full NTP algorithm can get into the millisecond area on a WAN, and even more accurate on LANs.

If you absolutely, positively need accurate time, use the full NTP.org implementation and use at least four servers.

Solution 3

My golden rule with time in a Windows/AD environment is to not mess with the way things are supposed to work. Because so much is dependent on the time service you can very easily get your fingers burned.

Having said that, if you really want to change things, you should have a look at this KB article for further guidance.

Share:
81,745

Related videos on Youtube

stead1984
Author by

stead1984

I've been a member of serverfault since 2008(ish) when I started as a Network Manager role for a small pharmaceutical company. After 3+ years as a network manager, I accepted a role of Deskside Support for a large rail infrastructure business. While the role was perhaps a backwards step technically, it would provide me with the exposure to large networks and a more promising career path. As of last year my company has been acquired by Siemens, which resulted in a nearly 2 year IT integration project. I'm currently employed as an Infrastructure Support Engineer for Siemens. This role involves support of Sun Solaris 10, I have a little knowledge of Unix/Linux gained from training courses. Serverfault has always been an incredibly useful tool for me during the years and if those answers that are not applicable are always enlightening and will continue to prove it's value to me as this role develops.

Updated on September 17, 2022

Comments

  • stead1984
    stead1984 over 1 year

    I've setup an NTP client for my DC to sync time with time.windows.com but I want it to query the NTP server at least twice a day. I made all the changes via the registry, is there a period registry I can amend and how?

    • Twirrim
      Twirrim over 14 years
      If your systems are slipping out of time that fast, I would be thinking you've got more significant problems to worry about.
    • stead1984
      stead1984 over 14 years
      It's slipping over weeks but I would feel better it to query its source twice or at least daily
  • Mark Thomas
    Mark Thomas over 11 years
    You may well need to restart the Windows Time service for the changes to the intervals to take affect. I certainly had to on an XP client.