Fork/Join Parallelism in the Wild: Documenting Patterns and Anti-Patterns in Java Programs using the Fork/Join Framework
M. De Wael, S. Marr, and T. Van Cutsem. Proceedings of the 2014 International Conference on Principles and Practices of Programming on the Java Platform: Virtual Machines, Languages, and Tools, page 39--50. (September 2014)(acceptance rate 39%).
DOI: 10.1145/2647508.2647511
Abstract
Now that multicore processors are commonplace, developing parallel software has
escaped the confines of high-performance computing and enters the mainstream.
The Fork/Join framework, for instance, is part of the standard Java platform
since version 7. Fork/Join is a high-level parallel programming model advocated
to make parallelizing recursive divide-and-conquer algorithms particularly
easy. While, in theory, Fork/Join is a simple and effective technique to expose
parallelism in applications, it has not been investigated before whether and
how the technique is applied in practice. We therefore performed an empirical
study on a corpus of 120 open source Java projects that use the framework for
roughly 362 different tasks. On the one hand, we confirm the frequent use of
four best-practice patterns (Sequential Cutoff, Linked Subtasks, Leaf Tasks,
and avoiding unnecessary forking) in actual projects. On the other hand, we
also discovered three recurring anti-patterns that potentially limit parallel
performance: sub-optimal use of Java collections when splitting tasks into
subtasks as well as when merging the results of subtasks, and finally the
inappropriate sharing of resources between tasks. We document these
anti-patterns and study their impact on performance.
Proceedings of the 2014 International Conference on Principles and Practices of Programming on the Java Platform: Virtual Machines, Languages, and Tools
%0 Conference Paper
%1 dewael2014forkjoin
%A De Wael, Mattias
%A Marr, Stefan
%A Van Cutsem, Tom
%B Proceedings of the 2014 International Conference on Principles and Practices of Programming on the Java Platform: Virtual Machines, Languages, and Tools
%D 2014
%K AntiPatterns EmpiricalStudy ForkJoin Java MeMyPublication OpenSource Patterns myown
%P 39--50
%R 10.1145/2647508.2647511
%T Fork/Join Parallelism in the Wild: Documenting Patterns and Anti-Patterns in Java Programs using the Fork/Join Framework
%U https://stefan-marr.de/downloads/pppj14-dewael-et-al-forkjoin-parallelism-in-the-wild.pdf
%X Now that multicore processors are commonplace, developing parallel software has
escaped the confines of high-performance computing and enters the mainstream.
The Fork/Join framework, for instance, is part of the standard Java platform
since version 7. Fork/Join is a high-level parallel programming model advocated
to make parallelizing recursive divide-and-conquer algorithms particularly
easy. While, in theory, Fork/Join is a simple and effective technique to expose
parallelism in applications, it has not been investigated before whether and
how the technique is applied in practice. We therefore performed an empirical
study on a corpus of 120 open source Java projects that use the framework for
roughly 362 different tasks. On the one hand, we confirm the frequent use of
four best-practice patterns (Sequential Cutoff, Linked Subtasks, Leaf Tasks,
and avoiding unnecessary forking) in actual projects. On the other hand, we
also discovered three recurring anti-patterns that potentially limit parallel
performance: sub-optimal use of Java collections when splitting tasks into
subtasks as well as when merging the results of subtasks, and finally the
inappropriate sharing of resources between tasks. We document these
anti-patterns and study their impact on performance.
%@ 978-1-4503-2926-2
@inproceedings{dewael2014forkjoin,
abstract = {Now that multicore processors are commonplace, developing parallel software has
escaped the confines of high-performance computing and enters the mainstream.
The Fork/Join framework, for instance, is part of the standard Java platform
since version 7. Fork/Join is a high-level parallel programming model advocated
to make parallelizing recursive divide-and-conquer algorithms particularly
easy. While, in theory, Fork/Join is a simple and effective technique to expose
parallelism in applications, it has not been investigated before whether and
how the technique is applied in practice. We therefore performed an empirical
study on a corpus of 120 open source Java projects that use the framework for
roughly 362 different tasks. On the one hand, we confirm the frequent use of
four best-practice patterns (Sequential Cutoff, Linked Subtasks, Leaf Tasks,
and avoiding unnecessary forking) in actual projects. On the other hand, we
also discovered three recurring anti-patterns that potentially limit parallel
performance: sub-optimal use of Java collections when splitting tasks into
subtasks as well as when merging the results of subtasks, and finally the
inappropriate sharing of resources between tasks. We document these
anti-patterns and study their impact on performance.},
acceptancerate = {0.39},
added-at = {2014-07-15T21:10:12.000+0200},
author = {De Wael, Mattias and Marr, Stefan and Van Cutsem, Tom},
biburl = {https://www.bibsonomy.org/bibtex/22f24495a3090c2527290e57d045313a0/gron},
blog = {https://stefan-marr.de/2014/09/forkjoin-parallelism-in-the-wild/},
booktitle = {Proceedings of the 2014 International Conference on Principles and Practices of Programming on the Java Platform: Virtual Machines, Languages, and Tools},
doi = {10.1145/2647508.2647511},
interhash = {6a67e3d8a05209a4aa4bc3b18dd49699},
intrahash = {2f24495a3090c2527290e57d045313a0},
isbn = {978-1-4503-2926-2},
keywords = {AntiPatterns EmpiricalStudy ForkJoin Java MeMyPublication OpenSource Patterns myown},
month = {September},
note = {(acceptance rate 39%)},
numpages = {12},
pages = {39--50},
pdf = {https://stefan-marr.de/downloads/pppj14-dewael-et-al-forkjoin-parallelism-in-the-wild.pdf},
series = {ManLang'14},
timestamp = {2022-08-29T20:49:26.000+0200},
title = {Fork/Join Parallelism in the Wild: Documenting Patterns and Anti-Patterns in Java Programs using the Fork/Join Framework},
url = {https://stefan-marr.de/downloads/pppj14-dewael-et-al-forkjoin-parallelism-in-the-wild.pdf},
year = 2014
}