CXL elastic memory pool

Updated at:
Copy as MD

The elastic memory pool of AnalyticDB for MySQL expands the memory capacity available to database nodes through CXL (Compute Express Link). It provides scalable memory resources for large-scale data analytics and breaks through the constraints of traditional deployments in which memory capacity is limited by server memory slots, single-machine configurations, and instance specifications. For analytics workloads with large datasets and high cache requirements, the elastic memory pool greatly improves query and analytics performance. This topic describes the working principles, key benefits, and applicable scenarios of the elastic memory pool.

Note

The CXL elastic memory pool feature is currently in the gray release stage. To use this feature or if you have any questions about it, submit a ticket to contact us.

Scope of application

Clusters: AnalyticDB for MySQL Enterprise Edition

Working principles

AnalyticDB for MySQL builds an elastic memory pool based on CXL 2.0, which maps CXL memory into the host physical address space as a transparent extension of local DRAM. The database can use this capacity on demand without being aware of remote memory communication or explicit data movement, achieving decoupling of memory and compute resources, independent scaling, and pay-as-you-go billing.

The elastic memory pool architecture consists of three parts: logical resources, the joint resource scheduler, and physical resources:

  • Logical resources: an AnalyticDB instance contains workers, CPUs, local memory, CXl memory, and disks (SSDs or a distributed file system). The memory allocator manages CPUs, local memory, and CXl memory in a unified manner and schedules data between memory and disks through the Lookup & Evict and Return mechanisms.

  • Joint Resource Scheduler: receives online schedule and offline schedule requests and coordinates allocation between logical and physical resources.

  • Physical resources: the compute resource pool consists of multiple servers, and the auto-scaler scales resources on demand. The Multi-Tenant Secure Memory Pool is connected to the servers through the high-speed CXL interconnect, and pooling memory is allocated to compute nodes on demand.

At the storage level, the CXL memory pool forms a new Hot Tier between local DRAM and SSD/OSS: DRAM (hottest) → CXL memory (new Hot Tier) → SSD (warm) → OSS (cold).

The storage engine and the compute engine schedule data in layers based on the hot and cold characteristics of data: hot data resides in DRAM, warm data is moved down to CXL memory, and cold data is still stored on SSDs and OSS. The persistent storage method of the database remains unchanged.

Key capabilities

  • Accelerated storage access (Hot Tier cache): data is cached in CXL memory, and cache hits directly reuse decoded data, reducing underlying storage reads and repeated decompression and decoding. In some customer workload scenarios, query performance improves by 2 to 7 times.

  • Avoid data spilling to disks for large computations: when instance memory is insufficient, intermediate data of operators such as sorting, aggregation, and joins is preferentially migrated to CXL memory instead of being spilled to disks, preventing disk I/O from dragging down end-to-end throughput and improving large query performance.

  • CXL-based data shuffle: intermediate shuffle results of distributed computing are exchanged through the CXL memory pool, replacing the traditional disk spilling and network transmission paths and reducing shuffle overhead.

Key benefits

  • Break through single-machine capacity limits: the memory capacity of a single compute node can be expanded to up to 2 TB, easily handling analytics and queries on ultra-large datasets.

  • Significantly lower costs: the per-GB cost of CXL memory is far lower than that of local DRAM. CXL memory is decoupled from compute resources, can be scaled independently, and is billed on demand, greatly reducing the total cost of ownership of your instances.

Applicable scenarios

  • Large working set analytics: the business repeatedly accesses large datasets, and the existing memory capacity limits data residency and reuse.

  • Complex reports and aggregations: real-time analytics such as joins, aggregations, and sorting on massive data.

  • Large queries with limited memory: workloads with large data volumes that are prone to disk spilling due to insufficient memory and whose end-to-end throughput is affected.