Skip to content

Commit dbdd8a5

Browse files
committed
Add discussion of PTP and paravirt, sketch decision section
Signed-off-by: Konrad Gube <konrad.gube@cloudandheat.com>
1 parent 37e3ba0 commit dbdd8a5

1 file changed

Lines changed: 32 additions & 14 deletions

File tree

Standards/scs-XXXX-v1-ntp-decisions.md

Lines changed: 32 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -72,27 +72,45 @@ Some IaaS providers, such as AWS and GCP, will provide their own NTP servers to
7272

7373
### PTP
7474

75-
(TBD)
75+
The Precision Time Protocol (PTP) is, like NTP, a network-based time synchronization protocol, that supports both UDP and ethernet transports.
76+
PTP is designed to offer higher precision than NTP, particularly in local area networks, e.g. by measuring the timing of synchronization messages directly at the network interface, if supported.
77+
Master clocks will also continually broadcast synchronization messages to their network, making them discoverable for clients, but also generating more traffic than NTP.
7678

77-
### Paravirtualization
78-
79-
(TBD)
79+
Linux has a kernel-based driver for PTP, which will provide the synchronized time through a device file, which can then be used by services such as _phc2sys_ or _chrony_ to update the system time.
8080

81-
## Decision
81+
It is unclear if PTP would have offer any better precision than NTP in tunneled networks with virtual interfaces, and it does not seem to get any use in IaaS at all.
8282

83-
(TODO: discuss different approaches for provider images and user images)
83+
### Paravirtualization
8484

85-
Independently of the choosen method of clock synchronization, CSPs should make sure that they are available to VMs with as little user interaction as possible.
86-
This is of course somewhat dependent on the guest operating system, and CSPs should validate that the provided methods of clock synchronization cloud are compatible with the provided cloud images.
85+
Unlike PTP as a protocol, it's driver interface in Linux seems to be a popular choice for time synchronization in the form of paravirtualization.
86+
The _ptp\_kvm_ kernel module will communicate directly with the KVM hypervisor to provide a PTP device file that follows the system time of the host.
87+
Hyper-V also offers time synchronization through a PTP device file managed by its _Linux Integration Services_.
8788

88-
The great benefit of Hypervisor-based clock synchronisation is that it works independent of network connectivity.
89-
If this feature is well supported by the used hypervisor, it should be enabled by the CSP, though CSPs must take care that the time source of the hypervisor is itself synchronized to a precise time source.
89+
Paravirtualized time synchronization has the benefit of generally offering the highest precision.
90+
Like RTC clock emulation, it also works independently of the guest system's network connectivity.
91+
The main drawback is the dependency on a specific hypervisor, even more so than emulated RTC hardware, because it actually requires hypervisor-specific code to run in the guest system.
9092

91-
CSPs should also provide a local static NTP server that is reachable via a default external network, and should be provided to VMs as vendordata via metadata service or config drive.
92-
The NTP server can optionally also be provided via DHCP, but not all standard cloud images enable NTP configuration via DHCP.
93+
## Decision
9394

94-
Injecting NTP servers into subnets is not something that is currently supported by OpenStack, but should be possible to implement in a similar fashion to subnet-DHCP, or the metadata service.
95-
If this feature becomes available at a later date, CSPs should prefer it to a static local NTP server, as it also supports isolated subnets.
95+
From looking at the available options, it becomes apparent that there is no single optimal solution for time synchronization.
96+
The most precise option is the least portable, but the most widely supported option also requires the most provider-specific configuration.
97+
98+
<!--
99+
* used method of time sync depends on the available options, but also on the image
100+
* which option best to target when building a cloud image depends on who is building the image
101+
* CSPs can target whichever mechanism their cloud supports best
102+
* users may want images that are as portable as possible, so they can reuse them across SCS clouds
103+
* since interoperability between clouds is the primary motivation for SCS, standardization should focus on portability
104+
* the most portable option is NTP, so we should standardize an NTP setup!
105+
* CSPs should still be free to support additionally support more precise methods, like ptp_kvm, and pre-configure them in the images they offer
106+
* challenges for NTP:
107+
* local NTP server must be reachable by guests
108+
* advertising NTP servers to customers and instances
109+
* should we work on upstream support for providing NTP through the metadata IP
110+
* should we work on OVN DHCPv6 support for NTP?
111+
* should we standardize a vendor data key for NTP?
112+
* should local NTP server IPs be part of a CSP self description?
113+
-->
96114

97115
## Consequences
98116

0 commit comments

Comments
 (0)