out-of-core gpu memory management for mapreduce-based large-scale graph processing

47
Outofcore GPU Memory Management for MapReduce based Largescale Graph Processing Koichi Shirahata , Hitoshi Sato, Satoshi Matsuoka Tokyo Ins5tute of Technology CREST, Japan Science and Technology Agency 1

Upload: koichi-shirahata

Post on 16-Jul-2015

52 views

Category:

Technology


0 download

TRANSCRIPT

Out-­‐of-­‐core  GPU  Memory  Management  for  MapReduce-­‐

based  Large-­‐scale  Graph  Processing

Koichi  Shirahata,  Hitoshi  Sato,  Satoshi  Matsuoka    

Tokyo  Ins5tute  of  Technology  CREST,  Japan  Science  and  Technology  Agency  

1

Fast  Large-­‐scale  Graph  Processing    using  HPC

•  Emergence  of  large-­‐scale  graphs  –  SNS,  road  network,  smart  grid,  etc.  – millions  to  trillions  of  ver5ces/edges  

•  e.g.)  a  social  friend  network:  1.31  billion                      ver5ces,  170  billion  edges  

– Need  for  fast  graph  processing  on  supercomputers  •  Graph  processing  on  supercomputers  – A  wide  range  of  applica5ons  is  accelerated  using  supercomputers  (e.g.  physical  simula5ons)  

– Graph  processing  is  also  considered  an  important  applica5on  on  supercomputers  •  Graph500  benchmark  is  started  from  2010  

2

Large-­‐scale  Graph  Processing  on  Heterogeneous  Supercomputers

•  GPU-­‐based  heterogeneous    supercomputers  –  e.g.)  Titan,  TSUBAME2.5  – High  compu5ng  and  memory    performance  

→  Fast  large-­‐scale  graph  processing  on  heterogeneous  supercomputers    

•  Problem:  GPU  memory  capacity  limits  scalable  large-­‐scale  graph  processing  –  Large-­‐scale  data,  while  GPU  memory  capacity  is  small  

•  e.g.)  TSUBAME2.5:  GPU  6GB  (x3),  CPU  54GB  3

Contribu5ons •  Out-­‐of-­‐core  GPU  memory  management  for  MapReduce-­‐based  graph  processing  –  Introduce  out-­‐of-­‐core  GPU  data  management  techniques  for  GPU-­‐MapReduce-­‐based  large-­‐scale  graph  processing  

–  Implement  out-­‐of-­‐core  GPU  sor5ng  •  Incorporated  in  our  GPU-­‐MapReduce  implementa5on  

–  Inves5gate  the  balance  of  scale-­‐up  and  scale-­‐out  approaches  •  Changing  the  number  of  GPUs  per  node  for  processing  graph  data  

Performance  on  TSUBAME2.5  and  TSUBAME-­‐KFC

•  2.10x  speedup  than  CPUs  on  3072  GPUs  •  1.71x  power  efficiency  by  scale-­‐up  strategy    

4

Table  of  Contents

1.  Introduc5on  2.  Background  3.  Out-­‐of-­‐core  GPU  memory  management  4.  Experiments  5.  Conclusion

5

•  Generalized  IteraRve  Matrix-­‐Vector  mulRplicaRon*1  –  Graph  applica5ons  are  implemented  by  defining  3  func5ons  

•  PageRank,  Random  Walk  with  Restart,  Connected  Components  etc.  –  v’  =  M  ×G  v      where    

         v’i  =  Assign(vj  ,  CombineAllj  ({xj  |  j  =  1..n,  xj  =  Combine2(mi,j,  vj)}))    (i  =  1..n)  

 

Large  graph  processing  algorithm  GIM-­‐V

*1  :  Kang,  U.  et  al,  “PEGASUS:  A  Peta-­‐Scale  Graph  Mining  System-­‐  Implementa5on    and  Observa5ons”,  IEEE  INTERNATIONAL  CONFERENCE  ON  DATA  MINING  2009

×G V

M = V’

6

•  Generalized  IteraRve  Matrix-­‐Vector  mulRplicaRon*1  –  Graph  applica5ons  are  implemented  by  defining  3  func5ons  

•  PageRank,  Random  Walk  with  Restart,  Connected  Components  etc.  –  v’  =  M  ×G  v      where    

         v’i  =  Assign(vj  ,  CombineAllj  ({xj  |  j  =  1..n,  xj  =  Combine2(mi,j,  vj)}))    (i  =  1..n)  

 

Large  graph  processing  algorithm  GIM-­‐V

*1  :  Kang,  U.  et  al,  “PEGASUS:  A  Peta-­‐Scale  Graph  Mining  System-­‐  Implementa5on    and  Observa5ons”,  IEEE  INTERNATIONAL  CONFERENCE  ON  DATA  MINING  2009

×G V

M

Combine2

= V’

7

•  Generalized  IteraRve  Matrix-­‐Vector  mulRplicaRon*1  –  Graph  applica5ons  are  implemented  by  defining  3  func5ons  

•  PageRank,  Random  Walk  with  Restart,  Connected  Components  etc.  –  v’  =  M  ×G  v      where    

         v’i  =  Assign(vj  ,  CombineAllj  ({xj  |  j  =  1..n,  xj  =  Combine2(mi,j,  vj)}))    (i  =  1..n)  

 

Large  graph  processing  algorithm  GIM-­‐V

*1  :  Kang,  U.  et  al,  “PEGASUS:  A  Peta-­‐Scale  Graph  Mining  System-­‐  Implementa5on    and  Observa5ons”,  IEEE  INTERNATIONAL  CONFERENCE  ON  DATA  MINING  2009

×G V

M CombineAll

Combine2

= V’

8

•  Generalized  IteraRve  Matrix-­‐Vector  mulRplicaRon*1  –  Graph  applica5ons  are  implemented  by  defining  3  func5ons  

•  PageRank,  Random  Walk  with  Restart,  Connected  Components  etc.  –  v’  =  M  ×G  v      where    

         v’i  =  Assign(vj  ,  CombineAllj  ({xj  |  j  =  1..n,  xj  =  Combine2(mi,j,  vj)}))    (i  =  1..n)  

 

Large  graph  processing  algorithm  GIM-­‐V

*1  :  Kang,  U.  et  al,  “PEGASUS:  A  Peta-­‐Scale  Graph  Mining  System-­‐  Implementa5on    and  Observa5ons”,  IEEE  INTERNATIONAL  CONFERENCE  ON  DATA  MINING  2009

×G V

M CombineAll

Combine2

= V’

Assign

9

•  Generalized  IteraRve  Matrix-­‐Vector  mulRplicaRon*1  –  Graph  applica5ons  are  implemented  by  defining  3  func5ons  

•  PageRank,  Random  Walk  with  Restart,  Connected  Components  etc.  –  v’  =  M  ×G  v      where    

         v’i  =  Assign(vj  ,  CombineAllj  ({xj  |  j  =  1..n,  xj  =  Combine2(mi,j,  vj)}))    (i  =  1..n)  

 

Large  graph  processing  algorithm  GIM-­‐V

*1  :  Kang,  U.  et  al,  “PEGASUS:  A  Peta-­‐Scale  Graph  Mining  System-­‐  Implementa5on    and  Observa5ons”,  IEEE  INTERNATIONAL  CONFERENCE  ON  DATA  MINING  2009

×G V

M CombineAll

Combine2

= V’

Assign

10

GIM-­‐V  can  be  implemented  by  2-­‐stage  MapReduce  •  Stage  1:    Combine2  •  Stage  2:    CombineAll,  Assign  →  Implement  on  our  GPU  MapReduce  framework  

Graph  ApplicaRon  PageRank  

Graph  Algorithm  MulR-­‐GPU  GIM-­‐V MapReduce  Framework  MulR-­‐GPU  Mars

PlaXorm  CUDA,  MPI

Implement  GIM-­‐V  on  mulR-­‐GPUs  MapReduce  -­‐  Op5miza5on  for  GIM-­‐V  -­‐  Load  balance  op5miza5on  

Extend  exisRng  GPU  MapReduce  framework  (Mars)  for  mulR-­‐GPU  

[1]:  K.  Shirahata  et  al.,  “A  Scalable  Implementa5on  of  a  MapReduce-­‐based  Graph  Processing  Algorithm  for    Large-­‐scale  Heterogeneous  Supercomputers”,  IEEE/ACM  CCGrid,  2013  

Previous  work:  Mul5-­‐GPU-­‐MapReduce-­‐based  Graph  Processing  [1]  

11

0  10  20  30  40  50  60  70  80  90  100  

0   50   100   150   200   250   300  

MEgde

s  /  se

c

#  Compute  Nodes

MarsGPU-­‐1  MarsGPU-­‐2  MarsGPU-­‐3  MarsCPU  

SCALE  30

SCALE  29

SCALE  28

SCALE  27 1.52x  speedup  (3  GPU  v  CPU)

Problems  on  Large-­‐scale  Graph  Processing  on  GPU

•  How  to  manage  graph  data  whose  size  exceeds  GPU  memory  capacity  ?  – Handling  memory  overflow  from  GPU  memory  with  minimal  performance  overhead  •  GPU  memory  capacity  is  smaller  than  CPU  memory    •  Data  transfers  dominantly  disturb  efficient  graph  processing  –  e.g.)  TSUBAME2.5:    GPU  250  GB/sec,  CPU-­‐GPU  8  GB/sec  

– Efficient  graph  data  assignment  onto  GPUs  •  Tradeoff  between  using  single  GPU  on  mul5ple  nodes  (scale-­‐out)  or  using  mul5ple  GPUs  per  node  (scale-­‐up)    in  terms  of  performance  and  power  efficiencies  

12

Exis5ng  Solu5ons •  Handling  memory  overflow  from  GPU  memory  – Using  mul5ple  GPUs  

•  GPU-­‐MapReduce-­‐based  graph  processing  [Shirahata  et  al.  2013]  •  Breadth  first  search  on  Mul5-­‐GPU  [Ueno  et  al.  2013]  

       →  Not  consider  memory  overflow  from  GPU  memory  – Offloading  graph  data  onto  CPU  memory  

•  GPUfs:  I/O  from  a  GPU  to  file  systems  [Silberstein  et  al.  2013]  •  GPMR:  a  mul5-­‐GPU  MapReduce  library  [Stuart  et  al.  2011]  

         →  Not  experiment  on  realis5c  large-­‐scale  applica5ons  •  Analysis  of  tradeoff  between  scale-­‐up  and  scale-­‐out  –  Scale-­‐up  and  Scale-­‐out  on  CPUs  [Michael  et  al.  2007]          →  Not  compare  on  GPUs  

13

Idea:  Streaming-­‐based  Out-­‐of-­‐core  GPU  Memory  Management

•  Streaming  out-­‐of-­‐core  GPU  memory  management  – Divide  graph  data  into  mul5ple  chunks  and  assigning  each  chunk  one  by  one  in  each  CUDA  stream  

– Hide  CPU-­‐GPU  data  transfer  by  applying  overlapping  techniques  between  computa5on  and  data  transfer  

•  GPU-­‐based  external  sor5ng  –  Employ  sample-­‐based  out-­‐of-­‐core  GPU  sor5ng    – Out-­‐of-­‐core  GPU  sor5ng  is  conducted  when  graph  data  size  exceeds  GPU  memory  capacity  

14

Out-­‐of-­‐core  GPU  Memory  Management    for  MapReduce-­‐based  Graph  Processing

Map

Reduce

Map

Reduce

Map

Reduce

Map

Reduce

Shuffle Shuffle

Sort Sort

Scan

Ini5aliza5on

Opera5on  on  GPU

Opera5on  on  GPU

GPU CPU Memcpy  (H2D,  D2H) Processing  for  each  chunk

•  Out-­‐of-­‐core  GPU  memory  management  –  Stream-­‐based  GPU  MapReduce  processing  –  Out-­‐of-­‐core  GPU  sor5ng  

15

Out-­‐of-­‐core  GPU  Memory  Management    for  MapReduce-­‐based  Graph  Processing

Map

Reduce

Map

Reduce

Map

Reduce

Map

Reduce

Shuffle Shuffle

Sort Sort

Scan

Ini5aliza5on

Opera5on  on  GPU

Opera5on  on  GPU

GPU CPU Memcpy  (H2D,  D2H) Processing  for  each  chunk

•  Out-­‐of-­‐core  GPU  memory  management  –  Stream-­‐based  GPU  MapReduce  processing  –  Out-­‐of-­‐core  GPU  sor5ng  

16

Stream-­‐based  GPU  MapReduce  Processing  

•  Overlap  three  opera5ons  –  Copy  CPU  →  GPU,  Map/Reduce  opera5on  on  GPU,  Copy  GPU  →  CPU  

•  Dynamically  update  the  number  of  chunks  (d)  to  fit  on  GPU  memory  

Stream  0 Stream  1 Stream  2

CPU  →  GPU

CPU  →  GPU

CPU  →  GPU

Comp.  on  GPU

Comp.  on  GPU

Comp.  on  GPU

GPU  →  CPU

GPU  →  CPU

GPU  →  CPU

CPU  →  GPU

CPU  →  GPU

CPU  →  GPU

Comp.  on  GPU

Comp.  on  GPU

Comp.  on  GPU

GPU  →  CPU

GPU  →  CPU

GPU  →  CPU

Time

Input  chunk Input  chunk d    chunks

s    streams

STEP  1

STEP  2

STEP  3

17

Out-­‐of-­‐core  GPU  Memory  Management    for  MapReduce-­‐based  Graph  Processing

Map

Reduce

Map

Reduce

Map

Reduce

Map

Reduce

Shuffle Shuffle

Sort Sort

Scan

Ini5aliza5on

Opera5on  on  GPU

Opera5on  on  GPU

GPU CPU Memcpy  (H2D,  D2H) Processing  for  each  chunk

•  Out-­‐of-­‐core  GPU  memory  management  –  Stream-­‐based  GPU  MapReduce  processing  –  Out-­‐of-­‐core  GPU  sor5ng  

18

Out-­‐of-­‐core  GPU  Sor5ng •  Use  sample-­‐based  out-­‐of-­‐core  sor5ng  [1]  

–  Divide  input  data  into  chunks  and  split  each  chunk  using  spliuers  –  Improve  by  decreasing  the  number  of  CPU-­‐GPU  data  transfers  

•  Thrust  radix  sort  is  used  for  in-­‐core  sor5ng  

CPU GPU STEP  1

STEP  3

GPU

STEP  4

d    chunks

19

STEP  2

[1]:  Y.  Ye  et  al.,  “GPUMemSort:  A  High  Performance  Graphics  Co-­‐processors  Sor5ng  Algorithm  for  Large                  Scale  In-­‐Memory  Data”,  GSTF  Interna5onal  Journal  on  Compu5ng,  2011  

Op5miza5on  Techniques •  Data  structure  –  Employ  a  compact  data  structure  similar  to  CSR  for  sparse  matrix  formats  •  Arrays  of  keys,  values  →  arrays  of  unique  keys,  values  •  Compress  duplicate  keys  to  1/{#edges  per  vertex}  •  Sort  key-­‐value  →  scan  (prefix  sum)  →  compact  keys  

•  Shuffle  –  Implement  range-­‐based  and  hash-­‐based  spliuers  – Use  range-­‐based  spliuer,  which  performs  good  load  balance  by  randomizing  vertex  indices  

•  Thread  assignment  policy  on  GPU  – Apply  warp-­‐based  assignment  

20

Op5miza5on  Techniques •  Data  structure  –  Employ  a  compact  data  structure  similar  to  CSR  for  sparse  matrix  formats  •  Arrays  of  keys,  values  →  arrays  of  unique  keys,  values  •  Compress  duplicate  keys  to  1/{#edges  per  vertex}  •  Sort  key-­‐value  →  scan  (prefix  sum)  →  compact  keys  

•  Shuffle  –  Implement  range-­‐based  and  hash-­‐based  spliuers  – Use  range-­‐based  spliuer,  which  performs  good  load  balance  by  randomizing  vertex  indices  

•  Thread  assignment  policy  on  GPU  – Apply  warp-­‐based  assignment  

21

Thread  Assignment  Op5miza5on  •  Three  thread  assignment  policies  

–  Thread-­‐based  assignment:  assign  one  thread  per  vertex  –  Warp-­‐based  assignment:  assign  one  warp  per  vertex  (32  on  K20x  GPU)  –  Thread  block-­‐based  assignment:  assign  one  thread  block  per  vertex  

(1024  on  K20x  GPU)  →  Apply  warp-­‐based  2D  thread  mapping,  since  warp  size  is  expected              to  be  close  to  the  average  number  of  edges  per  vertex  

x� x�

x� x� x� x� x�

x�

x� x�

x� x� x� x� x� x� x�

x� x� x�

�� "

�%�

������

&���

��

�������� ����$��#������

� ��� ����������

�� ���'�����

%�����'� ��������"�

�� ���� �� ����

x�

x�

x�

x�

x�

x�

��&� $��#�!� 22

Thread  Assignment  Op5miza5on  •  Three  thread  assignment  policies  

–  Thread-­‐based  assignment:  assign  one  thread  per  vertex  –  Warp-­‐based  assignment:  assign  one  warp  per  vertex  (32  on  K20x  GPU)  –  Thread  block-­‐based  assignment:  assign  one  thread  block  per  vertex  

(1024  on  K20x  GPU)  →  Apply  warp-­‐based  2D  thread  mapping,  since  warp  size  is  expected              to  be  close  to  the  average  number  of  edges  per  vertex  

x� x�

x� x� x� x� x�

x�

x� x�

x� x� x� x� x� x� x�

x� x� x�

�� "

�%�

������

&���

��

�������� ����$��#������

� ��� ����������

�� ���'�����

%�����'� ��������"�

�� ���� �� ����

x�

x�

x�

x�

x�

x�

��&� $��#�!� 23

blockDim.x  +  

gridDim.x  

Iterate

Thread  Assignment  Op5miza5on  •  Three  thread  assignment  policies  

–  Thread-­‐based  assignment:  assign  one  thread  per  vertex  –  Warp-­‐based  assignment:  assign  one  warp  per  vertex  (32  on  K20x  GPU)  –  Thread  block-­‐based  assignment:  assign  one  thread  block  per  vertex  

(1024  on  K20x  GPU)  →  Apply  warp-­‐based  2D  thread  mapping,  since  warp  size  is  expected              to  be  close  to  the  average  number  of  edges  per  vertex  

x� x�

x� x� x� x� x�

x�

x� x�

x� x� x� x� x� x� x�

x� x� x�

�� "

�%�

������

&���

��

�������� ����$��#������

� ��� ����������

�� ���'�����

%�����'� ��������"�

�� ���� �� ����

x�

x�

x�

x�

x�

x�

��&� $��#�!� 24

BlockDim.x  

blockDim.y  +  

gridDim.x  

Iterate

Thread  Assignment  Op5miza5on  •  Three  thread  assignment  policies  

–  Thread-­‐based  assignment:  assign  one  thread  per  vertex  –  Warp-­‐based  assignment:  assign  one  warp  per  vertex  (32  on  K20x  GPU)  –  Thread  block-­‐based  assignment:  assign  one  thread  block  per  vertex  

(1024  on  K20x  GPU)  →  Apply  warp-­‐based  2D  thread  mapping,  since  warp  size  is  expected              to  be  close  to  the  average  number  of  edges  per  vertex  

x� x�

x� x� x� x� x�

x�

x� x�

x� x� x� x� x� x� x�

x� x� x�

�� "

�%�

������

&���

��

�������� ����$��#������

� ��� ����������

�� ���'�����

%�����'� ��������"�

�� ���� �� ����

x�

x�

x�

x�

x�

x�

��&� $��#�!� 25

gridDim.x  

BlockDim.x    

Thread  Assignment  Op5miza5on  •  Three  thread  assignment  policies  

–  Thread-­‐based  assignment:  assign  one  thread  per  vertex  –  Warp-­‐based  assignment:  assign  one  warp  per  vertex  (32  on  K20x  GPU)  –  Thread  block-­‐based  assignment:  assign  one  thread  block  per  vertex  

(1024  on  K20x  GPU)  →  Apply  warp-­‐based  2D  thread  mapping,  since  warp  size  is  expected              to  be  close  to  the  average  number  of  edges  per  vertex  

x� x�

x� x� x� x� x�

x�

x� x�

x� x� x� x� x� x� x�

x� x� x�

�� "

�%�

������

&���

��

�������� ����$��#������

� ��� ����������

�� ���'�����

%�����'� ��������"�

�� ���� �� ����

x�

x�

x�

x�

x�

x�

��&� $��#�!� 26

BlockDim.x  

blockDim.y  +  

gridDim.x  

Iterate

Experiments

•  Methods  – A  single  round  of  itera5ons  (w/o  Preprocessing)  –  PageRank  applica5on  

•  Measures  rela5ve    importance  of  web  pages  

–  Input  data    •  Ar5ficial  Kronecker  graphs  

–  Generated  by  generator  in  Graph500    •  Parameters  

–  SCALE:  log  2  of  #ver5ces  (#ver5ces  =  2SCALE)  –  Edge_factor:  16  (#edges  =  Edge_factor  ×  #ver5ces)  

16 4 3

2 1

8 12 4

8 6 4   2  

12 3 2 1 4 3 2 1

G2 =G1⊗G1G1

Study  the  performance  of  our  mulR-­‐GPU  GIM-­‐V    •  Comparison  with  a  CPU-­‐based  implementaRon  •  Analysis  of  performance  and  power  efficiencies    

27

Experimental  environments •  TSUBAME2.5  supercomputer    – Use  up  to  1024  nodes  (3072  GPUs)  

•  CPU-­‐GPU:    PCI-­‐E  2.0  x16  (8  GB/sec)  •  Internode:  QDR  IB  dual  rail  (10  GB/sec)  

•  Setup  –  n  GPU(s)  

•  n  GPUs  /  node            (n:  1,  2,  3)  

–  n  CPU(s)  •  12  threads  /  node  •  MPI  and  OpenMP  •  Thrust  OpenMP  Sort  

2  CPUs  /  node 3  GPUs  /  node

Model   Intel®  Xeon®  X5670

Tesla  K20X  

#  Cores 6 2688

Frequency   2.93  GHz 0.732  GHz

Memory 54  GB 6  GB

Memory  BW 32  GB/sec 250  GB/sec

Compiler   gcc  4.3.4 Nvcc  5.0

28

Weak  Scaling  Performance   •  PageRank  applica5on  •  Data  size  is  larger  than  GPU  memory    

capacity

0  

500  

1000  

1500  

2000  

2500  

3000  

0   200   400   600   800   1000   1200  

Performan

ce  [M

Edges/sec]

Number  of  Compute  Nodes

1CPU  (S23  per  node)  

1GPU  (S23  per  node)  

2CPUs  (S24  per  node)  

2GPUs  (S24  per  node)  

3GPUs  (S24  per  node)  

29

Weak  Scaling  Performance   •  PageRank  applica5on  •  Data  size  is  larger  than  GPU  memory    

capacity

0  

500  

1000  

1500  

2000  

2500  

3000  

0   200   400   600   800   1000   1200  

Performan

ce  [M

Edges/sec]

Number  of  Compute  Nodes

1CPU  (S23  per  node)  

1GPU  (S23  per  node)  

2CPUs  (S24  per  node)  

2GPUs  (S24  per  node)  

3GPUs  (S24  per  node)  

2.81  GE/s  on  3072  GPUs  (SCALE  34)

2.10x  Speedup  (3  GPU  v  2CPU)

30

Weak  Scaling  Performance   •  PageRank  applica5on  •  Data  size  is  larger  than  GPU  memory    

capacity

0  

500  

1000  

1500  

2000  

2500  

3000  

0   200   400   600   800   1000   1200  

Performan

ce  [M

Edges/sec]

Number  of  Compute  Nodes

1CPU  (S23  per  node)  

1GPU  (S23  per  node)  

2CPUs  (S24  per  node)  

2GPUs  (S24  per  node)  

3GPUs  (S24  per  node)  

2.81  GE/s  on  3072  GPUs  (SCALE  34)

2.10x  Speedup  (3  GPU  v  2CPU)

Performance  Breakdown  

31

Breakdown •  Performance  on  3  GPUs  compared  with  2  CPUs  –  SCALE  31,  256  nodes  – Map:  1.41x,  Reduce:  1.49x,  Sort:  4.95x  speedup  

•  Overlapping  communica5on  effec5vely

0  

10000  

20000  

30000  

40000  

50000  

60000  

1CPU   1GPU   2CPUs   2GPUs   3GPUs  

Elap

sed  Rm

e  [m

s]

Map  

Shuffle  

Reduce  

Sort  

Others  

32

Breakdown •  Performance  on  3  GPUs  compared  with  2  CPUs  –  SCALE  31,  256  nodes  – Map:  1.41x,  Reduce:  1.49x,  Sort:  4.95x  speedup  

•  Overlapping  communica5on  effec5vely

0  

10000  

20000  

30000  

40000  

50000  

60000  

1CPU   1GPU   2CPUs   2GPUs   3GPUs  

Elap

sed  Rm

e  [m

s]

Map  

Shuffle  

Reduce  

Sort  

Others  

1.41x    (Map)

33

Breakdown •  Performance  on  3  GPUs  compared  with  2  CPUs  –  SCALE  31,  256  nodes  – Map:  1.41x,  Reduce:  1.49x,  Sort:  4.95x  speedup  

•  Overlapping  communica5on  effec5vely

0  

10000  

20000  

30000  

40000  

50000  

60000  

1CPU   1GPU   2CPUs   2GPUs   3GPUs  

Elap

sed  Rm

e  [m

s]

Map  

Shuffle  

Reduce  

Sort  

Others  

1.49x    (Reduce)

34

Breakdown •  Performance  on  3  GPUs  compared  with  2  CPUs  –  SCALE  31,  256  nodes  – Map:  1.41x,  Reduce:  1.49x,  Sort:  4.95x  speedup  

•  Overlapping  communica5on  effec5vely

0  

10000  

20000  

30000  

40000  

50000  

60000  

1CPU   1GPU   2CPUs   2GPUs   3GPUs  

Elap

sed  Rm

e  [m

s]

Map  

Shuffle  

Reduce  

Sort  

Others  

4.95x    (Sort)

35

Breakdown  of  Map/Reduce •  Map1,  Map2  (Pass)  1.41x  

–  Speedup  by  overlapping  communica5on  efficiently  •  Reduce1  (Combine2)  1.56x,  Reduce2  (CombineAll,  Assign)  1.33x  

–  Speedup  by  overlapping  communica5on  and  parallel  reduc5on              →  heavier  opera5on  is  more  accelerated    

0  

100  

200  

300  

400  

500  

600  

700  

1CPU   1GPU   2CPUs   2GPUs   3GPUs  

Elap

sed  Rm

e  [m

s]

Map1  

Map2  

Reduce1  

Reduce2  

36

Breakdown  of  Map/Reduce •  Map1,  Map2  (Pass)  1.41x  

–  Speedup  by  overlapping  communica5on  efficiently  •  Reduce1  (Combine2)  1.56x,  Reduce2  (CombineAll,  Assign)  1.33x  

–  Speedup  by  overlapping  communica5on  and  parallel  reduc5on              →  heavier  opera5on  is  more  accelerated    

0  

100  

200  

300  

400  

500  

600  

700  

1CPU   1GPU   2CPUs   2GPUs   3GPUs  

Elap

sed  Rm

e  [m

s]

Map1  

Map2  

Reduce1  

Reduce2  

1.41x    (Map1,2)

37

Breakdown  of  Map/Reduce •  Map1,  Map2  (Pass)  1.41x  

–  Speedup  by  overlapping  communica5on  efficiently  •  Reduce1  (Combine2)  1.56x,  Reduce2  (CombineAll,  Assign)  1.33x  

–  Speedup  by  overlapping  communica5on  and  parallel  reduc5on              →  heavier  opera5on  is  more  accelerated    

0  

100  

200  

300  

400  

500  

600  

700  

1CPU   1GPU   2CPUs   2GPUs   3GPUs  

Elap

sed  Rm

e  [m

s]

Map1  

Map2  

Reduce1  

Reduce2  

1.56x    (Reduce1)

38

Breakdown  of  Map/Reduce •  Map1,  Map2  (Pass)  1.41x  

–  Speedup  by  overlapping  communica5on  efficiently  •  Reduce1  (Combine2)  1.56x,  Reduce2  (CombineAll,  Assign)  1.33x  

–  Speedup  by  overlapping  communica5on  and  parallel  reduc5on              →  heavier  opera5on  is  more  accelerated    

0  

100  

200  

300  

400  

500  

600  

700  

1CPU   1GPU   2CPUs   2GPUs   3GPUs  

Elap

sed  Rm

e  [m

s]

Map1  

Map2  

Reduce1  

Reduce2  

1.33x    (Reduce2)

39

Performance  and  Power  Efficiency •  Experiments  on  TSUBAME-­‐KFC  –  Scale-­‐out:  1  GPU  x  32  nodes  

•  beuer  performance  –  Scale-­‐up:  2  GPUs  x  16  nodes,  4  GPUs  x  8  nodes  

•  beuer  power  efficiency  (1.53x  on  2  GPUs,  1.71x  on  4  GPUs)

0  

2  

4  

6  

8  

10  

12  

0  

10000  

20000  

30000  

40000  

50000  

60000  

1GPU  x  32nodes   2GPUs  x  16nodes   4GPUs  x  8nodes  

Power  Efficien

cy  [K

E/s/W]

Performan

ce  [K

E/s]  

Performance   Power  Efficiency  

40 Scale-­‐out Scale-­‐up

Performance  and  Power  Efficiency •  Experiments  on  TSUBAME-­‐KFC  –  Scale-­‐out:  1  GPU  x  32  nodes  

•  beuer  performance  –  Scale-­‐up:  2  GPUs  x  16  nodes,  4  GPUs  x  8  nodes  

•  beuer  power  efficiency  (1.53x  on  2  GPUs,  1.71x  on  4  GPUs)

0  

2  

4  

6  

8  

10  

12  

0  

10000  

20000  

30000  

40000  

50000  

60000  

1GPU  x  32nodes   2GPUs  x  16nodes   4GPUs  x  8nodes  

Power  Efficien

cy  [K

E/s/W]

Performan

ce  [K

E/s]  

Performance   Power  Efficiency  

Scale-­‐out  is  the  best  in  performance

41 Scale-­‐out Scale-­‐up

Performance  and  Power  Efficiency •  Experiments  on  TSUBAME-­‐KFC  –  Scale-­‐out:  1  GPU  x  32  nodes  

•  beuer  performance  –  Scale-­‐up:  2  GPUs  x  16  nodes,  4  GPUs  x  8  nodes  

•  beuer  power  efficiency  (1.53x  on  2  GPUs,  1.71x  on  4  GPUs)

0  

2  

4  

6  

8  

10  

12  

0  

10000  

20000  

30000  

40000  

50000  

60000  

1GPU  x  32nodes   2GPUs  x  16nodes   4GPUs  x  8nodes  

Power  Efficien

cy  [K

E/s/W]

Performan

ce  [K

E/s]  

Performance   Power  Efficiency  

Scale-­‐up  outperforms  by  1.71x  (Power  efficiency)

42 Scale-­‐out Scale-­‐up

Summary  of  Experiments •  Performance  

–  Scales  well  up  to  1024  nodes  (3072  GPUs)  when  data  size  is  larger  than  GPU  memory  capacity  

–  2.10x  speedup  using  3GPUs  per  node  compared  with  2CPUs  per  node  

→  Out-­‐of-­‐core  GPU  memory  management  can  accelerate  by  fully  overlapping  CPU-­‐GPU  data  transfer  and  applying  several  opRmizaRons  

•  Efficiency    –  1.71x  beuer  power  efficiency  by  scale-­‐up  strategy  (using  4GPUs  per  node)  

→  Scale-­‐up  approach  performs  beder  power  efficiency  than  simple  scale-­‐out  approach  

•  Limita5on  –  May  not  perform  efficiently  on  graphs  with  different  characteris5cs  

•  e.g.)  road  network  (only  4  edges  per  vertex)  43

Conclusions •  Out-­‐of-­‐core  GPU  memory  management  for  MapReduce-­‐based  graph  processing  – Methodology  

•  Out-­‐of-­‐core  GPU  data  management  for  GPU-­‐MapReduce-­‐based  large-­‐scale  graph  processing  

•  Implement  out-­‐of-­‐core  GPU  sor5ng  •  Inves5gate  the  balance  of  scale-­‐up  and  scale-­‐out  approaches  

– Performance  •  2.10x  speedup  than  CPU  on  SCALE  34  (1024  nodes,  3072  GPUs)  •  1.71x  power  efficiency  by  scale-­‐up  strategy  

•  Future  work  – Handling  host  memory  overflow  by  u5lizing  I/O  from  Non-­‐Vola5le  Memory

44

•  backup

45

Result  of  Out-­‐of-­‐core  GPU  Sor5ng •  Comparison  of  our  out-­‐of-­‐core  sor5ng  on  1  GPU  with  OpenMP  sor5ng  on  

1  CPU  •  2.53x  speedup  compared  with  CPU  when  data  size  is  larger  than  GPU  

memory  capacity  

Beuer  

0  

20  

40  

60  

80  

100  

120  

0   50   100   150   200   250   300  

SorRng  Rate  [M

illion  pa

irs  /  se

c]

Number  of  Elements  (Millions)

STL  Sort  

Thrust  OMP  Sort  

Out-­‐of-­‐core  GPU  Sort  

2.53x  Speedup

GPU  Memory  Capacity

46

Balance  between  Scale-­‐up  and  Scale-­‐out •  Performance  difference  by  number  of  GPUs  per  node  

–  1  GPU  x  1024  nodes,  2  GPUs  x  512  nodes,  3  GPUs  x  512  nodes  –  2  GPUs  performs  81.3  %,  3  GPUs  performs  96.9  %  of  1  GPU  with  double  number  of  nodes  

0  200  400  600  800  

1000  1200  1400  1600  1800  2000  

24   25   26   27   28   29   30   31   32   33  

Performan

ce  [M

E/s]

SCALE

1GPU  1024nodes  2GPUs  512nodes  3GPUs  512nodes  

47