# 分离式内存

**分离式内存**（disaggregated memory）是一种数据中心架构：主存与计算节点解耦，被放入可独立扩展的内存池中，通过互连网络而非本地内存总线连接。<sup>[1](https://www.microsoft.com/en-us/research/publication/decoupling-disaggregated-memory-optimizations-from-indexing-a-compiler-runtime-approach/?lang=fr-ca)</sup> 每个计算节点只在本地保留少量 DRAM，而系统的大部分内存位于一个公共池中，该池在逻辑上独立于任何特定的处理器。<sup>[2](https://link.springer.com/article/10.1007/s13222-026-00561-9)</sup> 其目标是提高整个数据中心的内存利用率，因为在现代服务器中，内存往往是最昂贵、利用率却最低的部件。<sup>[2](https://link.springer.com/article/10.1007/s13222-026-00561-9)</sup>

| 关键事实 | 详情 |
|---|---|
| 核心思想 | 计算与内存作为两个独立的池，通过互连结构分别扩展，而非每台服务器固定的 DRAM<sup>[1](https://www.microsoft.com/en-us/research/publication/decoupling-disaggregated-memory-optimizations-from-indexing-a-compiler-runtime-approach/?lang=fr-ca)</sup> |
| 访问粒度 | 软件方案通过 RDMA 以页为单位访问内存；CXL 等硬件方案提供缓存行粒度的加载/存储访问<sup>[3](https://infiniswap.github.io/)</sup><sup> • </sup><sup>[4](https://doi.org/10.1145/3721145.3725754)</sup> |
| 延迟代价 | CXL-FPGA 内存的延迟约为本地 DDR 的 2.88 倍，带宽为其 45–69%；CXL-ASIC 器件的延迟约为 2.18 倍，带宽为 82–83%<sup>[5](https://arxiv.org/abs/2411.02282)</sup> |
| 池规模 | 对云生产环境追踪数据的分析发现，跨 8–16 路插槽进行池化即可获得大部分收益，从而可以构建访问延迟较低的小型内存池<sup>[6](https://www.pdl.cmu.edu/ftp/associated/HLi-Pond_abs.shtml)</sup> |
| 标准 | CXL 2.0 规范（2020 年 11 月）为可组合内存基础设施引入了交换、内存池化和交换网络管理<sup>[7](https://computeexpresslink.org/blog/cxl-fabric-management-1089/)</sup> |
| 部署状况 | 微软于 2025 年 11 月在 Azure M 系列虚拟机预览版中启用了 CXL 挂载内存；2025 年初出货的服务器中约三分之二具备 CXL 能力，但几乎无一启用 CXL<sup>[8](https://grc.iit.edu/research/projects/storehub/report/)</sup> |

## 动机

传统服务器把内存绑定在拥有它的处理器上。工作负载很少用满分配给自己的全部内存，于是一台机器上的容量闲置，另一台却在向磁盘换页。这种错配的代价很大：在 Infiniswap 的测量中，把容器的内存削减到其工作集的 25%，会使 VoltDB 的吞吐量降至原来的 1/5.5、[Memcached](https://www.edgepedia.org/zh/memcached) 的吞吐量降至原来的 1/2.1；再削减 25%，这两个应用的性能分别恶化至多 24 倍和 17 倍。<sup>[3](https://infiniswap.github.io/)</sup> 分离式架构通过让任意节点从共享池中取用内存来解决这一问题，从而适应数据分析、内存大数据处理等应用动态变化的内存需求。<sup>[9](https://arxiv.org/abs/2303.06420)</sup>

## 软件方案：基于 RDMA 的远程内存

第一波实用化的分离式方案采用 RDMA（远程直接内存访问），它使一台机器无需远端 CPU 参与即可读写另一台机器的内存。Infiniswap 是一个面向低延迟、内核旁路网络的集群远程内存分页系统，它把每台机器的交换空间切分成固定大小的块，分布到远程机器的空闲内存上，从而把整个集群的闲置内存暴露给未经修改的应用。<sup>[3](https://infiniswap.github.io/)</sup> 在一套 32 台机器、56 Gbps 的 InfiniBand 集群上，它把集群总内存利用率平均从 40.8% 提升到 60%，并使未经修改的 VoltDB、Memcached、PowerGraph、GraphX 和 [Apache Spark](https://www.edgepedia.org/zh/apache-spark) 的吞吐量相比磁盘交换最高提升 4 倍到 15.4 倍。<sup>[3](https://infiniswap.github.io/)</sup> 微软同样利用 RDMA 在运行时向远程节点“借用”内存，在本地内存耗尽时避免溢写到磁盘。<sup>[2](https://link.springer.com/article/10.1007/s13222-026-00561-9)</sup>

基于 RDMA 的设计把本地内存当作远程内存之上、以页为粒度的页缓存。<sup>[10](https://doi.org/10.1145/3725218)</sup> 其代价是软件开销：冗余的数据拷贝和软件层面对交换网络的介入会拉长访问延迟；而用单边 RDMA 操作构建远程数据结构，又会带来棘手的同步问题，这些问题催生了一批面向分离式数据库的设计准则。<sup>[11](https://doi.org/10.1145/3716377)</sup>

## 硬件方案：CXL

计算快速链路（CXL）是一种建立在 PCIe 物理接口之上的开放标准互连，它使处理器能够访问远程内存，同时以缓存一致的加载/存储语义保持共享内存编程模型。<sup>[12](https://arxiv.org/abs/2503.17864)</sup><sup> • </sup><sup>[7](https://computeexpresslink.org/blog/cxl-fabric-management-1089/)</sup> 2020 年 11 月发布的 CXL 2.0 规范增加了交换、内存池化和交换网络管理；交换网络管理器按需为各计算实例分配和释放内存。<sup>[7](https://computeexpresslink.org/blog/cxl-fabric-management-1089/)</sup> CXL 3.0（2022 年）和 3.1（2023 年）将该标准扩展为可扩展的交换网络，支持 PCIe 6.0 物理层、多级交换、交换网络 ID 以及多主机一致性内存共享。<sup>[13](https://openproceedings.org/2026/conf/edbt/paper-280.pdf)</sup>

CXL 内存比本地 DRAM 慢。经芯片验证的测量显示，CXL-FPGA 内存的延迟约为本地 DDR 的 2.88 倍，带宽为后者的 45–69%；CXL-ASIC 器件的延迟约为 2.18 倍，带宽为本地带宽的 82–83%。<sup>[5](https://arxiv.org/abs/2411.02282)</sup> 混用不同层级的内存，也会给那些为相对均匀的内存延迟而设计的处理器带来压力：内存层级之间并行度的差异，在高负载下可使 DDR 内存带宽下降多达 81%，这促使人们设计出优先处理本地 DDR 流量的请求控制机制。<sup>[12](https://arxiv.org/abs/2503.17864)</sup>

**池化设计。** Pond 是与微软 Azure 合作构建的基于 CXL 的内存池化系统，它从云生产环境追踪数据中发现，跨 8–16 路插槽池化就足以获得大部分收益，并用机器学习模型预测应为每台虚拟机分配多少本地内存和池内存；在 158 个工作负载上，它把 DRAM 成本降低了 7%，性能与同一 NUMA 节点内分配时相差 1–5%。<sup>[6](https://www.pdl.cmu.edu/ftp/associated/HLi-Pond_abs.shtml)</sup> 阿里巴巴的 PolarCXLMem 展示了首个生产级、基于 CXL 交换机的分离式内存。<sup>[2](https://link.springer.com/article/10.1007/s13222-026-00561-9)</sup>

## 应用

分离式内存服务于若干类工作负载。内存数据库与数据系统运行在远程内存池之上，其索引结构和并发控制针对远程访问的代价做了调整。<sup>[1](https://www.microsoft.com/en-us/research/publication/decoupling-disaggregated-memory-optimizations-from-indexing-a-compiler-runtime-approach/?lang=fr-ca)</sup><sup> • </sup><sup>[11](https://doi.org/10.1145/3716377)</sup> [大数据](https://www.edgepedia.org/zh/big-data)框架也得到了扩展：分离式 RDD（Disaggregated RDDs）把 Spark 的 RDD 缓存在远程内存中，同时把对延迟敏感的计算留在本地内存。<sup>[14](https://research.ibm.com/publications/disaggregated-rdds-extending-and-analyzing-apache-spark-for-memory-disaggregated-infrastructures)</sup> 在高性能计算方面，一套基于内存容量、本地—远程访问比、注入带宽和二分带宽的方法论发现，在涵盖 AI 训练、基因组学、蛋白质和聚变代码的 13 个多样化工作负载中，有 11 个可以在使用受注入带宽约束的分离式内存时不损失性能，而有 1 个付出了机架级的二分带宽代价，2 个付出了全系统级的二分带宽代价。<sup>[15](https://arxiv.org/abs/2306.04014)</sup> AI 推理是更新的驱动力：Enfabrica 的 Emfasys 系统通过 400G 或 800G 以太网、以 RDMA 挂载最多 18 TB 的 DDR5 内存，面向的是长提示词和上下文窗口给 GPU 板载 HBM 带来压力的大规模推理工作负载。<sup>[16](https://www.tomshardware.com/tech-industry/nvidia-backed-startup-invents-ethernet-memory-pool-to-help-power-ai-claims-it-can-add-up-to-18tb-of-ddr5-capacity-for-large-scale-inference-workloads-and-reduce-per-token-generation-costs-by-up-to-50-percent)</sup>

## 部署与近期进展

商业部署落后于研究文献。2025 年初出货的服务器中约三分之二能够支持 CXL，但几乎没有一台真正启用，跨多台主机的池化也仍只是演示级别的能力。<sup>[8](https://grc.iit.edu/research/projects/storehub/report/)</sup> 首个公开宣布的云部署出现在 2025 年 11 月，微软在 Azure M 系列虚拟机预览版中启用了 CXL 挂载内存。<sup>[8](https://grc.iit.edu/research/projects/storehub/report/)</sup>

近期的生产系统往往把分离式内存用于扩容和硬件再利用，而非细粒度共享。Meta 于 2026 年 6 月披露的 Vistara ASIC 是一款基于 PCIe 5.0 x16 的 CXL 2.0 类型 3 内存扩展器，把回收的 DDR4-2400 内存条挂载到仅支持 DDR5 的新服务器上；每台服务器把 768 GB 本地 DDR5-6400（614 GB/s）与 256 GB CXL 挂载的 DDR4（76 GB/s）组合起来，后者在 Linux 中呈现为一个独立的 NUMA 节点，冷页会迁移到其中；Meta 报告其空闲往返延迟约为 50 ns。<sup>[17](https://www.tomshardware.com/pc-components/dram/meta-fights-soaring-hardware-costs-by-reusing-old-ddr4-server-memory-in-new-ddr5-only-servers-custom-cxl-2-0-chip-marries-legacy-ddr4-2400-with-cutting-edge-ddr5-6400)</sup> 同一份报告还指出，Panmnesia 的 CXL 交换网络交换机可扩展到最多 64 个节点共享一个内存池，解决了早期 CXL 交换机因沿用 PCIe 衍生设计而继承的延迟代价。<sup>[17](https://www.tomshardware.com/pc-components/dram/meta-fights-soaring-hardware-costs-by-reusing-old-ddr4-server-memory-in-new-ddr5-only-servers-custom-cxl-2-0-chip-marries-legacy-ddr4-2400-with-cutting-edge-ddr5-6400)</sup>

## References

1. [Decoupling Disaggregated Memory Optimizations from Indexing: A Compiler-Runtime Approach, Microsoft Research](https://www.microsoft.com/en-us/research/publication/decoupling-disaggregated-memory-optimizations-from-indexing-a-compiler-runtime-approach/?lang=fr-ca)
2. [Cracks in the Memory Wall: Data Systems On Disaggregated Memory, Datenbank-Spektrum](https://link.springer.com/article/10.1007/s13222-026-00561-9)
3. [Infiniswap: Efficient Memory Disaggregation project page](https://infiniswap.github.io/)
4. [Page Migration for Hardware Memory Disaggregation Across a Network, ICS 2025](https://doi.org/10.1145/3721145.3725754)
5. [CXL-DMSim: A Full-System CXL Disaggregated Memory Simulator With Comprehensive Silicon Validation, arXiv:2411.02282](https://arxiv.org/abs/2411.02282)
6. [Pond: CXL-Based Memory Pooling Systems for Cloud Platforms, CMU Parallel Data Laboratory (ASPLOS 2023)](https://www.pdl.cmu.edu/ftp/associated/HLi-Pond_abs.shtml)
7. [CXL Fabric Management, Compute Express Link Consortium blog](https://computeexpresslink.org/blog/cxl-fabric-management-1089/)
8. [The State and Future Direction of the Data Storage Research Community (2026), GRC/IIT](https://grc.iit.edu/research/projects/storehub/report/)
9. [Design and Evaluation of a Rack-Scale Disaggregated Memory Architecture For Data Centers, arXiv:2303.06420](https://arxiv.org/abs/2303.06420)
10. [CosMoS: Architectural Support for Cost-Effective Data Movement in a Disaggregated Memory System, ACM JETC](https://doi.org/10.1145/3725218)
11. [Synchronizing Disaggregated Data Structures with One-Sided RDMA, ACM Transactions on Database Systems](https://doi.org/10.1145/3716377)
12. [Architectural and System Implications of CXL-enabled Tiered Memory, arXiv:2503.17864](https://arxiv.org/abs/2503.17864)
13. [Exploring Dynamic Memory Allocation of CXL Memory Pools in Enterprise In-Memory Database Management Systems, EDBT 2026](https://openproceedings.org/2026/conf/edbt/paper-280.pdf)
14. [Disaggregated RDDs: Extending and Analyzing Apache Spark for Memory Disaggregated Infrastructures, IBM Research](https://research.ibm.com/publications/disaggregated-rdds-extending-and-analyzing-apache-spark-for-memory-disaggregated-infrastructures)
15. [Evaluating the Potential of Disaggregated Memory Systems for HPC Applications, arXiv:2306.04014](https://arxiv.org/abs/2306.04014)
16. [Nvidia-backed startup invents Ethernet memory pool to help power AI, Tom's Hardware](https://www.tomshardware.com/tech-industry/nvidia-backed-startup-invents-ethernet-memory-pool-to-help-power-ai-claims-it-can-add-up-to-18tb-of-ddr5-capacity-for-large-scale-inference-workloads-and-reduce-per-token-generation-costs-by-up-to-50-percent)
17. [Meta fights soaring hardware costs by reusing old DDR4 server memory in new DDR5-only servers, Tom's Hardware](https://www.tomshardware.com/pc-components/dram/meta-fights-soaring-hardware-costs-by-reusing-old-ddr4-server-memory-in-new-ddr5-only-servers-custom-cxl-2-0-chip-marries-legacy-ddr4-2400-with-cutting-edge-ddr5-6400)

---
*Initially written Oct 15, 2026*

Topic: 技术与人造世界 › 计算技术与数字系统 › 计算机硬件 › Servers, supercomputers & data centers › Cluster and parallel architectures

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/disaggregated-memory

English original: https://www.edgepedia.org/disaggregated-memory
