Cloudflare的Big Pineapple平台通过实施五项内存结构优化,将1.1.1.1 DNS缓存的每条记录内存占用大幅降低,在整个集群中释放了约100 TB内存 1。该平台目前存储超过2500亿条DNS缓存记录 1。此次内存优化于2026年5月18日开始部署,并于同年7月6日完成 1。
在具体技术实现上,优化措施包括将Vec/String替换为Box、合并列表与偏移、省略重复owner、对大型枚举变体装箱,以及以原始字节存储记录数据 1。这些优化使每条缓存记录的内存占用从953字节降至420字节,降幅达56% 1。从实例维度来看,p99实例的内存占用由9.3 GB降至5.3 GB,降幅为43%;p90实例的内存占用由6.5 GB降至3.8 GB,降幅为42% 1。
除节省内存资源外,此次优化还提升了系统性能 1。数据显示,优化后的缓存插入吞吐量提升了43%,查询延迟降低了19% 1。
Cloudflare's Big Pineapple platform has successfully optimized the memory structures of the 1.1.1.1 DNS cache, freeing approximately 100 terabytes of memory across its entire cluster 1. The platform, which stores over 250 billion DNS cache records, implemented five specific memory optimizations that reduced the memory footprint of each record from 953 bytes to 420 bytes, marking a 56% decrease 1. This massive reduction in memory usage was achieved by replacing Vec and String with Box, merging lists and offsets, omitting duplicate owners, boxing large enum variants, and storing record data in raw bytes 1.
In addition to the significant memory savings, the optimizations led to notable performance enhancements, with cache insertion throughput increasing by 43% and query latency dropping by 19% 1. The memory footprint at the instance level also saw substantial declines, as p99 instance memory fell from 9.3 GB to 5.3 GB, a 43% reduction, while p90 instance memory decreased from 6.5 GB to 3.8 GB, representing a 42% drop 1. The deployment of these optimizations began on May 18, 2026, and was fully completed on July 6, 2026 1.
评论
还没有评论,欢迎留下第一条。