All Products
Search
Document Center

Alibaba Cloud Linux:Overview of kernel features and interfaces

Last Updated:Mar 22, 2024

This topic describes the kernel features and interfaces supported by Alibaba Cloud Linux. This topic is intended for users who are familiar with the Linux kernel and want to use the features of the Linux kernel.

Memory

Reference

Supported version

Description

Memcg Exstat feature

  • Alibaba Cloud Linux 2 kernel version 4.19.91-18.al7 and later

  • All Alibaba Cloud Linux 3 kernel versions

Alibaba Cloud Linux supports the Memcg Exstat feature. Compared with community versions of the Linux kernel, Alibaba Cloud Linux kernel supports the following cgroup v1 interfaces for the Memcg Exstat feature: memory.events, memory.events.local, and memory.stat. Alibaba Cloud Linux kernel also provides statistics on the latency caused by changes in the memcg global minimum watermark and backend asynchronous reclamation.

Memcg global minimum watermark rating

  • Alibaba Cloud Linux 2 kernel version 4.19.91-18.al7 and later

  • All Alibaba Cloud Linux 3 kernel versions

Alibaba Cloud Linux provides the memcg global minimum watermark rating feature. The global minimum watermark of resource-intensive tasks is increased to trigger direct memory reclamation. The global minimum watermark of latency-sensitive tasks is decreased to prevent direct memory reclamation. When a resource-intensive task requests a large amount of memory, the global minimum watermark is increased to throttle the resources used for the task for a short period of time to prevent direct memory reclamation for latency-sensitive tasks. After a specific amount of memory is reclaimed by using global kswapd backend reclamation, the resource-intensive task is no longer throttled.

Memcg QoS feature of the cgroup v1 interface

  • Alibaba Cloud Linux 2 kernel version 4.19.91-18.al7 and later

  • All Alibaba Cloud Linux 3 kernel versions

The memcg quality of service (QoS) feature can be used to control locks and limits on memory usage in a memcg. In community versions of the Linux kernel, the memcg QoS feature is supported only by the cgroup v2 interface. In Alibaba Cloud Linux kernel, the memcg QoS feature is also supported by the cgroup v1 interface.

Memcg backend asynchronous reclaim

  • Alibaba Cloud Linux 2 kernel version 4.19.81-17.al7 and later

  • All Alibaba Cloud Linux 3 kernel versions

Alibaba Cloud Linux provides the backend asynchronous reclaim feature for memcgs. The backend asynchronous reclaim feature differs from the global kswapd kernel thread . The feature uses the workqueue mechanism instead of a corresponding memcg kswapd kernel thread.

Memcg OOM priority policy

  • Alibaba Cloud Linux 2 kernel version 4.19.91-18.al7 and later

  • Alibaba Cloud Linux 3 kernel version 5.10.60-9.al8 and later

Alibaba Cloud Linux provides the memcg out of memory (OOM) priority policy feature. When the memcg OOM priority policy feature attempts to perform an OOM operation, the feature determines the priorities of cgroups and selects a low-priority cgroup to perform the operation.

THP reclaim

  • Alibaba Cloud Linux 2 kernel version 4.19.91-24.al7 and later

  • All Alibaba Cloud Linux 3 kernel versions

Alibaba Cloud Linux provides the Transparent Huge Pages (THP) reclaim feature. You can use the THP reclaim feature to fix memory usage issues caused by THP, such as OOM errors.

Huge Pages

  • Alibaba Cloud Linux 2 kernel version 4.19.91-25 and later

  • Alibaba Cloud Linux 3 kernel version 5.10.112-11 and later

Alibaba Cloud Linux supports the Huge Pages feature. The Huge Pages feature is suitable for business scenarios that involve large code segments. You can use the feature to put the executable parts of applications and dynamic-link libraries (DLLs) into huge pages to reduce instruction translation lookaside buffer (iTLB) misses and increase the 2 MB iTLB utilization of CPUs. This helps improve the performance of applications.

Use KFENCE to detect kernel memory pollution

Alibaba Cloud Linux 3 kernel version 5.10.84-10 and later for the x86 architecture, and Alibaba Cloud Linux 3 kernel version 5.10.134-16 and later for the Arm architecture

Alibaba Cloud Linux 3 supports the Kernel Electric-Fence (KFENCE) feature. Alibaba Cloud Linux 3 allows you to enable or disable KFENCE in a flexible and dynamic manner and fully capture memory pollution issues. This way, Alibaba Cloud Linux 3 balances between online detection and offline debugging of memory pollution issues.

Page Cache Limit feature

Alibaba Cloud Linux 3 kernel version 5.10.134-14 and later

Alibaba Cloud Linux 3 provides the Page Cache Limit feature. The Page Cache Limit feature helps resolve system instability issues that are caused by unlimited page cache usage, such as business jitters and unexpected OOM errors.

Network

Reference

Supported version

Description

Use SMC

Alibaba Cloud Linux 3 kernel version 5.10.60-9.al8.x86_64 and later

Alibaba Cloud Linux 3 is optimized to support Shared Memory Communications over RDMA (SMC-R). SMC-R is based on Alibaba Cloud elastic remote direct memory access (eRDMA) and can transparently replace TCP in applications without loss of functionality. SMC-R enables direct, high-speed, low-latency, and memory-to-memory communications and provides higher performance than TCP in various scenarios, such as in-memory databases, remote procedure calls (RPCs), and transmission of large files.

TCP-RT configurations

  • Alibaba Cloud Linux 2 kernel version 4.19.91-21.al7 and later

  • All Alibaba Cloud Linux 3 kernel versions

Alibaba Cloud Linux supports TCP-layer service monitoring (TCP-RT). TCP-RT is a TRACE method. TCP-RT allows you to configure event tracking in a kernel-based TCP stack to identify a request and response when a single connection carries only one concurrent request and response. Then, you can obtain information such as the amount of time taken to receive the request in the TCP stack and the amount of time taken to process the request. TCP-RT also supports statistical analysis in the kernel system and generates statistics about specific connections on a regular basis.

Change the TCP TIME-WAIT timeout period

  • Alibaba Cloud Linux 2 kernel version 4.19.43-13.al7 and later

  • All Alibaba Cloud Linux 3 kernel versions

In Linux kernels, TCP/IP connections remain in the TIME-WAIT state for 60 seconds. The length of this period cannot be changed. However, in specific scenarios, such as scenarios that have heavy TCP loads, you can shorten this period to improve network performance. To ensure network performance in such scenarios, Alibaba Cloud Linux 2 provides a kernel interface to change the period of time for which TCP/IP connections remain in the TIME-WAIT state before the system closes the connections.

Storage

Reference

Supported version

Description

Enable the cgroup writeback feature

  • Alibaba Cloud Linux 2 kernel version 4.19.36-12.al7 and later

  • All Alibaba Cloud Linux 3 kernel versions

Alibaba Cloud Linux provides the cgroup writeback feature for the cgroup v1 interface. The cgroup writeback feature allows you to limit the buffered I/O rate when you use the cgroup v1 interface.

Use the weight-based throttling feature blk-iocost

  • Alibaba Cloud Linux 2 kernel version 4.19.81-17.al7 and later

  • All Alibaba Cloud Linux 3 kernel versions

Alibaba Cloud Linux provides the weight-based throttling feature (blk-iocost) based on the cost model. The blk-iocost feature is an improvement to the weight-based disk throttling feature of the I/O subsystem (blkcg) in the kernel.

Enhance the monitoring of block I/O throttling

  • Alibaba Cloud Linux 2 kernel version 4.19.81-17.al7 and later

  • All Alibaba Cloud Linux 3 kernel versions

Alibaba Cloud Linux provides interfaces to better monitor Linux block I/O throttling.

Use the JBD2 optimization interface

  • Alibaba Cloud Linux 2 kernel version 4.19.81-17.al7 and later

  • All Alibaba Cloud Linux 3 kernel versions

JBD2 is the kernel thread of ext4 file systems. JBD2 often experiences the shadow (BH_Shadow) state when used. The state can affect system performance. To resolve this issue, Alibaba Cloud Linux provides interfaces to optimize JBD2.

Create hard links across project quotas

  • Alibaba Cloud Linux 2 kernel version 4.19.91-18.al7 and later

  • All Alibaba Cloud Linux 3 kernel versions

By default, ext4 file systems have constraints that forbid hard links to be created across project quotas. However, some scenarios require hard links to be created across project quotas. Alibaba Cloud Linux provides a custom interface to bypass the constraints of ext4 file systems and create hard links across project quotas.

Track I/O latency

  • All Alibaba Cloud Linux 2 kernel versions

  • All Alibaba Cloud Linux 3 kernel versions

Alibaba Cloud Linux optimizes the /proc/diskstats interface that provides raw data for the I/O latency analysis tool iostat. Alibaba Cloud Linux can calculate the durations of read, write, and special I/O (discard) operations on the device side. Alibaba Cloud Linux also provides the bcc tool to track I/O latency.

Detect I/O hangs of file systems and block layers

  • All Alibaba Cloud Linux 2 kernel versions

  • All Alibaba Cloud Linux 3 kernel versions

An I/O hang occurs when the system becomes unstable or fails due to time-consuming I/O requests. Alibaba Cloud Linux extends the core data structure and provides a feature to locate and detect I/O hangs at low system overheads.

Monitoring

Reference

Supported versions

Description

UKFEF

Alibaba Cloud Linux 3 kernel version 5.10.60-9.al8 and later

Alibaba Cloud Linux 3 supports Unified Kernel Fault Event Framework (UKFEF) in kernel version 5.10.60-9.al8. UKFEF is used to collect the exception events on Alibaba Cloud Linux 3 that may cause risks and generate event reports in a unified format.

Enable the PSI feature for cgroup v1

  • Alibaba Cloud Linux 2 kernel version 4.19.81-17.al7 and later

  • All Alibaba Cloud Linux 3 kernel versions

Alibaba Cloud Linux provides the Pressure Stall Information (PSI) feature for the cgroup v1 interface. The PSI feature allows you to monitor CPUs, memory, and I/O performance.

Scheduling

Reference

Supported versions

Description

Enable the CPU burst feature for cgroup v1

  • Alibaba Cloud Linux 2 kernel version 4.19.91-22.al7 and later

  • All Alibaba Cloud Linux 3 kernel versions

Alibaba Cloud Linux provides the CPU burst feature for the cgroup v1 interface. The CPU burst feature allows CPU-throttled containers to burst their CPU utilization to deliver higher performance and lower latency.

Group identity feature

  • Alibaba Cloud Linux 2 kernel version 4.19.91-24.al7 and later

  • Alibaba Cloud Linux 3 kernel version 5.10.46-7.al8 and later

Alibaba Cloud Linux provides the group identity feature. The group identity feature allows you to configure different identities for CPU cgroups to prioritize process tasks in the cgroups.

Compatibility

Reference

Supported versions

Description

Statistical state change of anonymous pages in the /proc/meminfo file

  • Alibaba Cloud Linux 2 kernel version 4.19.91-22.al7 and later

  • All Alibaba Cloud Linux 3 kernel versions

In Alibaba Cloud Linux kernel version 4.19.91-22.al7 and later, the statistical Active(anon) and Inactive(anon) states of anonymous pages in the /proc/meminfo file are changed. If your application uses the statistics, data that is queried before and after the change is inconsistent.

Others

Reference

Supported versions

Description

Enhance the visibility of container resources

  • Alibaba Cloud Linux 2 kernel version 4.19.91-22.2.al7 and later

  • Alibaba Cloud Linux 3 kernel version 5.10.46-7.al8 and later

Alibaba Cloud Linux provides kernel interfaces for the container resource visualization feature to enhance the visibility of container resources.