Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make TSC the default system clock source #249

Closed
cwhatley opened this issue Apr 19, 2019 · 11 comments · Fixed by #1328
Closed

Make TSC the default system clock source #249

cwhatley opened this issue Apr 19, 2019 · 11 comments · Fixed by #1328
Labels
enhancement New feature or request

Comments

@cwhatley
Copy link

What would you like to be added:

Make the default system clock source "tsc" instead of "xen".

Why is this needed:

Docker containers that do frequent system time lookups can be badly affected by the overhead around the xen system clock source.

AWS's own tuning recommendations suggest this switch.

Is there any reason not to switch to tsc as the default for the EKS images?

@mogren mogren added enhancement New feature or request good first issue Good for newcomers labels Apr 25, 2019
@JasonSwindle
Copy link

I have a soon pending PR for this. I need to test it first.

JasonSwindle@9d57d76

JasonSwindle pushed a commit to JasonSwindle/amazon-eks-ami that referenced this issue May 21, 2019
micahhausler pushed a commit that referenced this issue May 30, 2019
* #249 Making tsc the clock source

* Applying changes from review.
@JasonSwindle
Copy link

This issue can be closed.

@micahhausler
Copy link
Member

Closed in #272

@cwhatley
Copy link
Author

cwhatley commented May 8, 2020

This doesn't appear to be working anymore. See comments in #321

@redbelow
Copy link

redbelow commented Aug 6, 2020

seeing the same behavior in v1.15.11-eks-065dce

@cartermckinnon
Copy link
Member

Has anyone continued to experience this issue on currently-supported AMI's?

@cartermckinnon cartermckinnon removed the good first issue Good for newcomers label Dec 27, 2021
@bryantbiggs
Copy link
Contributor

I don't know if its related, but I usually do not have to open NTP/123 on my NACLs/security groups but with the EKS AMI I am seeing a lot of REJECTs in flow logs

Per this https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/set-time.html

The Amazon Time Sync Service is available through NTP at the 169.254.169.123 IPv4 address or the fd00:ec2::123 IPv6 address for any instance running in a VPC. The IPv6 address is only accessible on Instances built on the Nitro System. Your instance does not require access to the internet, and you do not have to configure your security group rules or your network ACL rules to allow access. The latest versions of Amazon Linux 2 and Amazon Linux AMIs synchronize with the Amazon Time Sync Service by default.

Is there any way to use this service at 169.254.169.123 instead of having to open up NTP/123 to a public route?

@cartermckinnon
Copy link
Member

cartermckinnon commented Jun 15, 2023

Looking into this. I think we should remove our chrony config, because the base AL2 AMI is already doing what's necessary for TSS.

As for #272 -- that PR was a no-op. It's setting the current clocksource during the AMI build process, and the default is reset upon reboot. I think we're fine to set clocksource=tsc on the kernel command line, but I need to verify this doesn't cause issues if/when that clocksource isn't available. I'm also not sure if tsc is considered stable on newer Intels versus kvm-clock (the recommended clocksource on Nitro-based instance types).

@cartermckinnon
Copy link
Member

cartermckinnon commented Jun 15, 2023

@ybstaked are you using Xen or Nitro-based instance types? FWICT, tsc is what's being used on Nitro-based instance types with our AMI, and the recommendation is to use kvm-clock; whether this could be responsible for the drift is an open question.

@cartermckinnon
Copy link
Member

cartermckinnon commented Jun 16, 2023

Interesting; those are Nitro instance types. If you want to give kvm-clock a try, it'd be a good data point.

I'll go ahead and update #1328 to use kvm-clock on Nitro, it's the recommendation from EC2 anyway 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants