读取吞吐狂飙452倍!全新CRAM内存压缩技术突破瓶颈:逼近原生DRAM

格隆汇
Yesterday
据快科技,Meta工程团队在布拉格举行的Linux Plumbers Conference上,提出了一项名为CRAM(Compressed RAM)的全新内存压缩架构,在纯读取场景下吞吐效能相比现有ZRAM暴涨452倍,速度几乎逼近原生DRAM。 目前Linux系统中提升可用内存容量的主流方案是ZRAM和zswap,但两者本质上仍建构在Swap交换层逻辑之上。系统读取压缩数据时需要触发分页错误中断,再从虚拟块设备中提取并解压,软件层开销成为瓶颈。 主导CRAM研发的工程师Gregory Price指出,内存压缩和解压缩本身在现代硬件上的运算开销微乎其微,真正拖慢系统响应的致命伤在于处理分页错误和Swap机制的软件层代价。 CRAM的核心思路是将压缩数据完全留在内存内,当作物理内存处理,而非传统的块设备。 具体实现上,CRAM利用Linux原生机制构建一个专属的私有NUMA节点,角色类似于虚拟的影子CPU。这使得内核无须将其模拟为存储块设备,可直接沿用既有的内存管理机制,包括内存迁移和气球膨胀机制。 CRAM支持完整的Cacheline与Byte级访问,基准测试中,纯读取模式下最差情况可达每秒4.89亿次操作,而ZRAM仅为每秒110万次操作,领先452倍。 即使加入20%写入负载,由于压缩数据无法直接原位覆写,必须通过分页错误将Folio移回原生NUMA节点,但该最差情境下CRAM速度仍为ZRAM的5.4倍。

Disclaimer: Investing carries risk. This is not financial advice. The above content should not be regarded as an offer, recommendation, or solicitation on acquiring or disposing of any financial products, any associated discussions, comments, or posts by author or other users should not be considered as such either. It is solely for general information purpose only, which does not consider your own investment objectives, financial situations or needs. TTM assumes no responsibility or warranty for the accuracy and completeness of the information, investors should do their own research and may seek professional advice before investing.

Most Discussed

  1. 1
     
     
     
     
  2. 2
     
     
     
     
  3. 3
     
     
     
     
  4. 4
     
     
     
     
  5. 5
     
     
     
     
  6. 6
     
     
     
     
  7. 7
     
     
     
     
  8. 8
     
     
     
     
  9. 9
     
     
     
     
  10. 10