forked from barryclark/jekyll-now
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add 2024-06-15-CXL.md and update tags
- Loading branch information
Showing
11 changed files
with
115 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
--- | ||
layout: post | ||
title: 数据库与新硬件技术 | ||
tags: DBMS | ||
tags: DBMS NVM | ||
--- | ||
|
||
数据库技术的发展依靠两大类动力:1. 应用需求的牵引力,2. 新硬件产品的推动力。最近 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
--- | ||
layout: post | ||
title: CXL 及内存池化和数据库系统研究设计 | ||
tags: CXL RDMA NVM DBMS | ||
--- | ||
CXL 是以 Intel 等厂商为主推行的一种新的设备互联标准。简单来说,它是用来连接 CPU、 | ||
内存、内存扩展器、各种加速设备(如智能网卡、FPGA、GPU、NPU等)的;并且它还能保持 | ||
Cache Coherency,应用程序可以尽量少感知硬件的变化<sup><a id="fnr.1" class="footref" href="#fn.1" role="doc-backlink">1</a></sup>。 | ||
CXL 标准定义了多种协议和三种类型的设备,包括加速卡如何访问 CPU 管理的内存并保持 | ||
Cache 一致性,加速卡和 CPU 如何互访各自的内存并保持 Cache 一致性,以及 CPU 和各种 | ||
加速卡如何访问直接扩展的内存甚至通过交换机扩展的内存池并保持 Cache 一致性。新标准 | ||
甚至支持多个服务器节点共同或共享访问同一个内存池。 | ||
|
||
# CXL 商用化 | ||
|
||
很显然,它与当今如日中天的 AI 芯片公司采取的是不同的策略。虽然整个 CXL 联盟已经合并 | ||
了 Gen-Z、OpenCAPI,包含了业界几乎所有的大小玩家(例如三星、AMD、NVIDIA 等),但是 | ||
NVIDIA 等看起来并没有那么积极。CXL 的优点显然是对应用程序比较友好,但是由此也带来了 | ||
很多挑战:需要芯片、OS等全力配合才能实现,而且也需要配套的大型软件产品来助阵,就像 | ||
前几年 Intel 大力推广 NVM 介质的情况一样。可是 NVM 商业上的失败,加上 AI 大模型和 | ||
GPU 的过度火爆给 CXL 带来了很大的挑战。不过最新的利好消息是,从事设备互联的初创企业 | ||
AsteraLabs 于 2024 年 03 月在 NASDAQ 上市并且市值接近 100 亿美金<sup><a id="fnr.2" class="footref" href="#fn.2" role="doc-backlink">2</a></sup>。除了 Intel | ||
自己不断推出支持 CXL 的 CPU 之外,三星等公司也在持续推出内存和内存扩展设备,给工业界和 | ||
学术界提供了物理设备来检验其效果。 | ||
|
||
|
||
# CXL 系统的学术研究 | ||
|
||
从学术论文的角度看,最近 2 年在 CXL 相关领域的研究明显多了起来。估计是厂商们加大了 | ||
自己的投入,也增加了对学术机构的赞助和牵引。2023 年 ASPLOS 上比较突出的有两项工作, | ||
一个是 Microsoft 的 Pond CXL 内存池系统<sup><a id="fnr.3" class="footref" href="#fn.3" role="doc-backlink">3</a></sup>,展示了 8-16 sockets 构成的小资源池就有较好的 | ||
性价比提升,不过搞不明白它为啥说了半天真实设备,但是测试又用得是模拟设备;而且测试 | ||
数据库负载选择了 MySQL 不擅长的 TPC-H 而不是 TPC-C 或 sysbench。不得不让人怀疑其实际 | ||
效果。另一个是 Meta 的 TPP CXL 分级内存的透明替换<sup><a id="fnr.4" class="footref" href="#fn.4" role="doc-backlink">4</a></sup>,论文作者中也有来自 NVIDIA | ||
的员工。TPP 是在 OS 层面做的实现,对应用是透明和友好的,而且大部分代码也已经合入 Linux | ||
内核的 5.18 版本。不过论文测试的还是 FPGA 做的内存扩展器而不是商品化系统,负载是几种 | ||
内存敏感型业务。从公有云的角度来看,对那些 Serverless 类内存敏感型服务,采用 CXL 内存池 | ||
确实有更大性价比和成功的机会,不过要下决心部署一个大集群还是需要有杀手级应用或针对多数 | ||
应用都可行的证据。 | ||
|
||
|
||
# CXL 的数据库系统研究 | ||
|
||
系统领域的人,尤其是数据库领域的研究者不会放过这个机会,再次积极地鼓吹 CXL,甚至认为 | ||
Scale-up 是下一轮浪潮,取代之前的 Scale-out,给人一种旧势力复辟的感觉😄<sup><a id="fnr.5" class="footref" href="#fn.5" role="doc-backlink">5</a></sup>。 | ||
数据库系统的研究者从一开始就喜欢搞硬件定制,这在早期是非常合理的,毕竟那时候操作系统、 | ||
文件系统、甚至编程语言都不能很好的满足数据库系统的需求。但是,这条路线成功的案例很少见, | ||
尤其是在今天数据库系统本身百花齐放,但是总体热度和市值又不如人工智能/大模型,更难以获得 | ||
经济上的投资可行性。历史上做过的尝试包括数据库机器、数据库定制的 SSD、FPGA 定制的 OLAP 等。 | ||
当然,CXL 确实也给数据库系统带来了新的机会,尤其是那些并不需要大规模分布式集群,并且需要 | ||
更多内存的负载,例如大部分的 OLTP、内存数据库、图数据库等。对于此前依赖多路服务器的负载, | ||
例如 SAP HANA,通过多台 2 路服务器加 CXL 交换机和 CXL 内存池,也许可以提供更高的弹性伸缩 | ||
能力,以及由此带来的更好的性价比。SAP HANA 在最近几年的 DaMoN<sup><a id="fnr.6" class="footref" href="#fn.6" role="doc-backlink">6</a></sup> 上发表了几篇 CXL | ||
相关的工作,不过都不完全是在商用物理设备上做的,基本想法是把 CXL 内存用作表数据或 Buffer | ||
Pool 的扩展,跟此前他们做 NVM 的想法类似。Action 则在 2024 年的 DaMoN<sup><a id="fnr.7" class="footref" href="#fn.7" role="doc-backlink">7</a></sup> 上研究了 | ||
CXL 代替 RDMA 给 JOIN 操作带来的性能改进。SIGMOD 2024 也有论文介绍了 CXL 环境下内存分级对 | ||
索引设计的影响<sup><a id="fnr.8" class="footref" href="#fn.8" role="doc-backlink">8</a></sup>。 | ||
|
||
|
||
# 总结 | ||
|
||
在 NVM、RDMA 之后,CXL 是下一个大规模商业化可能性比较高的场景,它不可避免的对数据库系统 | ||
研究带来影响。我们是把数据库系统研究过去几十年玩过的套路再玩一遍,尤其是针对那些在 NVM、 | ||
RDMA 上做过的尝试?还是通过理论计算、模拟测试、实物测试先排除掉那些不靠谱的设计?值得注意 | ||
的是,CXL 不同设备具有不同的设计时延,实际产品的时延跟标准的规定也有较大差别。另外,带宽 | ||
也是值得注意的问题,已经有一些实验发现 CXL 带来的带宽可能有助于提高性能,也有可能会成为 | ||
某些高带宽负载的瓶颈。对于那些想把 CXL 当做大型机替代物的尝试来说,系统的可靠性是一个潜在 | ||
的风险;而对于想把 NVIDIA GPU 当做大型机替代物的尝试来说,可编程性和 Cache 一致性是致命的 | ||
挑战。 | ||
|
||
|
||
# Footnotes | ||
|
||
<sup><a id="fn.1" href="#fnr.1">1</a></sup> <https://computeexpresslink.org/about-cxl/> | ||
|
||
<sup><a id="fn.2" href="#fnr.2">2</a></sup> <https://www.marketwatch.com/investing/stock/alab> | ||
|
||
<sup><a id="fn.3" href="#fnr.3">3</a></sup> <https://pages.cs.wisc.edu/~markhill/papers/asplos2023_pond.pdf> | ||
|
||
<sup><a id="fn.4" href="#fnr.4">4</a></sup> <https://symbioticlab.org/publications/files/tpp:asplos23/tpp-asplos23.pdf> | ||
|
||
<sup><a id="fn.5" href="#fnr.5">5</a></sup> <https://arxiv.org/html/2401.01150v1> | ||
|
||
<sup><a id="fn.6" href="#fnr.6">6</a></sup> <https://dl.acm.org/doi/abs/10.1145/3592980.3595311> | ||
|
||
<sup><a id="fn.7" href="#fnr.7">7</a></sup> <https://dl.acm.org/doi/10.1145/3662010.3663449> | ||
|
||
<sup><a id="fn.8" href="#fnr.8">8</a></sup> <https://dl.acm.org/doi/10.1145/3639286> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
layout: tagpage | ||
title: "Tag: CXL" | ||
tag: CXL | ||
robots: noindex | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
layout: tagpage | ||
title: "Tag: NVM" | ||
tag: NVM | ||
robots: noindex | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
layout: tagpage | ||
title: "Tag: RDMA" | ||
tag: RDMA | ||
robots: noindex | ||
--- |