TY - GEN
T1 - Every Mapping Counts in Large Amounts
T2 - 2024 USENIX Annual Technical Conference, ATC 2024
AU - Hildenbrand, David
AU - Schulz, Martin
AU - Amit, Nadav
N1 - Publisher Copyright:
© 2024 Proceedings of the 2024 USENIX Annual Technical Conference, ATC 2024. All rights reserved.
PY - 2024
Y1 - 2024
N2 - Operating systems can significantly enhance performance by utilizing large contiguous memory regions, even when the memory is not mapped using huge pages, by streamlining memory management. To harness these advantages, Linux has introduced "folios," representing multiple contiguous pages. Unlike traditional huge pages, folios can be partially mapped, which complicates folio accounting and hinders both performance and memory savings. Accurate and efficient folio accounting is crucial for optimizing memory management operations, enforcing various memory management policies, and performing Unique Set Size accounting in the operating system. In particular, determining whether a folio is exclusively mapped in a single address space is essential for avoiding unnecessary Copy-On-Write operations when memory is no longer shared. We introduce a novel tracking scheme to determine, with negligible overhead, whether a folio is exclusively mapped in a single address space. Our solution achieves a memory overhead that grows sublinearly with the number of pages per folio. By implementing our method in Linux, we demonstrate a notable improvement in fork and unmap operations by 1.9x and 4.2x respectively, and in the performance of fork-intensive workloads, such as Redis, achieving up to a 2.2x speedup.
AB - Operating systems can significantly enhance performance by utilizing large contiguous memory regions, even when the memory is not mapped using huge pages, by streamlining memory management. To harness these advantages, Linux has introduced "folios," representing multiple contiguous pages. Unlike traditional huge pages, folios can be partially mapped, which complicates folio accounting and hinders both performance and memory savings. Accurate and efficient folio accounting is crucial for optimizing memory management operations, enforcing various memory management policies, and performing Unique Set Size accounting in the operating system. In particular, determining whether a folio is exclusively mapped in a single address space is essential for avoiding unnecessary Copy-On-Write operations when memory is no longer shared. We introduce a novel tracking scheme to determine, with negligible overhead, whether a folio is exclusively mapped in a single address space. Our solution achieves a memory overhead that grows sublinearly with the number of pages per folio. By implementing our method in Linux, we demonstrate a notable improvement in fork and unmap operations by 1.9x and 4.2x respectively, and in the performance of fork-intensive workloads, such as Redis, achieving up to a 2.2x speedup.
UR - http://www.scopus.com/inward/record.url?scp=85201220460&partnerID=8YFLogxK
M3 - Conference contribution
AN - SCOPUS:85201220460
T3 - Proceedings of the 2024 USENIX Annual Technical Conference, ATC 2024
SP - 1273
EP - 1282
BT - Proceedings of the 2024 USENIX Annual Technical Conference, ATC 2024
PB - USENIX Association
Y2 - 10 July 2024 through 12 July 2024
ER -