Constraint Programming 1. Introduction MapReduced 2. Related Work - - PowerPoint PPT Presentation

constraint programming
SMART_READER_LITE
LIVE PREVIEW

Constraint Programming 1. Introduction MapReduced 2. Related Work - - PowerPoint PPT Presentation

Constraint Programming MapReduced Nikolaos Pothitos, Panagiotis Stamatopoulos Constraint Programming 1. Introduction MapReduced 2. Related Work 3. Our Search Tree Partitioning Schema Nikolaos Pothitos Panagiotis Stamatopoulos


slide-1
SLIDE 1

Constraint Programming MapReduce’d Nikolaos Pothitos, Panagiotis Stamatopoulos

  • 1. Introduction
  • 2. Related Work
  • 3. Our Search

Tree Partitioning Schema

  • 4. Experiments

Constraint Programming MapReduce’d

Nikolaos Pothitos Panagiotis Stamatopoulos

Department of Informatics and Telecommunications National and Kapodistrian University of Athens

1/20

slide-2
SLIDE 2

Constraint Programming MapReduce’d Nikolaos Pothitos, Panagiotis Stamatopoulos

  • 1. Introduction
  • 2. Related Work
  • 3. Our Search

Tree Partitioning Schema

  • 4. Experiments

Outline

  • 1. Introduction

◮ MapReduce ◮ Constraint Programming

  • 2. Related Work

◮ Search Tree Partitioning

  • 3. Our Search Tree Partitioning Schema
  • 4. Experiments etc.

2/20

slide-3
SLIDE 3

Constraint Programming MapReduce’d Nikolaos Pothitos, Panagiotis Stamatopoulos

  • 1. Introduction
  • 2. Related Work
  • 3. Our Search

Tree Partitioning Schema

  • 4. Experiments

MapReduce Word-Count Application

◮ We are given a large text ◮ Count each word’s occurrences ◮ Workers

◮ Are either Mappers or Reducers ◮ Distributed or run in parallel 3/20

slide-4
SLIDE 4

Constraint Programming MapReduce’d Nikolaos Pothitos, Panagiotis Stamatopoulos

  • 1. Introduction
  • 2. Related Work
  • 3. Our Search

Tree Partitioning Schema

  • 4. Experiments

MapReduce Word-Count Application

◮ Each Mapper assigned a text part ◮ Mapper’s output: key, result tuples ◮ Each key, result sent to a Reducer ◮ A Reducer processes all the tuples with the same key

4/20

slide-5
SLIDE 5

Constraint Programming MapReduce’d Nikolaos Pothitos, Panagiotis Stamatopoulos

  • 1. Introduction
  • 2. Related Work
  • 3. Our Search

Tree Partitioning Schema

  • 4. Experiments

MapReduce Word-Count Example

◮ Let the input content be

◮ “design is not just what it looks and it feels like; design

is how it works” ◮ Text distributed to two Mappers

  • 1. “design is not just what it looks and it feels like”
  • 2. “design is how it works”

◮ Mappers’ output (word counters)

  • 1. design, 1, is, 1, not, 1, just, 1, what, 1, it, 2,

looks, 1, and, 1, feels, 1, like, 1.

  • 2. design, 1, is, 1, how, 1, it, 1, works, 1.

◮ Each key corresponds to a Reducer ◮ Two Reducers’ output (word counters)

  • 1. and, 1, design, 2, feels, 1, how, 1, is, 2, it, 3,

just, 1, like, 1, looks, 1.

  • 2. not, 1, what, 1, works, 1.

5/20

slide-6
SLIDE 6

Constraint Programming MapReduce’d Nikolaos Pothitos, Panagiotis Stamatopoulos

  • 1. Introduction
  • 2. Related Work
  • 3. Our Search

Tree Partitioning Schema

  • 4. Experiments

Constraint Programming

◮ Constraint Programming includes two phases

  • 1. The Constraint Satisfaction Problem definition
  • 2. The CSP independent solution phase

6/20

slide-7
SLIDE 7

Constraint Programming MapReduce’d Nikolaos Pothitos, Panagiotis Stamatopoulos

  • 1. Introduction
  • 2. Related Work
  • 3. Our Search

Tree Partitioning Schema

  • 4. Experiments

Solution Phase

◮ Includes a search tree exploration ◮ Search trees can be huge ◮ Parallelization of exploration is necessary

7/20

slide-8
SLIDE 8

Constraint Programming MapReduce’d Nikolaos Pothitos, Panagiotis Stamatopoulos

  • 1. Introduction
  • 2. Related Work
  • 3. Our Search

Tree Partitioning Schema

  • 4. Experiments

Related Work

◮ Work Stealing ◮ SelfSplit ◮ Embarrassingly Parallel Search

8/20

slide-9
SLIDE 9

Constraint Programming MapReduce’d Nikolaos Pothitos, Panagiotis Stamatopoulos

  • 1. Introduction
  • 2. Related Work
  • 3. Our Search

Tree Partitioning Schema

  • 4. Experiments

An Ordinary Search Tree

1 2 13 18 24 3 9 14 19 23 25 31 4 7 10 15 20 26 28 32 34 5 6 8 11 12 16 17 21 22 27 29 30 33 35 36

9/20

slide-10
SLIDE 10

Constraint Programming MapReduce’d Nikolaos Pothitos, Panagiotis Stamatopoulos

  • 1. Introduction
  • 2. Related Work
  • 3. Our Search

Tree Partitioning Schema

  • 4. Experiments

A Top-Down Search Tree Splitting

1 2 13 18 24 3 9 14 19 23 25 31 4 7 10 15 20 26 28 32 34 5 6 8 11 12 16 17 21 22 27 29 30 33 35 36

10/20

slide-11
SLIDE 11

Constraint Programming MapReduce’d Nikolaos Pothitos, Panagiotis Stamatopoulos

  • 1. Introduction
  • 2. Related Work
  • 3. Our Search

Tree Partitioning Schema

  • 4. Experiments

Optimum Search Tree Nodes Splitting

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36

11/20

slide-12
SLIDE 12

Constraint Programming MapReduce’d Nikolaos Pothitos, Panagiotis Stamatopoulos

  • 1. Introduction
  • 2. Related Work
  • 3. Our Search

Tree Partitioning Schema

  • 4. Experiments

Sampling Search Tree Nodes Series

1 2 3 4 5 6 7 8 9 10 13 14 18 21 24 25 26 28 29 30 31

◮ The starred nodes are sampled ◮ Their subtrees are also sampled ◮ We can easily split them ◮ without visiting them all

12/20

slide-13
SLIDE 13

Constraint Programming MapReduce’d Nikolaos Pothitos, Panagiotis Stamatopoulos

  • 1. Introduction
  • 2. Related Work
  • 3. Our Search

Tree Partitioning Schema

  • 4. Experiments

Experiments

◮ Cluster creation in the cloud ◮ in ~okeanos GRnet cloud infrastructure ◮ Hadoop installed in eight VMs ◮ One master and seven slaves ◮ VMs equivalent to commodity machines

13/20

slide-14
SLIDE 14

Constraint Programming MapReduce’d Nikolaos Pothitos, Panagiotis Stamatopoulos

  • 1. Introduction
  • 2. Related Work
  • 3. Our Search

Tree Partitioning Schema

  • 4. Experiments

N Queens

◮ Attempt to gather all solutions

◮ 2,279,184 solutions for 15 Queens ◮ 14,772,512 solutions for 16 Queens ◮ 95,815,104 solutions for 17 Queens 14/20

slide-15
SLIDE 15

Constraint Programming MapReduce’d Nikolaos Pothitos, Panagiotis Stamatopoulos

  • 1. Introduction
  • 2. Related Work
  • 3. Our Search

Tree Partitioning Schema

  • 4. Experiments

Speedup for N Queens

4 5 6 7 32 64 128 256 512 15 Queens 9 12 15 18 32 64 128 256 512 16 Queens 8 16 24 32 32 64 128 256 512 17 Queens Speedup Mappers

15/20

slide-16
SLIDE 16

Constraint Programming MapReduce’d Nikolaos Pothitos, Panagiotis Stamatopoulos

  • 1. Introduction
  • 2. Related Work
  • 3. Our Search

Tree Partitioning Schema

  • 4. Experiments

Mappers Run Simultaneously

◮ Each machine has eight cores ◮ Each core cannot execute two Mappers simultaneously ◮ At most 64 Mappers run simultaneously ◮ We may spawn more than 64 Mappers

16/20

slide-17
SLIDE 17

Constraint Programming MapReduce’d Nikolaos Pothitos, Panagiotis Stamatopoulos

  • 1. Introduction
  • 2. Related Work
  • 3. Our Search

Tree Partitioning Schema

  • 4. Experiments

N Number Partitioning

◮ Split the set {1, 2, . . . , N} ◮ The two splits are disjoint ◮ with equal cardinality and ◮

  • i∈S1

i =

  • i∈S2

i

  • i∈S1

i2 =

  • i∈S2

i2

17/20

slide-18
SLIDE 18

Constraint Programming MapReduce’d Nikolaos Pothitos, Panagiotis Stamatopoulos

  • 1. Introduction
  • 2. Related Work
  • 3. Our Search

Tree Partitioning Schema

  • 4. Experiments

Speedup for N Number Partitioning

4 5 6 7 8 32 64 128 256 512 N =40 Partitioning 10 15 20 25 32 64 128 256 512 N =44 Partitioning 8 16 24 32 40 32 64 128 256 512 N =48 Partitioning Speedup Mappers

18/20

slide-19
SLIDE 19

Constraint Programming MapReduce’d Nikolaos Pothitos, Panagiotis Stamatopoulos

  • 1. Introduction
  • 2. Related Work
  • 3. Our Search

Tree Partitioning Schema

  • 4. Experiments

Conclusions and Future Work

◮ Constraint Programming to MapReduce adaptation ◮ MapReduce parallelization/distribution capabilities

exploitation

◮ Tree sampling vs. top-down splitting ◮ In future, investigate Constraint Optimization ◮ Reducers will gather best solutions

19/20

slide-20
SLIDE 20

Constraint Programming MapReduce’d Nikolaos Pothitos, Panagiotis Stamatopoulos

  • 1. Introduction
  • 2. Related Work
  • 3. Our Search

Tree Partitioning Schema

  • 4. Experiments

References

  • J. Dean and S. Ghemawat.

MapReduce: Simplified data processing on large clusters. In OSDI 2004, pages 137–149, 2004. J.-C. R´ egin, M. Rezgui, and A. Malapert. Embarrassingly parallel search. In C. Schulte, editor, CP 2013, volume 8124 of LNCS, pages 596–610. Springer, Berlin Heidelberg, 2013.

  • G. Chu, C. Schulte, and P. J. Stuckey.

Confidence-based work stealing in parallel constraint programming. In I. P. Gent, editor, CP 2009, volume 5732 of LNCS, pages 226–241. Springer, Berlin Heidelberg, 2009.

20/20