Go to main content

Enhancing System Performance Using Clock Synchronization and Web Caching in Oracle Solaris 11.3

Exit Print View

Updated: October 2017
 
 

Overview of Clock Synchronization

Clock synchronization software synchronizes time across multiple systems in a network. Oracle Solaris uses the Network Time Protocol (NTP) and the Precision Time Protocol (PTP) to synchronize the system clock. You can also use the rdate command while using the cron utility to synchronize system clocks.

You must not run NTP and PTP on the same system simultaneously. Also, you must configure only a single instance of the NTP or PTP service on a system.


Note -  Do not use the rdate, ntpdate, or date command to set the date and time while NTP is running. However, you can run the ntpdate command with the –q and –d options as it does not set the time.

Network Time Protocol Overview

NTP is an open source software from the University of Delaware that is included in the Oracle Solaris software. The ntpd daemon sets and maintains the system time of day. The ntpd daemon is a complete implementation of the version 4 standard as defined by Network Time Protocol Version 4: Protocol and Algorithms Specification, RFC 5905. You can use the svc:/network/ntp:default service to start the ntpd daemon.

The ntpd daemon reads the /etc/inet/ntp.conf file at system startup. See the ntp.conf (4) man page for information about configuration options. Sample ntp.conf files are available at /etc/inet/ntp.server and /etc/inet/ntp.client on a system.

    Note the following when using NTP in your network:

  • The ntpd daemon uses minimal system resources.

  • An NTP client synchronizes automatically with an NTP server when it boots. If the NTP client becomes unsynchronized, the client resynchronizes again when the client contacts a time server.

  • If you use the NTP service on a virtualized SPARC system, you must run the NTP service in the global zone, logical domain, control domain, and kernel zone.

  • You cannot run the NTP service on both global zone and non-global zone at the same time.

  • By default, you cannot run the NTP service on a non-global zone because a non-global zone does not have sufficient privileges. However, if the NTP service is not running on the global zone, you can configure a non-global zone with the privileges required to run the NTP service.

  • Avoid configuring exactly two NTP servers as this might lead to clock hopping.

  • You must use only one NTP server to set the system time and keep it correct. However, for setting system time accurately, you can use a minimum of four NTP servers.

  • Use local reference clock only when necessary.

Additional documentation for the NTP service is available at /usr/share/doc/ntp/index.html on a system running the Oracle Solaris 11 release.

For information about procedures for administering NTP, see Managing the Network Time Protocol. For instructions about installing NTP while configuring OpenStack on Oracle Solaris, see How to Install and Configure Network Time Protocol in Installing and Configuring OpenStack (Havana) in Oracle Solaris.

Required Files for NTP

The NTP service requires the files listed in the following table.

Table 1  Required NTP Files
File Name
Function
/etc/inet/ntp.client
Sample configuration file for NTP clients and servers.
/etc/inet/ntp.conf
Lists configuration options for NTP.
/etc/inet/ntp.keys
Contains the NTP authentication keys.

Note -  This is an optional file and is not delivered by the NTP package.

/etc/inet/ntp.leap
Leap seconds configuration file. This is an optional file and is not delivered by the NTP package.

Note -  This is an optional file and is not delivered by the NTP package.

/etc/inet/ntp.server
Contains additional configuration instructions for some NTP servers.
/usr/lib/inet/ntpd
NTP daemon. For more information, see the ntpd(1m) man page.
/usr/sbin/ntpdate
Utility to set the local date and time, based on NTP. For more information, see the ntpdate(1m) man page.
/usr/sbin/ntpdc
NTP query program for the ntpd daemon. For more information, see the ntpdc(1m)man page.
/usr/sbin/ntpq
NTP query program. For more information, see the ntpq(1m) man page.
/usr/sbin/ntptime
Program to display or set the kernel time variables. For more information, see the ntptime(1m) man page.
/usr/sbin/ntptrace
Program to trace NTP hosts back to the master NTP server. For more information, see the ntptrace(1m) man page.
/usr/sbin/ntp-keygen
Program used to generate public and private keys for NTP. For more information, see the ntp-keygen(1m) man page.
/var/ntp/ntpstats
Directory for holding NTP statistics.
/var/ntp/ntp.drift
Sets the initial frequency offset on NTP servers.

Precision Time Protocol Overview

The PTP software synchronizes system time across multiple systems in a broadcast domain, such as a local area network (LAN). Oracle Solaris PTP software is implemented as the ptpd daemon, which is based on the public domain software available at GitHub. It implements PTP Version 2 as defined in the IEEE standard 1588-2008.

The ptpd daemon can use the hardware assistance capability provided by any compatible Network Interface Card (NIC) and its driver to timestamp the PTP packets.

You can use the svc:/network/ptp:default service to start the ptpd daemon. You can configure a system as a PTP slave or a PTP master.

  • PTP slave – Runs the ptpd daemon in slave mode. A PTP slave synchronizes the system clock to a master clock present in the subnet.

  • PTP master – Runs the ptpd daemon in master mode. Other systems in the slave mode can synchronize their clock to the PTP master.

The state of the ptpd daemon can be slave, master, or initializing.

By default, the service management facility starts the PTP service as a slave and binds the PTP service to the first interface that is up and running. For more information about the Service Management Facility, see the smf(5) man page.

The ptpd daemon uses the /var/log/ptp.log file to record the following information:

  • Timestamp of the PTP log entry

  • State of the ptpd daemon

  • Clock ID

For task information, refer to Managing the Precision Time Protocol.