amazonlinux / amazon-linux-2023

Amazon Linux 2023
https://aws.amazon.com/linux/amazon-linux-2023/
Other
538 stars 40 forks source link

[Package Request] - kernel-rt (PREEMPT_RT enabled kernel) #802

Open cazlo opened 1 month ago

cazlo commented 1 month ago

What package is missing from Amazon Linux 2023? Please describe and include package name.

The PREEMPT_RT enabled RTOS kernel, typically available in the kernel-rt package.

Is this an update to existing package or new package request?

New package request.

Is this package available in Amazon Linux 2? If it is available via external sources such as EPEL, please specify.

Not in AL2, but in EL (enterprise linux) 8 and 9. See also https://pkgs.org/download/kernel-rt.

Any additional information you'd like to include. (use-cases, etc)

PREEMPT_RT is a patchset which provides "soft realtime OS" functionality to the Linux kernel. It was recently merged into mainline, with expectation it will be available in Kernel 6.12. See also https://www.phoronix.com/news/Linux-6.12-Does-Real-Time.

From past discussion with SMEs related to AL2023, it sounded like once this was merged into mainline, y'all would provide some support for this.

I think outside of just providing the kernel-rt package, we would also want a documentation page which described expectations around use, and detailed the grub config necessary to enable the RT kernel. See also https://docs.redhat.com/en/documentation/red_hat_enterprise_linux_for_real_time/8/epub/installing_rhel_8_for_real_time/index#what-is-kdumpinstalling-kdump

A similar competitive product available from Canonical can be found at https://aws.amazon.com/marketplace/pp/prodview-lex3tyk25g3ai

stewartsmith commented 1 month ago

What is the use case you have which isn't satisfied with the current kernel?

Realtime support getting upstream is fantastic, and the result of many years of hard work from many people. Can't argue about that being fantastic.

Of course, either enabling that in a new kernel version in Amazon Linux, or shipping a kernel variant, does require careful consideration as customers can be quite sensitive to performance changes, and if shipping multiple variants, we want to be sure that the effort (including testing effort) is worth it.

It's something that is (very) rarely requested for Amazon Linux, and I am really hoping that one day we do get detailed use cases and reasoning why this is needed in the cloud.

i.e. we really want to know the specific use cases.

cazlo commented 1 month ago

Hello @stewartsmith, thank you for your prompt response.

To clarify, I am not currently advocating for a specific use case with this feature request. However, I can envision several potential applications that would benefit from this capability.

Broadly, these use cases fall into three categories:

Canonical’s marketing materials provide additional context on the business advantages, particularly from their Marketplace AMI:

By integrating the upstream PREEMPT_RT patches, real-time Ubuntu reduces kernel latencies as required by the most demanding workloads and is more preemptive than mainline Linux. Real-time Ubuntu helps ensure time-predictable task execution by minimizing non-preemptible critical sections in kernel code. As the processing of time-sensitive workloads depends on the system's ability to respond within a bounded time interval, real-time Ubuntu aims to provide a deterministic response to stringent low-latency requirements. If you are an automotive developer or engineer looking for a reliable OS with deterministic capabilities, Ubuntu Pro with a real-time kernel is the right choice for you. Our real-time Ubuntu has been designed specifically for cutting-edge projects and is already being used in automotive-related developments and prototypes related to autonomous driving, for example. This product is the exact copy of the Ubuntu operating system you would deploy on real hardware with the same real-time kernel and aims to provide an exact mirror of your complete stack on the cloud.

While Canonical highlights automotive engineering, the use cases I outlined are equally relevant to other physical engineering domains, such as:

Additionally, with AL2023 AMIs now available on EKS and ECS, it would be highly beneficial to support real-time containers for development and testing. Elastic clusters of compute available for real-time tests could be used to optimize "dev test wait time" operational overhead via horizontal test scaleout, replacing human engineer cost with relatively less expensive EC2 cost.

There are numerous open-source examples of running PREEMPT_RT-enabled code in OCI containers, assuming the host is configured correctly. For instance:

Given the focus on embedded real-time systems, I would prioritize ARM over x86, as ARM is increasingly common in this domain. This is reflected in Ubuntu AMIs being available primarily for Graviton EC2 instances.

Optionally providing real-time capabilities is a significant step toward making a certified version of Amazon Linux available for safety-critical and other real-time use cases.

bjoernd commented 1 month ago

Thanks for sharing your potential use cases. We are aware of this feature request. At this point we cannot tell if and when PREEMPT_RT would be something that is available for Amazon Linux.

blurayne commented 3 days ago

You should keep in mind that people do have uses cases: live streaming as such one (games, broadcasting etc.). But then again, you should run such workload on reserved capacitiy. I'm not sure industrial applications with RT make sense to be hosted in cloud.

But default linux kernel still is optimized for high thruput so it's optimal for 99% of all servers.

For Desktop Users it's a complete opposite use case. I wonder how much you would profit from a a RT kernel on a remote desktop.

Anyway, I'd like to see the availability of newer kernels once we can profit from it (filesystem optimisations, better compute etc.).