Adjusted Objects:一种面向可扩展编程的高效且原则性方法(扩展版)
Adjusted Objects: An Efficient and Principled Approach to Scalable Programming (Extended Version)
AI总结:
本文提出adjusted objects原则,通过为特定用途定制共享对象以提升性能,并引入DEGO库在Java程序中注入此类对象,使标准JDK共享对象性能提升多达两个数量级,基准测试性能提升达1.7倍。
摘要:
并行程序需要软件支持来协调对共享数据的访问。为此,现代编程语言提供了强一致性的共享对象。为了适应其众多用途,这些对象提供了庞大的 API。然而在实践中,每个程序仅调用接口的极小部分。利用这一观察结果,我们提出为特定用途定制共享对象。我们将此原则称为 adjusted objects。Adjusted objects 在实际中已存在。本文提供了对它们的首次系统性研究。我们解释了日常程序员如何调整常见的共享对象(如队列、映射和计数器)以获得更好的性能。我们使用一种表征可扩展性的新工具——不可区分图,介绍了 adjusted objects 的形式化基础。基于这项研究,我们引入了一个名为 DEGO 的库,用于在 Java 程序中注入 adjusted objects。在微基准测试中,来自 DEGO 库的对象将标准 JDK 共享对象的性能提升了多达两个数量级。我们还使用模仿社交网络应用程序的 Retwis-like 基准评估了 DEGO。在现代服务器级机器上,DEGO 将该基准的性能提升了多达 1.7 倍。
英文摘要:
Parallel programs require software support to coordinate access to shared data. For this purpose, modern programming languages provide strongly-consistent shared objects. To account for their many usages, these objects offer a large API. However, in practice, each program calls only a tiny fraction of the interface. Leveraging such an observation, we propose to tailor a shared object for a specific usage. We call this principle adjusted objects. Adjusted objects already exist in the wild. This paper provides their first systematic study. We explain how everyday programmers already adjust common shared objects (such as queues, maps, and counters) for better performance. We present the formal foundations of adjusted objects using a new tool to characterize scalability, the indistinguishability graph. Leveraging this study, we introduce a library named DEGO to inject adjusted objects in a Java program. In micro-benchmarks, objects from the DEGO library improve the performance of standard JDK shared objects by up to two orders of magnitude. We also evaluate DEGO with a Retwis-like benchmark modeled after a social network application. On a modern server-class machine, DEGO boosts by up to 1.7x the performance of the benchmark.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。