AWS Question - PTP Hardware clock support

Hello all

When using an AWS EC2 instance is it possible to set up the time using PTP Hardware clock instead of NTP klib?

Thanks and regards,
Ernesto Medina.

We would need to add a driver for this.

That would be super, I’ll appreciate that, I think that if the hypervisor offers it, it’s an advantage over network services.

AWS: add support for PTP hardware clock by francescolavra · Pull Request #1979 · nanovms/nanos · GitHub adds to the kernel support for the PTP hardware clock.
According to Set the time for your Linux instance - Amazon Elastic Compute Cloud, as of now the PTP hardware clock is only available on instances from the R7g instance family in the Asia Pacific (Tokio) region. Example Ops configuration to enable synchronization of system time with the PTP hardware clock:

{
  "Klibs": ["ntp"]
  },
  "CloudConfig" : {
    "ProjectID": "my-project",
    "Zone": "ap-northeast-1a",
    "BucketName": "my-bucket",
    "Flavor": "r7g.medium"
  },
  "ManifestPassthrough": {
    "chrony": {"refclock": "ptp"}
  }
}

Please note that the current Ops release does not recognize r7g instances as ARM-based instances, so if you use the above configuration when creating you image, it will likely build an x86-based image. AWS: add support for Graviton3 (ARM) instances by francescolavra · Pull Request #1558 · nanovms/ops · GitHub fixes Ops so that Arm builds are used when creating images for Graviton3-based instances: so, you can either build Ops from source, or specify a different ARM-based instance type (e.g. t4g.nano) when creating the image, and then specify the correct r7g instance type when creating the instance.

1 Like