TL;DR
This paper introduces DAGViz, a novel tool for visualizing the execution of task-parallel programs as Directed Acyclic Graphs (DAGs). By providing a task-centric view, DAGViz helps developers understand performance bottlenecks that are hidden by the dynamic nature of task parallelism, offering a more insightful analysis than traditional thread-centric or hotspot methods.
What Problem Does This Paper Address?
Modern multi-core processors are increasingly parallel, pushing programmers towards task-parallel models that abstract away low-level threading details. While this simplifies programming, it introduces nondeterminism and makes it difficult to diagnose performance issues. Traditional analysis tools like hotspots (function-level CPU usage) and timelines (thread activity) are insufficient because they don't capture the dynamic dependencies and scheduling inherent in task parallelism. Programmers need a way to understand why their task-parallel programs perform suboptimally, especially when comparing different runtime systems.
Methods
The core of the solution is a two-part system:
- DAG Recorder: A lightweight wrapper that instruments task-parallel programs. It captures the program's execution trace and constructs a Directed Acyclic Graph (DAG) representing task dependencies. This wrapper supports multiple task-parallel runtimes (OpenMP, Cilk Plus, Intel TBB, Qthreads, MassiveThreads) by translating their primitives into a generic model. The DAG is stored in a file.
- DAGViz: A visualization tool that reads the DAG file. It leverages the hierarchical structure of the DAG for efficient storage and rendering, allowing it to handle very large DAGs. DAGViz provides an interactive, task-centric view where users can expand and contract nodes to explore the DAG at different levels of detail. It also includes an additional timeline visualization that correlates with the DAG structure to highlight low-parallelism areas.
Datasets
The paper evaluates DAGViz using programs from the Barcelona OpenMP Task Suite (BOTS) [4], a collection of benchmarks designed to test task parallelism. Specific benchmarks mentioned include Sort, Strassen, and SparseLU. The evaluation compares the performance of these benchmarks across five different task-parallel runtime systems.
Key Insights and Ideas
- Task-centric vs. Thread-centric: The paper argues that a task-centric view (DAG) is crucial for understanding task-parallel performance, as it reflects the program's logical structure, which is more stable across different runtime schedulers than thread activity.
- Hierarchical DAGs for Scalability: Representing DAGs hierarchically, with collective nodes summarizing subgraphs, is key to managing the potentially massive size of execution traces. This allows for on-demand loading and rendering, preventing memory overload.
- Bridging the Gap: DAGViz effectively bridges the gap between the programmer's logical view of parallelism and the runtime's dynamic execution, providing actionable insights into performance bottlenecks.
- Runtime System Differences: The case studies highlight how different runtime systems (e.g., work-first vs. help-first scheduling policies) can significantly impact performance for specific applications like SparseLU, and DAGViz helps visualize these differences.
Key Results
- DAGViz successfully visualizes task-parallel program traces as DAGs, providing a task-centric perspective.
- The tool's hierarchical layout and on-demand expansion/contraction enable visualization of large DAGs.
- Case studies on Sort and SparseLU demonstrated DAGViz's ability to identify performance bottlenecks, such as costly sequential memory copies in Sort and the impact of scheduling policies on SparseLU.
- The overhead of DAG Recorder was found to be within 10% for most programs when using MassiveThreads, indicating its feasibility for performance analysis.
Limitations and Future Work
- Limitations: The paper acknowledges that the profiling method requires users to rewrite their code using the generic primitives and recompile. While the wrapper minimizes this effort, it's still a necessary step. The current implementation focuses on task parallelism and may not directly address other forms of parallelism.
- Future Work: The authors plan to:
- Combine sampling-based measurement with instrumentation for better observation of long-running intervals.
- Incorporate hardware performance counters for richer performance analysis.
- Extend tracing capabilities to distributed-memory systems.
- Develop other types of visualizations based on the computation DAG.
Summary updated