Project

Back to overview

PARACAS: PARallelization tuning using ACcurate and efficient dynamic Analyses on managed runtime Systems

Applicant Binder Walter
Number 188688
Funding scheme Project funding (Div. I-III)
Research institution Istituto del Software (SI) Facoltà di scienze informatiche
Institution of higher education Università della Svizzera italiana - USI
Main discipline Information Technology
Start/End 01.09.2020 - 31.08.2024
Approved amount 1'004'425.00
Show all

Keywords (11)

Large-scale analysis; Reflection; Observability; Profiling; Benchmarking; Dynamic program analysis; Bytecode instrumentation; Parallelization tuning; Dynamic compilation; Java Virtual Machine; Reducing measurement perturbation

Lay Summary (German)

Lead
Programme, die auf der Java Virtual Machine laufen, können auf eine Vielzahl an Mechanismen zur parallelen Ausführung zurückgreifen. Allerdings fehlen automatisierte Werkzeuge, um die Effizienz solcher paralleler Programme zu analysieren und zu verbessern. In diesem Projekt werden wir neuartige Techniken und Werkzeuge erforschen, die automatisch Effizienzprobleme paralleler Programme diagnostizieren und dem Entwickler konkrete Optimierungsvorschläge liefern.
Lay summary
Heutzutage verwenden Anwendungen, die auf der Java Virtual Machine (JVM) ausgeführt werden, eine vielfältige Kombination aus Datenverarbeitungs-Frameworks und nebenläufigen Datenstrukturen, wie z.B. parallele Streams, reaktive Streams und Kollektionen mit sicherer gleichzeitiger Nutzung durch mehrere Fäden. Dank dieser umfassenden Unterstützung ist die JVM zu einer populären Ausführungsplattform für parallele Anwendungen geworden, die in unterschiedlichen Programmiersprachen (z.B. Java, Scala, Kotlin) geschrieben sind.

Der erfolgreiche Einsatz eines großen Ökosystems, das parallele Programmierung und Mehrfädigkeit unterstützt, erfordert jedoch auch Werkzeuge, um die Effizienz einer parallelen Anwendung festzustellen und nützliche Optimierungen zu identifizieren. Während jedes Framework oder jede Datenstruktur für unterschiedliche Szenarien optimiert werden kann, ist die Auswahl des für bestimmte Anforderungen am besten geeigneten Frameworks oft schwierig und erfordert viel Erfahrung. Darüber hinaus erfordert eine gründliche Analyse der Effizienz einer parallen Anwendung die Sammlung und Auswertung von Metriken verschiedener Anwendungs- und Systemattribute, was häufig über das Fachwissen eines Entwicklers hinausgeht.

In diesem Projekt erforschen wir Techniken, um parallele Programme, die auf der JVM laufen, automatisch zu analysieren und dem Entwickler Optimierungen vorzuschlagen, welche die Effizienz der Programme verbessern können. Wir entwickeln Werkzeuge, die eine leicht verständliche Diagnose von Effizienzproblemen und deren Ursache automatisch erstellen, sowie konkrete Optimierungsvorschläge im Quellcode anzeigen. Dazu werden wir neuartige Profiling-Techniken entwickeln, die einen umfassenden Satz an Metriken sammeln, welche die Anwendungseffizienz charakterisieren. Wir sammeln statische und dynamische Informationen, um die Code-Teile, Framework-Einstellungen, sowie Konfigurationsparameter zu identifizieren, die geändert werden sollten, um die festgestellten Effizienzprobleme zu lösen, und empfehlen konkrete Optimierungen. Wir werden unsere Parallelisierungsoptimierung auf öffentlich verfügbaren, ausführbaren Code anwenden, damit möglichst viele Entwickler von unserer Forschung profitieren. Aus unserer Erfahrung werden wir allgemeine Muster identifizieren, die zu Leistungsproblemen führen, und Richtlinien für Entwickler ableiten, um solche Probleme zu vermeiden.

Die Techniken, die wir in diesem Projekt erforschen, werden helfen, den Aufwand für Optimierungen paralleler Programme zu reduzieren, sowie zu einer besseren Nutzung der Ressourcen moderner Computer-Systeme beitragen und deren Energieeffizienz verbessern. Sämtliche Software, die wir in diesem Projekt entwickeln, wird veröffentlicht und somit anderen Forschern zugänglich sein.
Direct link to Lay Summary Last update: 19.08.2020

Responsible applicant and co-applicants

Employees

Associated projects

Number Title Start Funding scheme
136225 FAN: Foundations of dynamic program ANalysis 01.04.2012 Sinergia

Abstract

Nowadays, applications running on the Java Virtual Machine (JVM) use a varied combination of data-processing frameworks and concurrent data structures, such as parallel streams, reactive streams, and thread-safe collections, which are offered by the Java class library and by many third-party libraries. Thanks to such an extensive support, the JVM has become a preferred execution platform for parallel applications written in different programming languages (e.g., Java, Scala, Kotlin).However, the availability of a large ecosystem supporting shared-memory, multi-threaded, parallel programming exacerbates the complexity of understanding the performance of a parallel application, detecting performance inefficiencies, and identifying useful optimizations. While each framework or data structure may be optimized for different scenarios, choosing the best one suitable for specific needs is a hard task, as the best choice may depend on the actual level of contention experienced in production settings, which often cannot be well estimated in the design phase. Moreover, a thorough analysis of contention requires the collection, correlation, and analysis of metrics on different application and system attributes at different layers of the system stack, which is often beyond the expertise of a developer.This project tackles this issue by proposing parallelization tuning, an approach to provide actionable profiles to developers that convey an easy-to-understand diagnosis of performance problems that would be otherwise hard to discover, their root causes, and concrete optimization suggestions at the source-code or framework level that can be applied also by non-experts. To achieve our challenging goal, we will explore novel profiling techniques across the whole system stack to gather a comprehensive set of dynamic metrics characterizing application performance. We will collect static and dynamic information to identify the code portions, framework settings, or system configurations that should be modified to solve the performance issues found, recommending concrete optimizations. To maximize the impact of our work, we will apply parallelization tuning to executable workloads in large open-source code repositories, such that our approach can be beneficial to many developers. From our experience, we will highlight common anti-patterns leading to performance problems and derive guidelines for developers to prevent such issues.We organize our research activities in two complementary, tied and challenging research areas, i.e., parallelization tuning for optimizing parallel stream processing, and parallelization tuning for reducing contention. In the first area, we will target key attributes of streams (such as Java 8 streams and reactive streams), which are increasingly used to perform parallel computations on large collections and datasets, but whose analysis and optimization have received little attention in the recent literature, with the consequence that their performance in parallel processing is largely unknown, and opportunities for related optimizations have been overlooked. In the second area, we will focus on concurrent accesses to shared mutable resources, such as thread-safe data structures. We will track, analyze, and quantify the contention caused by threads accessing shared resources, locate situations where contention causes performance issues, and suggest suitable optimizations. To this end, we will accurately monitor not only high-level operations (such as adding or removing data from thread-safe collections) but also low-level operations such as volatile field accesses, atomic operations, and memory barriers, thanks to an accurate collection of metrics from different layers of the system stack. To the best of our knowledge, such a comprehensive methodology is currently missing, which motivates our focus on it. We will integrate the results of the two research areas in a comprehensive toolchain that covers many aspects of parallelism, which will assist developers in optimizing their parallel applications.To enable parallelization tuning, it is important that the dynamic analyses (needed for collecting metrics and gathering information in actionable profiles) are accurate and efficient. Unfortunately, state-of-the-art JVMs suffer from limited observability, offering little support for accurate dynamic analysis. We will address this problem by introducing new features that will enhance JVM observability. We will design new methods for observing code generated by the dynamic compiler, to enable the collection of metrics otherwise impossible to profile. We will introduce new reflection mechanisms to speed up many dynamic analyses, including those required for parallelization tuning. We will devise a new software architecture and novel mechanisms for an efficient and scalable instrumentation engine, which will facilitate parallelization tuning on a large scale. We will reduce measurement perturbation by compensating in the profiles for the execution of inserted instrumentation code, thus improving the accuracy of analysis results and enable better tuning decision. All these innovations will be fundamental for enabling accurate and efficient parallelization tuning. Moreover, they will also benefit any analysis that requires minimum measurement perturbation or that needs to observe the code generated by the dynamic compiler.The results of this project promise high impact both in academia and in industry. Parallelization tuning will help improve the performance of parallel applications, resulting in savings in development costs for optimizations, in better utilization of modern multicore systems, and possibly in higher energy efficiency. Our innovations enhancing the observability of the JVM will increase the accuracy of existing analysis tools, enable new kinds of profilers, and significantly reduce resource consumption for instrumentation, which is essential for applying large-scale analyses. We expect that this fundamental research project will result in scientific publications in top-tier conferences and journals. To maximize the impact of our research, all produced software will be released and maintained as open-source software.
-