# Comparing MapReduce and Pipeline Implementations for Counting Triangles

**Authors:** Edelmira Pasarella (Universitat Politecnica de Catalunya),, Maria-Esther Vidal (Fraunhofer IAIS), Cristina Zoltan (Universitat, Politecnica de Catalunya)

arXiv: 1701.03318 · 2017-01-13

## TL;DR

This paper introduces a dynamic pipeline approach as an alternative to MapReduce for parallel triangle counting in graphs, demonstrating improved efficiency especially on large, dense graphs through empirical evaluation.

## Contribution

The paper presents a novel dynamic pipeline method for divide and conquer parallelism, outperforming MapReduce in triangle counting tasks on large, dense graphs.

## Key findings

- Dynamic pipelines reduce execution time significantly on large, dense graphs.
- Empirical results favor dynamic pipelines over MapReduce for triangle counting.
- Go language implementation leverages channels and processes for efficiency.

## Abstract

A common method to define a parallel solution for a computational problem consists in finding a way to use the Divide and Conquer paradigm in order to have processors acting on its own data and scheduled in a parallel fashion. MapReduce is a programming model that follows this paradigm, and allows for the definition of efficient solutions by both decomposing a problem into steps on subsets of the input data and combining the results of each step to produce final results. Albeit used for the implementation of a wide variety of computational problems, MapReduce performance can be negatively affected whenever the replication factor grows or the size of the input is larger than the resources available at each processor. In this paper we show an alternative approach to implement the Divide and Conquer paradigm, named dynamic pipeline. The main features of dynamic pipelines are illustrated on a parallel implementation of the well-known problem of counting triangles in a graph. This problem is especially interesting either when the input graph does not fit in memory or is dynamically generated. To evaluate the properties of pipeline, a dynamic pipeline of processes and an ad-hoc version of MapReduce are implemented in the language Go, exploiting its ability to deal with channels and spawned processes. An empirical evaluation is conducted on graphs of different topologies, sizes, and densities. Observed results suggest that dynamic pipelines allows for an efficient implementation of the problem of counting triangles in a graph, particularly, in dense and large graphs, drastically reducing the execution time with respect to the MapReduce implementation.

## Full text

_Full body text omitted from this summary view._ Fetch the complete paper as Markdown: https://tomesphere.com/paper/1701.03318/full.md

## Figures

25 figures with captions in the complete paper: https://tomesphere.com/paper/1701.03318/full.md

## References

26 references — full list in the complete paper: https://tomesphere.com/paper/1701.03318/full.md

---
Source: https://tomesphere.com/paper/1701.03318