用户模式内存页面管理:一个旧的想法重新应用到内存墙问题
User Mode Memory Page Management: An old idea applied anew to the memory wall problem
摘要:
人们常说,计算机性能的最大限制之一是内存带宽(即“记忆墙问题”)。在这份立场文件中,我认为,如果计算进化的历史趋势(其中可用容量的增长是指数级的,而其访问延迟的减少是线性的),那么这种观点是错误的-事实上,我们应该尽可能地集中精力减少整个系统的存储器访问延迟,所谓“整个系统”,我的意思是我们应该看看由于遗留设计决策,软件如何不必要地浪费内存带宽。为此,我进行了可行性研究,以确定我们是否应该虚拟化的MMU为每个应用程序的进程,使它有直接存取自己的MMU页表和内存分配给一个进程是专门由进程管理,而不是内核。我发现在典型的条件下,几乎规模不变的性能到内存分配大小是可能的,这样数百兆的内存可以在几乎相同的时间内被分配,重新定位,交换和释放(例如,在这个实验分配器下分配8 Mb比传统分配器快10倍,将128 Kb块转换为256 Kb块快4.5倍)。我发现第一次页面访问延迟提高了10倍;此外,由于从不调用内核页面错误处理程序,因此没有缓存污染可以提高整个应用程序的内存访问延迟,从而将性能提高了2倍。最后,我尝试二进制修补现有的应用程序使用实验分配技术,发现几乎普遍的性能改进,而不必重新编译这些应用程序,以更好地利用新的设施。
英文摘要:
It is often said that one of the biggest limitations on computer performance is memory bandwidth (i.e."the memory wall problem"). In this position paper, I argue that if historical trends in computing evolution (where growth in available capacity is exponential and reduction in its access latencies is linear) continue as they have, then this view is wrong - in fact we ought to be concentrating on reducing whole system memory access latencies wherever possible, and by "whole system" I mean that we ought to look at how software can be unnecessarily wasteful with memory bandwidth due to legacy design decisions. To this end I conduct a feasibility study to determine whether we ought to virtualise the MMU for each application process such that it has direct access to its own MMU page tables and the memory allocated to a process is managed exclusively by the process and not the kernel. I find under typical conditions that nearly scale invariant performance to memory allocation size is possible such that hundreds of megabytes of memory can be allocated, relocated, swapped and deallocated in almost the same time as kilobytes (e.g. allocating 8Mb is 10x quicker under this experimental allocator than a conventional allocator, and resizing a 128Kb block to 256Kb block is 4.5x faster). I find that first time page access latencies are improved tenfold; moreover, because the kernel page fault handler is never called, the lack of cache pollution improves whole application memory access latencies increasing performance by up to 2x. Finally, I try binary patching existing applications to use the experimental allocation technique, finding almost universal performance improvements without having to recompile these applications to make better use of the new facilities.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。