Hardware and OS mechanisms for memory tiering are widely deployed, yet datacenters still overprovision DRAM. The root cause is hotness fragmentation: allocators place objects by size rather than access pattern, so hot and cold objects become interleaved within the same pages. A single hot object marks its page as active, trapping surrounding cold data in expensive DRAM. Our analysis of Google production workloads shows that up to 97% of the bytes in active pages are cold and unreclaimable. We propose address-space engineering: dynamically reorganizing virtual memory so that hot objects cluster into uniformly hot pages and cold objects into uniformly cold pages. We present OBASE, a compiler-runtime system for unmanaged languages that serves as an object-aware frontend for page-aware OS backends. OBASE tracks accesses via lightweight pointer instrumentation and migrates objects at runtime using a lock-free protocol that is safe under concurrency. By reorganizing the address space, OBASE enables unmodified backends (kswapd, TMO, TPP, Memtis) to tier memory effectively. Across ten concurrent data structures, six backends, and production traces from Meta and Twitter, OBASE improves page utilization by 2-4x and reduces memory footprint by up to 70%, with only 2-5% overhead.
翻译:尽管用于内存分层的硬件与操作系统机制已广泛部署,数据中心仍过度配置DRAM。根本原因在于热度碎片化:分配器按对象大小而非访问模式放置对象,导致热对象与冷对象在同一页面内交错分布。单个热对象会将其所在页面标记为活跃,从而将周围冷数据困在昂贵的DRAM中。我们对谷歌生产工作负载的分析表明,活跃页面中高达97%的字节属于冷数据且无法回收。我们提出地址空间工程:动态重组虚拟内存,使热对象聚集为均匀的热页面,冷对象聚集为均匀的冷页面。我们提出OBASE——一个面向非托管语言的编译器-运行时系统,作为面向页面的操作系统后端的对象感知前端。OBASE通过轻量级指针插桩跟踪访问,并使用在并发场景下安全的无锁协议在运行时迁移对象。通过重组地址空间,OBASE使未经修改的后端(kswapd、TMO、TPP、Memtis)能够有效分层管理内存。在十个并发数据结构、六个后端以及来自Meta和Twitter的生产跟踪数据中,OBASE将页面利用率提升2-4倍,内存占用减少高达70%,而开销仅为2-5%。