This paper presents a trace-based simulation methodology for constructing representations of workload-allocator interaction. We use two-dimensional rectangular bin packing (2DBP) as our foundation. Classical 2DBP algorithms minimize their products' makespan, but virtual memory systems employing demand paging deem such a criterion inappropriate. We view an allocator's placement decisions as a solution to a 2DBP instance, optimizing some unknown criterion particular to that allocator's policy. Our end product is a compact data structure that fits e.g. the simulation of 80 million requests in a 350 MiB file. By design, it is concerned with events residing entirely in virtual memory; no information on memory accesses, indexing costs or any other factor is kept. We bootstrap our contribution's significance by exploring its relationship to maximum resident set size (RSS). Our baseline is the assumption that less fragmentation amounts to smaller peak RSS. We thus define a fragmentation metric in the 2DBP substrate and compute it for 28 workloads linked to 4 modern allocators. We also measure peak RSS for the 112 resulting pairs. Our metric exhibits a strong monotonic relationship (Spearman coefficient $\rho>0.65$) in half of those cases: allocators achieving better 2DBP placements yield $9\%$-$30\%$ smaller peak RSS, with the trends remaining consistent across two different machines. Considering our representation's minimalism, the presented empirical evidence is a robust indicator of its potency. If workload-allocator interplay in the virtual address space suffices to evaluate a novel fragmentation definition, numerous other useful applications of our tool can be studied. Both augmenting 2DBP and exploring alternative computations on it provide ample fertile ground for future research.
翻译:本文提出了一种基于迹的模拟方法,用于构建工作负载与分配器交互的表征。我们以二维矩形装箱(2DBP)作为基础。经典2DBP算法追求最小化其产出的制造跨度,但采用请求分页的虚拟内存系统认为该准则并不合适。我们将分配器的放置决策视为对某个2DBP实例的求解结果,其优化目标为特定于该分配器策略的未知准则。最终成果是一种紧凑型数据结构,例如可在350 MiB文件中模拟8000万次请求。该结构在设计上仅关注完全驻留于虚拟内存中的事件,不保留内存访问、索引开销或其他因素的信息。我们通过探索其与最大常驻集大小(RSS)的关系来佐证本贡献的重要性。基线假设是:碎片化程度越低,对应的峰值RSS越小。因此,我们在2DBP基底上定义碎片化度量指标,并针对与4种现代分配器相关的28个工作负载进行计算,同时测量112个结果组合的峰值RSS。在半数案例中,该指标展现出强单调关系(斯皮尔曼系数ρ>0.65):实现更优2DBP放置的分配器可使峰值RSS降低9%-30%,且该趋势在两台不同机器上保持一致。考虑到表征的极简性,本文呈现的实证证据有力证明了其有效性。若虚拟地址空间中分配器与工作负载的交互足以评估新型碎片化定义,则可进一步研究该工具的众多其他实用应用。无论是增强2DBP还是探索其替代计算方案,均为未来研究提供了广阔沃土。