Back to overview

Analyzing and Optimizing Task Granularity on the JVM

Type of publication Peer-reviewed
Publikationsform Proceedings (peer-reviewed)
Author Rosà Andrea, Rosales Eduardo, Binder Walter,
Project Fundamentals of Parallel Programming for Platform-as-a-Service Clouds
Show all

Proceedings (peer-reviewed)

Title of proceedings the 2018 International Symposium
Place Vienna, Austria
DOI 10.1145/3168828


Task granularity, i.e., the amount of work performed by parallel tasks, is a key performance attribute of parallel applications. On the one hand, fine-grained tasks (i.e., small tasks carrying out few computations) may introduce considerable parallelization overheads. On the other hand, coarse-grained tasks (i.e., large tasks performing substantial computations) may not fully utilize the available CPU cores, resulting in missed parallelization opportunities. In this paper, we provide a better understanding of task granularity for applications running on a Java Virtual Machine. We present a novel profiler which measures the granularity of every executed task. Our profiler collects carefully selected metrics from the whole system stack with only little overhead, and helps the developer locate performance problems. We analyze task granularity in the DaCapo and ScalaBench benchmark suites, revealing several inefficiencies related to fine-grained and coarse-grained tasks. We demonstrate that the collected task-granularity profiles are actionable by optimizing task granularity in two benchmarks, achieving speedups up to 1.53x.