@inproceedings{zhong2024managing, author = {Zhong, Yuhong and Berger, Daniel S. and Waldspurger, Carl and Agarwal, Ishwar and Agarwal, Rajat and Hady, Frank and Kumar, Karthik and Hill, Mark D. and Chowdhury, Mosharaf and Cidon, Asaf}, title = {Managing Memory Tiers with CXL in Virtualized Environments}, booktitle = {USENIX OSDI}, year = {2024}, month = {July}, abstract = {Cloud providers seek to deploy CXL-based memory to increase aggregate memory capacity, reduce costs, and lower carbon emissions. However, CXL accesses incur higher latency than local DRAM. Existing systems use software to manage data placement across memory tiers at page granularity. Cloud providers are reluctant to deploy software-based tiering due to high overheads in virtualized environments. Hardware-based memory tiering could place data at cacheline granularity, mitigating these drawbacks. However, hardware is oblivious to application-level performance. We propose combining hardware-managed tiering with software-managed performance isolation to overcome the pitfalls of either approach. We introduce IntelĀ® Flat Memory Mode, the first hardware-managed tiering system for CXL. Our evaluation on a full-system prototype demonstrates that it provides performance close to regular DRAM, with no more than 5% degradation for more than 82% of workloads. Despite such small slowdowns, we identify two challenges that can still degrade performance by up to 34% for "outlier" workloads: (1) memory contention across tenants, and (2) intra-tenant contention due to conflicting access patterns. To address these challenges, we introduce Memstrata, a lightweight multi-tenant memory allocator. Memstrata employs page coloring to eliminate inter-VM contention. It improves performance for VMs with access patterns that are sensitive to hardware tiering by allocating them more local DRAM using an online slowdown estimator. In multi-VM experiments on prototype hardware, Memstrata is able to identify performance outliers and reduce their degradation from above 30% to below 6%, providing consistent performance across a wide range of workloads.}, url = {http://approjects.co.za/?big=en-us/research/publication/managing-memory-tiers-with-cxl-in-virtualized-environments/}, }