Elsevier

Future Generation Computer Systems

Volume 101, December 2019, Pages 804-818
Future Generation Computer Systems

TSH: Easy-to-be distributed partitioning for large-scale graphs

https://doi.org/10.1016/j.future.2019.06.033Get rights and content

Highlights

  • Re-formulate graph partitioning for efficient combination in Pregel-like systems.

  • Discover graph locality in many real-world graphs.

  • Design a distributed streaming graph partitioning algorithm based on locality.

Abstract

The big graph era is coming with strong and ever-growing demands on parallel iterative analysis. But, before that, balanced graph partitioning is a fundamental problem and is NP-complete. Till now, there have been several streaming heuristic solutions with a single full scan over the input graph. However, some of them cannot be easily parallelized to further accelerate partitioning for large-scale graphs due to complicated heuristics; while others can be run in parallel but incur expensive communication costs during iterative computation.

This paper presents Target-vertex Sensitive Hash (TSH), an easy-to-be distributed partitioning method. We first analyze the locality property naturally provided by the original input graph, which has not yet been considered by existing work. We then exploit such locality to simplify the heuristic rule. The simplified rule is implemented by a two-step framework where target vertices of edges are first logically pre-divided without accessing any graph data and then, based on the distribution of target vertices, streaming partitioning is physically performed in parallel. TSH provides the capability of quickly dividing large-scale graphs because of parallelization, as well as optimizes communication overheads due to the utilization of locality. Using a broad spectrum of real-world graphs, we conduct extensive performance studies to confirm the effectiveness of TSH over up-to-date competitors.

Introduction

Graphs have been studied in general applications in the cyber world, like intelligent transportation systems, social networks, bioinformatics, Internet, and scientific computation [1]. Many graph analysis algorithms are naturally iterative so as to refine the final solution step by step, such as PageRank, Shortest Path, and Connected Components. However, the graph data volume is increasingly growing, that poses great challenges to efficient iterative computation. For example, Google has indexed hundreds of billions of webpages.1 Until November 2017, there are over 2.07 billion monthly active users on Facebook.2 In order to handle such complex analysis over large graphs, distributed systems have been developed [2], [3], [4], [5], [6], [7], [8], [9], [10], all of which expose simple yet expressive APIs for easily programming various algorithms. Users can submit their own graph analysis jobs concurrently. Any job is typically processed by several workers in parallel which run on physical machines in a cloud computing cluster. That maximally unleashes the power of the given cluster.

Graph partitioning is a key component in all of the existing distributed systems. Distributed systems typically partition an input graph onto a group of workers as sub-graphs and then perform iterative update over them. More specifically, at each iteration, a graph algorithm exchanges intermediate results (also called messages) along edges. Then the number of cut edges across sub-graphs can reflect the network communication overhead to some extent and hence the computation efficiency. Also, the computation workload of each worker is supposed to be balanced. Otherwise, the slow, straggling worker can slow down the overall performance. Thus, as studied before, a high-quality partitioning method should decrease the number of cut edges, as well as balance the workload among subgraphs. However, besides the traditional quality factors mentioned above, now we also need to focus on the partitioning efficiency. Based on our experience, the available cloud compute resources usually dynamically change with the submission of graph jobs, and the addition and removal of physical machines. Most of systems, like Pregel [2] developed by Google, quantify available resources by worker slots. They typically provide a setWorkerNum API for users to flexibly set the number of workers when submitting their own jobs. The number of workers might not be a constant when running analysis jobs over the same graph but at different times. Therefore, graph partitioning is required by every job. That is, different jobs cannot share partitioning results to amortize partitioning costs. To summarize, balanced workload, optimized communication costs, and high partitioning efficiency, can improve the overall performance of iterative graph analysis, all of which should be considered when partitioning graphs.

However, graph partitioning is NP-complete [11], [12]. Existing heuristic solutions basically fall into two categories: offline represented by Metis [13] and streaming/online by LDG [14], Fennel [15] and FG [16]. Offline partitioning can significantly decrease the number of cut edges, and then optimize the communication overhead. It thereby attracts a lot of attention both in industry and in science. However, it requires to frequently traverse vertices, yielding expensive costs especially when processing large-scale graphs. Previous experiments have shown that the partitioning runtime may exceed the iterative computation runtime [15]. Hence, a cost-effective alternative is to accelerate the partitioning procedure by compromising the partitioning quality, i.e. streaming partitioning. It is completed by performing a single full pass over vertices and edges. This can be done along loading input graph. Hence, we also call it as online partitioning through this paper. However, streaming partitioning is usually run on a single machine so as to update heuristic information in a centralized fashion. That limits the scalability. Note that Hash as another streaming solution can be run in parallel but the quality is particularly poor in terms of communication optimization.

Hence, a naturally desirable goal for graph partitioning is to pursue a streaming mechanism that offers high partitioning quality and can be performed in an efficient distributed fashion. This paper explores a path to such a target. In particular, we re-define graph partitioning because most of Pregel-like systems have a built-in combination function to optimize communication overheads. That is, every worker combines messages sent to the same target vertex into a single one before flushing them. Communication overheads indeed are dominated by the number of messages after performing all possible combining operations. In another word, they depend on how many target vertices edges on each worker link to, instead of cut edges across workers. Existing definitions ignore the combining effect. The re-defined partitioning shifts the optimization core from cut edges to target vertices. Previous efforts have shown that the former cannot be optimized without high overheads. However, it is feasible for the latter. We discover that real-world graphs have some locality, that is, many outgoing edges from different source vertices usually link to common target vertices. By leveraging this locality, we design a Target-vertex Sensitive Hash (TSH) partitioning algorithm. Specifically, we assume that vertices as target vertices are pre-partitioned into disjoint subsets, each of which is associated with one sub-graph. Pre-partitioning is performed in a simple fashion for efficiency and the result is regarded as the heuristic rule. Accordingly, TSH can decide the placement of each vertex arriving in a streaming fashion to optimize the actual number of target vertices in all sub-graphs. But more importantly, it can be performed in parallel for efficiency since the heuristic rule has been fixed. Our experiments show that although the heuristic rule is not dynamically updated as traditional solutions, it still provides comparable communication optimization effect because of the locality property in real-world graphs.

The major contributions are summarized as below.

  • We re-formulate graph partitioning for Pregel-like systems by explicitly taking their built-in combining function into account. The new definition emphasizes decreasing the number of target vertices.

  • We discover the graph locality and our further investigation reveals that it exists in many real-world graphs.

  • Based on the re-formulated partitioning and the locality, we design a novel streaming partitioning algorithm TSH. It can be efficiently performed in a distributed fashion, as well as optimize the communication overheads across balanced sub-graphs.

  • Extensive experimental studies explore the performance features of our proposal. We demonstrate that TSH can offer comparable quality to the state-of-the-art centralized streaming partitioning solution but run faster than it.

The remainder of this paper is organized as follows. Section 2 provides necessary background regarding distributed graph processing systems and then formally gives the definition of graph partitioning. Section 3 introduces the graph locality and uses a lot of preliminary experimental results to show that it is widespread. Section 4 presents the details of our new partitioning algorithm TSH. Section 5 reports extensive evaluation results. Section 6 highlights related work. Finally, Section 7 concludes this paper.

Section snippets

Problem definition

This section first uses the Pregel system developed by Google to demonstrate how to perform iterative graph computation in parallel. We then re-formulate the goal of graph partitioning in our context.

Locality of real-world graphs

The complex relationship among real-world entities can be generally modeled by graphs with some locality. This section analyzes the locality and then demonstrates it over many real-world graphs. The locality is the foundation of our new partitioning solution introduced in Section 4.

Target-vertex sensitive hash partitioning

This paper proposes a Target-vertex Sensitive Hash (TSH) to parallelize streaming partitioning by leveraging the graph locality. We now formally give the heuristic rule, followed by its distributed implementation.

Performance studies

Now we study the performance of our proposals by comparing them with state-of-the-art partitioning techniques.

Compared Solutions: The main competitors include four well-known streaming methods: Hash, LDG [14], Fennel [15], and FG (Fractional Greedy) [16]. Hash is a fast distributed heuristic where workers load adjacency lists in parallel and then compute the target sub-graphs by taking the source vertex id of a list modulo K. By contrast, LDG, Fennel and FG are all centralized but employ

Related work

This section first lists representative Pregel-like systems and then summarizes existing partitioning techniques.

Conclusion

This paper investigates the problem of graph partitioning in Pregel-like systems. We re-define graph partitioning by emphasizing the importance of partitioning efficiency and reducing the number of target vertices in each sub-graph. We accordingly propose a new partitioning solution TSH to strike a good balance between partitioning quality and efficiency by leveraging the newly found graph locality feature. Extensive experiments confirm the effect of our method.

Declaration of Competing Interest

The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.

Acknowledgments

This work was supported by China Postdoctoral Science Foundation Grant (2019M652474 and 2019M652473) and the National Natural Science Foundation of China (61433008, 61872070, 61528203, and 61602103).

Ning Wang received her Ph.D. degree in computer software and theory from Northeastern University at China, in 2017. She is currently a lecturer at Ocean University of China. Her current research interest lies in data privacy protection and big data analytics.

References (49)

  • SalihogluS. et al.

    Gps: a graph processing system

  • J.E. Gonzalez, R.S. Xin, A. Dave, D. Crankshaw, M.J. Franklin, I. Stoica, Graphx: Graph processing in a distributed...
  • LowY. et al.

    Distributed graphlab: a framework for machine learning and data mining in the cloud

    PVLDB

    (2012)
  • BaoY. et al.

    BC-BSP: A BSP-based parallel iterative processing system for big data on cloud architecture

  • WangZ. et al.

    Hybrid pulling/pushing for I/O-efficient distributed and iterative graph computing

  • WangZ. et al.

    A fault-tolerant framework for asynchronous iterative computations in cloud environments

    IEEE Trans. Parallel Distrib. Syst.

    (2018)
  • AndreevK. et al.

    Balanced graph partitioning

  • MichaelR.G. et al.

    Computers and Intractability: A Guide to the Theory of NP-completeness

    (1979)
  • StantonI. et al.

    Streaming graph partitioning for large distributed graphs

  • TsourakakisC. et al.

    Fennel: streaming graph partitioning for massive scale graphs

  • EchbarthiG. et al.

    Fractional greedy and partial restreaming partitioning: new methods for massive graph partitioning

  • Apache Hadoop....
  • S. Thomas, W. Dorothea, Finding, counting and listing all triangles in large graphs, an experimental study, in: Proc....
  • NajorkM. et al.

    Breadth-first crawling yields high-quality pages

  • Cited by (8)

    Ning Wang received her Ph.D. degree in computer software and theory from Northeastern University at China, in 2017. She is currently a lecturer at Ocean University of China. Her current research interest lies in data privacy protection and big data analytics.

    Zhigang Wang received the Ph.D. degree in computer software and theory from Northeastern University, China, in 2018. He is currently a lecturer at Ocean University of China. He has been a visiting PhD student in University of Massachusetts Amherst during December 2014 to December 2016. His research interests include cloud computing, distributed graph processing and machine learning.

    Yu Gu received the Ph.D. degree in computer software and theory from Northeastern University, China, in 2010. Currently, he is a professor and the PhD supervisor at Northeastern University, China. His current research interests include big data analysis, spatial data management and graph data management. He is a senior member of the China Computer Federation (CCF).

    Yubin Bao received the Ph.D. degree in computer software and theory from Northeastern University, China, in 2003. Currently, he is a professor at Northeastern University, China. His current research interests include data warehouse and OLAP, graph data management, and cloud computing. He is a senior member of the China Computer Federation (CCF).

    Ge Yu received the Ph.D. degree in computer science from Kyushu University of Japan, in 1996. He is currently a professor and the PhD supervisor at Northeastern University of China. His research interests include distributed and parallel database, OLAP and data warehousing, data integration, graph data management, etc. He is a member of the IEEE Computer Society, IEEE, ACM, and a Fellow of the China Computer Federation (CCF).

    View full text