Automatic Cost Model Derivation for Energy-Aware Compaction

image

Memory migration
[Generated with AI]

Context

Driven by technological advances, the DRAM spot price continues to decrease. The memory capacities have expanded far beyond what was imaginable decades ago. As a result, the average memory utilization in consumer devices and data centers rarely exceeds 60 percent. Due to leakage currents, DRAM cells require actively expending energy on periodic refresh to retain their data. In contemporary systems, this refresh process occurs uniformly across all memory, regardless of the actual usage. This raises the question: can unused memory be disabled (offlined) to reduce energy consumption?

On the hardware side, the power-management features of existing SDRAM specifications apply only to coarse granularities of over 1 GiB. On the software side, OS memory management remains largely incapable of leveraging these features due to outdated assumptions about memory. The OS operates with the assumption that "unused memory is wasted memory" and aggressively fills all memory with file cache to maximize performance. Spoiled by the comfort of paging, page-frame allocators are mostly unaware of fragmentation and scatter the allocated pages across the physical address space. Consequently, in a system with significant uptime, finding contiguous unused memory segments for offlining becomes nearly impossible.

To improve the OS memory management and integrate the power-management aspect into it, we have developed a compaction mechanism optimized for coarse granularities. The mechanism divides the physical address space into slices, each representing a power-management domain, and periodically reorganizes memory contents to reduce the amount of active slices. Each slice is assigned a score based on the estimated effort to offline it. By prioritizing the slices with the lowest score, the mechanism achieves near-optimal compaction with minimal effort. Additionally, it also addresses the problem of ever-growing file cache by freeing its pages instead of migrating where possible.

Problem

To effectively reduce power consumption, the compaction mechanism must be aware of the costs and benefits of its operation. It should consider offlining a slice only when the energy spent on page migration and freeing is likely to be recovered during its downtime. This requires a model that effectively estimates the offlining effort of each slice.

However, this cost-benefit model is highly specific to each system. Factors such as memory topology, the CPU characteristics, the runtime behavior of migration and page reclamation routines vary significantly across machines and influence the outcome. To provide some examples,

Goal

As there is no "one size fits all" solution, the compaction mechanism requires an automated method to facilitate its deployment in the field and tailor its model to the current system. The goal of this thesis is to develop such a solution by exploring various regression analysis methods and selecting those best suited to the problem. The solution should perform consistently across a wide range of machines with varying characteristics. Finally, the deployment of the compaction mechanism should be user-friendly, eliminating the hassle of manual benchmarking or tedious configuration.

Topics: C, Linux kernel, memory management, compaction, energy-aware computing, data science, regression analysis.

References

Regression analysis: Statistical processes for estimating the relationship between a dependent variable (often called the outcome variable) and independent variables.

Papers

DIMES Workshop Best Paper Award
The New Costs of Physical Memory Fragmentation
Alexander Halbuer, Illia Ostapyshyn, Lukas Steiner, Lars Wrenger, Matthias Jung, Christian Dietrich, Daniel LohmannProceedings of the 2nd Workshop on Disruptive Memory Systems (SOSP-DIMES '24)Association for Computing Machinery2024Best Paper Award.
PDF Details 10.1145/3698783.3699378 [BibTex]

Enhancing Energy Efficiency with Advanced DRAM Management in Linux

Modern computer systems face a significant challenge in managing physical memory efficiently, especially in the context of energy consumption. Specifically, the DRAM (Dynamic Random-Access Memory) components in these systems consume a considerable amount of energy due to their constant refresh requirements. [PDF]

 
Typ
Masterarbeit

 
Status
abgeschlossen

 
Supervisors
Alexander Halbuer
Christian Dietrich
Daniel Lohmann

 
Project
ParPerOS

 
Bearbeiter
Illia Ostapyshyn (abgegeben: 01. Nov 2024)