真实场景中用于动态存储分配的装箱算法的意外高效性:一篇学术摘要
The Unexpected Efficiency of Bin Packing Algorithms for Dynamic Storage Allocation in the Wild: An Intellectual Abstract
AI总结:
该研究首次实现了适用于动态存储分配的当前最优二维装箱(2DBP)算法,通过4种现代分配器和8个真实工作负载的实验,发现分配器多数情况下性能优异,且2DBP算法在碎片化优化上有显著效果,为内存优化提供了新方向。
摘要:
近期研究表明,将内存分配器视为黑盒2DBP(二维装箱问题)求解器具有实际意义。例如,存在一种基于2DBP的碎片化度量指标,该指标通常与最大驻留集大小(RSS)呈单调相关。鉴于该领域在碎片化定义上的不确定性,以及节省物理内存的巨大价值,我们有动机将分配器生成的内存布局与由2DBP算法设计的、优化完工时间(makespan)的对应布局进行对比。当然,分配器必须在线运行,而2DBP算法基于完整的请求轨迹工作;但由于两者都在优化与最小化内存浪费相关的指标,研究它们之间的关系既具有学术价值,也具备实际意义。\n遗憾的是,目前尚无适用于动态存储分配(DSA)的2DBP算法实现。本文提出了首个(尽管是部分的)当前最优2DBP算法的实现。我们通过将其输出的完工时间与原作者给出的理论上界进行比较,验证了该实现的功能。在此过程中,我们识别并记录了关键细节,以辅助未来的同类研究工作。\n我们的实验包含4种现代内存分配器和8个真实应用工作负载。我们从实证数据中得出了若干值得注意的观察结果:在完工时间方面,分配器在93.75%的情况下优于Robson最坏情况下界。在87.5%的案例中,GNU的malloc实现表现出与当前最优2DBP算法相当甚至更优的性能,尽管后者是离线运行的。\n最令人意外的是,2DBP算法在碎片化方面表现出色,生成的解决方案最优可提升2.46倍。未来的研究可以利用这些见解开展面向内存的优化工作。
英文摘要:
Recent work has shown that viewing allocators as black-box 2DBP solvers bears meaning. For instance, there exists a 2DBP-based fragmentation metric which often correlates monotonically with maximum resident set size (RSS). Given the field's indeterminacy with respect to fragmentation definitions, as well as the immense value of physical memory savings, we are motivated to set allocator-generated placements against their 2DBP-devised, makespan-optimizing counterparts. Of course, allocators must operate online while 2DBP algorithms work on complete request traces; but since both sides optimize criteria related to minimizing memory wastage, the idea of studying their relationship preserves its intellectual--and practical--interest. Unfortunately no implementations of 2DBP algorithms for DSA are available. This paper presents a first, though partial, implementation of the state-of-the-art. We validate its functionality by comparing its outputs' makespan to the theoretical upper bound provided by the original authors. Along the way, we identify and document key details to assist analogous future efforts. Our experiments comprise 4 modern allocators and 8 real application workloads. We make several notable observations on our empirical evidence: in terms of makespan, allocators outperform Robson's worst-case lower bound $93.75\%$ of the time. In $87.5\%$ of cases, GNU's \texttt{malloc} implementation demonstrates equivalent or superior performance to the 2DBP state-of-the-art, despite the second operating offline. Most surprisingly, the 2DBP algorithm proves competent in terms of fragmentation, producing up to $2.46$x better solutions. Future research can leverage such insights towards memory-targeting optimizations.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。