Dynamic page sharing optimization for the R language

Helena Kotthaus, Ingo Korb, M. Engel, P. Marwedel
{"title":"Dynamic page sharing optimization for the R language","authors":"Helena Kotthaus, Ingo Korb, M. Engel, P. Marwedel","doi":"10.1145/2661088.2661094","DOIUrl":null,"url":null,"abstract":"Dynamic languages such as R are increasingly used to process .large data sets. Here, the R interpreter induces a large memory overhead due to wasteful memory allocation policies. If an application's working set exceeds the available physical memory, the OS starts to swap, resulting in slowdowns of a several orders of magnitude. Thus, memory optimizations for R will be beneficial to many applications. Existing R optimizations are mostly based on dynamic compilation or native libraries. Both methods are futile when the OS starts to page out memory. So far, only a few, data-type or application specific memory optimizations for R exist. To remedy this situation, we present a low-overhead page sharing approach for R that significantly reduces the interpreter's memory overhead. Concentrating on the most rewarding optimizations avoids the high runtime overhead of existing generic approaches for memory deduplication or compression. In addition, by applying knowledge of interpreter data structures and memory allocation patterns, our approach is not constrained to specific R applications and is transparent to the R interpreter. Our page sharing optimization enables us to reduce the memory consumption by up to 53.5% with an average of 18.0% for a set of real-world R benchmarks with a runtime overhead of only 5.3% on average. In cases where page I/O can be avoided, significant speedups are achieved.","PeriodicalId":244838,"journal":{"name":"Proceedings of the 10th ACM Symposium on Dynamic languages","volume":"39 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2014-10-14","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"12","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Proceedings of the 10th ACM Symposium on Dynamic languages","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/2661088.2661094","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 12

Abstract

Dynamic languages such as R are increasingly used to process .large data sets. Here, the R interpreter induces a large memory overhead due to wasteful memory allocation policies. If an application's working set exceeds the available physical memory, the OS starts to swap, resulting in slowdowns of a several orders of magnitude. Thus, memory optimizations for R will be beneficial to many applications. Existing R optimizations are mostly based on dynamic compilation or native libraries. Both methods are futile when the OS starts to page out memory. So far, only a few, data-type or application specific memory optimizations for R exist. To remedy this situation, we present a low-overhead page sharing approach for R that significantly reduces the interpreter's memory overhead. Concentrating on the most rewarding optimizations avoids the high runtime overhead of existing generic approaches for memory deduplication or compression. In addition, by applying knowledge of interpreter data structures and memory allocation patterns, our approach is not constrained to specific R applications and is transparent to the R interpreter. Our page sharing optimization enables us to reduce the memory consumption by up to 53.5% with an average of 18.0% for a set of real-world R benchmarks with a runtime overhead of only 5.3% on average. In cases where page I/O can be avoided, significant speedups are achieved.
R语言的动态页面共享优化
像R这样的动态语言越来越多地用于处理大型数据集。这里,由于内存分配策略的浪费,R解释器产生了很大的内存开销。如果应用程序的工作集超过了可用的物理内存,操作系统就会开始交换,从而导致几个数量级的减速。因此,R的内存优化对许多应用程序都是有益的。现有的R优化主要基于动态编译或本机库。当操作系统开始换出内存时,这两种方法都是无效的。到目前为止,只有少数针对R的数据类型或特定于应用程序的内存优化。为了纠正这种情况,我们为R提供了一种低开销的页面共享方法,可以显著降低解释器的内存开销。专注于最有价值的优化,避免了现有的内存重复数据删除或压缩通用方法的高运行时开销。此外,通过应用解释器数据结构和内存分配模式的知识,我们的方法不局限于特定的R应用程序,并且对R解释器是透明的。我们的页面共享优化使我们能够将内存消耗减少53.5%,对于一组实际的R基准测试,平均减少18.0%,平均运行时开销仅为5.3%。在可以避免页面I/O的情况下,可以实现显著的加速。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术官方微信