×
Community Blog A Comprehensive Performance Analysis of Alibaba Cloud Linux 4

A Comprehensive Performance Analysis of Alibaba Cloud Linux 4

This article details how Alibaba Cloud Linux 4 achieves a 28% multi-core performance boost through deep system-level kernel and runtime optimizations.

By Liu Yinan and Li Hang

Alibaba Cloud Linux 4 (hereinafter referred to as Alinux4) is a new-generation AI infrastructure operating system launched by Alibaba Cloud. It is built specifically for cloud AI workloads, can support model training with trillions of parameters, and significantly improves training and inference efficiency. Currently, comprehensive performance tuning has been completed. The comprehensive multi-core performance exceeds that of the previous generation Alinux3 by about 28%, leading in performance among similar products. This article breaks down the engineering decisions behind every bit of performance.

Have you ever encountered these dilemmas?

2

  • Your workloads have scaled out and machines are added, but performance has not kept up—multi-core utilization cannot go up, and the scheduler is "slacking off".
  • The Garbage Collection (GC) pause time of Java services remains high, Spark jobs run slower than expected, and parameter tuning feels endless and futile.
  • Even though the auditd service is turned off, there is still an inexplicable layer of performance overhead when system calls are intensive, and the root cause cannot be found after a long time of troubleshooting.
  • After the kernel version is replaced, the speed of fork/exec becomes slower instead, and the continuous integration (CI) pipeline build time quietly becomes longer.

These problems are often not caused by business code, but by "hidden mines" buried by the operating system itself. Over the past year, the Alinux4 R&D team has systematically investigated and fixed every class of the problems mentioned above. Today, we fully disclose these engineering decisions and optimization details.

First look at the conclusion: how is the performance of Alinux4?

3

We use the industry-common system comprehensive performance testing UnixBench as a benchmark to conduct out-of-the-box testing on Alibaba Cloud 9th generation bare metal instances (ecs.ebmc9i.48xlarge), comparing four operating systems: Alinux3, Alinux4, a domestic open source operating system (OS), and an international open source OS:

Testing dimension Alinux4 vsAlinux3 Alinux4 vs. a domestic open source OS Alinux4 vs. an international open source OS
Single-core total score Basically the same Leads by about 10% Leads by about 14%
Multi-core total score Leads by about 28% Leads by about 43% Leads by about 42%

In the actual test on the 192-core 9th generation bare metal instance of this specification, by only replacing the OS, it leads similar products by more than 40% in multi-core scenarios (192 concurrent). This is an extremely significant advantage in the comparison of general-purpose server OSs.

On the Java ecosystem side, the built-in Dragonwell Java Development Kit (JDK) of Alinux4 also performs brilliantly, compared with a certain international open source JDK:

  • SPECjbb2015 (server-side Java comprehensive performance benchmark): the critical-jOPS metric is improved by 20% to 45%.
  • Spark TPCDS(big data computation scenario): the duration of compute-intensive tasks is reduced by 15% to 20%.

Behind these numbers is not an accidental optimization or a single "silver bullet," but a system-level refactoring from the kernel to the toolchain, and from default configurations to runtime synergy.

The secrets behind Alinux4's performance: a back-to-basics overhaul of the entire system

4

The performance improvement of Alinux4 comes from our deep understanding of "modern cloud-native workloads": high concurrency, multi-core scheduling, containerized deployment, high-frequency system calls, large-scale Java applications... The traditional distribution pattern of "copying the community + minor repairs and modifications" can no longer meet the needs. Therefore, we chose a harder but more thorough path: instead of passively merging patches, we actively define problems. Instead of local performance tuning, we conduct a full-stack review.

1. Overhead reduction: eliminating hidden costs that persist even when "disabled"

auditd: a performance thief that is silently enabled

Many O&M teams are accustomed to shutting down the audit service. However, shutting down the service does not mean that the underlying mechanism is disabled. We found that in scenarios with high-frequency system calls, kernel auditing still silently consumes resources, even if you configure nothing.

A hidden tax on every context switch

An attribute introduced by the Linux community to optimize specific memory allocators requires that additional status information be maintained during each context switch. This provides no benefits for the vast majority of general-purpose workloads, but becomes a "tax" that must be paid for each schedule.

Alinux4 disables this overhead by default. In scenarios where this attribute is truly needed, you can enable this attribute on demand to achieve "pay as you go".

These changes seem minor, but they accumulate into massive performance dividends over millions of schedules per second.

2. Precision: reconstruct the consistency between the schedule and resource views

Inaccurate core selection in container scenarios

In deeply nested container environments, the scheduler's view of CPU load lags behind reality. A core that the kernel scheduler "thinks is empty" is actually busy. This causes jobs to pile up and results in low multi-core utilization.

Alinux4 recalibrates the load perception mechanism of the scheduler to keep this mechanism consistent with the actual CPU status. This significantly improves the multi-core parallel efficiency in containerized deployment scenarios.

This optimization is particularly crucial in high-density containerized deployments, and this optimization is the basic guarantee for achieving true "multi-core parallelism".

3. Lightness: free process creation from "heavy initialization"

To improve the accuracy of memory statistics in multi-core scenarios, the Linux community introduced a more complex counting mechanism. The cost is that a "heavy initialization" must be performed each time a new process is created. This causes a significant performance drop in scenarios where processes are frequently created (such as continuous integration (CI) builds and Shell script batch processing).

Alinux4 implements an intelligent delayed initialization policy. A single-threaded process uses a lightweight solution, and switches to the heavy mode only when multi-threading is truly needed. As a result, the speed of fork/exec returns to the expected level, and the execution of CI pipelines and scripts is significantly accelerated.

4. Robustness: deterministic guarantees for the file system and power management

EXT4 becomes the default file system

Some operating systems in the industry use XFS by default. However, we found in actual tests that XFS does not show significant advantages in typical cloud loads. Instead, the mainline of XFS changes frequently, and the stability of XFS is not ideal. Alinux4 switches to EXT4 as the default file system, and implements multiple accelerations on critical paths such as file creation, disk block allocation, and file descriptor management. This significantly reduces lock contentions in input/output (IO) operations.

Eliminating power-management jitter

To save power, the processor enters a deep sleep status, but the wake-up latency may cause application performance fluctuations. Alinux4 unifies and standardizes the power management policy, limits the maximum sleep depth, and achieves the optimal balance between power saving and response latency. This completely eliminates performance fluctuations caused by power management.

5. Acceleration: full-stack speedup from the compiler to underlying libraries

Base libraries optimization

Alinux4 re-examines the historical decision of "sacrificing performance for security" in system base libraries. Given that hardware-level security protection (such as Control-flow Enforcement Technology (CET) and Address Space Layout Randomization (ASLR)) is fully ready today, some old-style protections at the software layer no longer provide marginal benefits. Alinux4 precisely removes these "useless protections" and returns performance to users.

Compiler vectorization enhancement

The GNU Compiler Collection (GCC) compiler has long lacked vectorization support for 128-bit integer operations. This causes an operation that could have been completed by a single instruction to be split into two sequential executions. Alinux4 fills this gap. The number of instructions is reduced by 50%, and the speed of related operations is increased by 3 to 4 times.

Beyond the system: Alinux4 makes "high efficiency" out-of-the-box

5

All the preceding optimizations constitute the performance foundation of Alinux4. No matter what application you run, you can universally benefit from these optimizations.

For Java users, Alinux4 goes a step further: it comes pre-integrated with Dragonwell JDK out-of-the-box to provide comprehensive runtime acceleration without compromising Java compatibility.

Core benefits of Dragonwell JDK:

Optimization direction Effect Scenarios
Just-in-time (JIT) compilation optimization Reduces central processing unit (CPU) cache miss rate and improves throughput High concurrency services
Vectorization acceleration Uses hardware single instruction multiple data (SIMD) instructions to accelerate core algorithms Compute-intensive
Serialization acceleration Improves data exchange efficiency of inter-service invocations Microservices and remote procedure call (RPC)
Memory footprint optimization Reduces object memory overhead and bandwidth requirements Memory-sensitive services
Garbage collection (GC) efficiency improvement Shorter garbage collection pauses and more balanced loads Large memory applications
I/O-aware elastic memory Automatically yields memory to the system cache when I/O pressure is high I/O-intensive workloads
Big data computation optimization Core mathematical operation acceleration Spark big data computation

The latest version of Dragonwell JDK also introduces the AI-Extension extension, including:

  • Native acceleration for hot spot code: automatically detects performance bottlenecks and replaces them with efficient native implementations
  • Intelligent code layout: optimizes the program execution path to improve the cache hit ratio
  • Artificial intelligence (AI) auto parameter tuning (JTune): eliminates manual parameter tuning and uses AI to automatically find the optimal Java virtual machine (JVM) configuration

In internal testing, applications such as Spark and ElasticSearch can further improve performance on the existing basis.

Summary: There is a clear engineering decision behind the performance

1. Performance issues often hide in defaults

Audit mechanisms, power management, and scheduler auxiliary attributes... they are not actively enabled by you, but they silently consume resources. Systematically reviewing every factory default value is the first step in performance tuning.

2. Community patches the end of problems

The open source community has fixed issues in multi-core scenarios, but missed single-core ones. The compiler has lacked key optimization capabilities for years with no one to fill the gap. Tracking upstream, actively searching, and bridging the gaps are the core values of an operating system (OS) vendor.

3. The tradeoff between security and performance requires dynamic evaluation

Today, when hardware-level security protection is fully ready, some early software-layer protections no longer provide marginal benefits. Regularly reviewing the rationality of the security policy can avoid the deadlock of "sacrificing performance for security".

4. Multi-core performance is systems engineering, not a single-point miracle

The 28% improvement in multi-core performance comes from the continuous refinement of multiple subsystems such as scheduling, memory, input/output (IO), and the compiler. Saving a few percentage points in each area ultimately converges into a generational lead.

Experience now

The latest Alinux4 image version (4.0.3) was released at the end of May 2026. All the above optimizations are available out-of-the-box with the image. You can select the latest Alinux4 image in ECS public cloud resources to experience it.

0 0 0
Share on

OpenAnolis

116 posts | 6 followers

You may also like

Comments