Reflections on the compatibility, performance, and scalability of parallel Python

Remigius Meier, T. Gross
{"title":"Reflections on the compatibility, performance, and scalability of parallel Python","authors":"Remigius Meier, T. Gross","doi":"10.1145/3359619.3359747","DOIUrl":null,"url":null,"abstract":"Today's hardware is increasingly parallel, and to increase performance, applications must be able to use this parallelism. Hence, programming languages must provide the means for parallel execution. The language Python offers a multithreading, shared-memory model for concurrency. However, simultaneous execution of threads, i.e., parallel execution, is not a standard feature of current virtual machines (VM) for Python. Instead, the predominant Python VMs depend on a global interpreter lock, which serializes the execution. In a parallel VM, replicating Python's concurrency semantics is challenging. Today, there are three parallel VMs, which use one of two approaches to address the challenges: Jython, IronPython, and PyPy-STM. These VMs use two fundamentally different approaches to synchronize parallel execution under Python's concurrency semantics: Jython and IronPython use fine-grained locking, and PyPy-STM uses software transactional memory (STM). The two approaches result in different performance characteristics and levels of Python compatibility for these VMs. In this paper, we report on our experience with the three parallel VMs by comparing their compatibility, performance, and scalability. The comparison shows that fine-grained locking can yield better scalability than the STM approach. However, regarding the faithful reproduction of Python's concurrency semantics and the absolute performance, the STM approach currently has the advantage.","PeriodicalId":191261,"journal":{"name":"Proceedings of the 15th ACM SIGPLAN International Symposium on Dynamic Languages","volume":"31 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2019-10-20","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"7","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Proceedings of the 15th ACM SIGPLAN International Symposium on Dynamic Languages","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/3359619.3359747","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 7

Abstract

Today's hardware is increasingly parallel, and to increase performance, applications must be able to use this parallelism. Hence, programming languages must provide the means for parallel execution. The language Python offers a multithreading, shared-memory model for concurrency. However, simultaneous execution of threads, i.e., parallel execution, is not a standard feature of current virtual machines (VM) for Python. Instead, the predominant Python VMs depend on a global interpreter lock, which serializes the execution. In a parallel VM, replicating Python's concurrency semantics is challenging. Today, there are three parallel VMs, which use one of two approaches to address the challenges: Jython, IronPython, and PyPy-STM. These VMs use two fundamentally different approaches to synchronize parallel execution under Python's concurrency semantics: Jython and IronPython use fine-grained locking, and PyPy-STM uses software transactional memory (STM). The two approaches result in different performance characteristics and levels of Python compatibility for these VMs. In this paper, we report on our experience with the three parallel VMs by comparing their compatibility, performance, and scalability. The comparison shows that fine-grained locking can yield better scalability than the STM approach. However, regarding the faithful reproduction of Python's concurrency semantics and the absolute performance, the STM approach currently has the advantage.
关于并行Python的兼容性、性能和可伸缩性的思考
今天的硬件越来越并行,为了提高性能,应用程序必须能够使用这种并行性。因此,编程语言必须提供并行执行的手段。Python语言为并发性提供了多线程、共享内存模型。然而,线程的同时执行,即并行执行,并不是Python当前虚拟机(VM)的标准特性。相反,主要的Python vm依赖于一个全局解释器锁,它序列化执行。在并行VM中,复制Python的并发语义是具有挑战性的。目前,有三个并行vm,它们使用两种方法中的一种来解决这些挑战:Jython、IronPython和PyPy-STM。这些虚拟机使用两种完全不同的方法在Python的并发语义下同步并行执行:Jython和IronPython使用细粒度锁定,而PyPy-STM使用软件事务性内存(STM)。这两种方法导致这些vm的性能特征和Python兼容性级别不同。在本文中,我们通过比较这三个并行vm的兼容性、性能和可伸缩性来报告我们使用它们的经验。比较表明,细粒度锁定可以产生比STM方法更好的可伸缩性。然而,就Python并发语义的忠实再现和绝对性能而言,STM方法目前具有优势。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约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学术官方微信