Presentation is loading. Please wait.

Presentation is loading. Please wait.

00-04-271 On Computing the Data Cube. Research Report 10026, IBM Almaden Research Center, San Jose, California, 1996. 병렬 분산 컴퓨팅 연구실 석사 1 학기 송지숙.

Similar presentations


Presentation on theme: "00-04-271 On Computing the Data Cube. Research Report 10026, IBM Almaden Research Center, San Jose, California, 1996. 병렬 분산 컴퓨팅 연구실 석사 1 학기 송지숙."— Presentation transcript:

1 00-04-271 On Computing the Data Cube. Research Report 10026, IBM Almaden Research Center, San Jose, California, 1996. 병렬 분산 컴퓨팅 연구실 석사 1 학기 송지숙

2 00-04-272 Contents zIntroduction zPipeSort Algorithm zPipeHash Algorithm zComparing PipeSort and PipeHash zConclusion

3 00-04-273 Optimization(1/2) zSmallest-parent 이전에 계산된 group-by 중 가장 작은 것으로부터 group- by 계산 zCache-results disk I/O 를 줄이기 위해서 결과가 memory 에 저장된 group- by 로부터 다른 group-by 계산 zAmortize-scans 가능하면 한꺼번에 많은 group-by 를 계산함으로써 disk read 를 줄이는 것

4 00-04-274 Optimization(2/2) zShare-sorts sort-based algorithm 에만 한정 여러 group-by 간에 sorting cost 를 공유 zShare-partitions hash-based algorithm 에만 한정 hash-table 이 memory 에 비해 너무 클 경우, data 를 memory 에 맞게 분할하여 각 partition 에 대해 aggregation  여러 group-by 간에 partitioning cost 공유

5 00-04-275 Sort-based methods zPipeSort algorithm optimization share-sorts 와 smallest-parent 의 결합 : 두 optimization 간에 대립이 생길 수 있기 때문에 group- by 를 할 때 global planning 통해 minimum total cost 얻음. optimization cache-results 와 amortize-scans 도 포함 : pipeline 방식으로 여러 group-by 를 실행함으로써 disk scan cost 를 줄임.

6 00-04-276  Share-sorts and smallest-parent all A B C D AB AC AD BC BD CD ABC ABD ACD BCD ABCD Level 0 1 2 3 4 BDA AB ABC A

7 00-04-277  cache-results and amortize-scans all A B C D AB AC AD BC BD CD ABC ABD ACD BCD ABCD Level 0 1 2 3 4 AB ABC A ABCD

8 00-04-278 Algorithm PipeSort(1/2) zInput search lattice - vertex : group-by cube - edge : i 로부터 j 가 generate 될 때, i 에서 j 로 연결한다. j 는 i 보다 attribute 를 하나 적게 가지고 i 를 j 의 parent 라고 부른다. - cost : S 는 i 가 정렬되어 있지 않을 때 i 로부터 j 를 계산하는 cost A 는 i 가 정렬되어 있을 때 i 로부터 j 를 계산하는 cost zOutput subgraph of the search lattice - 각 group-by 는 그것의 attribute 정렬순서로 결합되어 있고 그것을 계산하는데 이용되는 하나의 parent 와 연결된다.

9 00-04-279 Algorithm PipeSort(2/2) ABACBC 101220 ABACBC ABC 2513 ABC all Level 0 1 2 3 ASAS ABACBC 101220 ABC ABACBC 2513 Minimum cost matching BACABA

10 00-04-2710 Minimum cost sort plan CBAD CBA BAD ACD DBC CB BA AC DB AD CD C B A D all Raw data 2 4 5 8 4 16 4 13 5 15 5 15 4 14 5 15 5 15 10 20 10 30 15 40 5 20 45 130 50 160 A() S() Pipeline edges sort edges BADC ACDB DBA DBCA ADCCDA

11 00-04-2711 Hash-based methods zPipeHash algorithm optimization cache-results 와 amortize-scans 의 결합 : multiple hash-table 의 신중한 memory allocation 이 요구 optimization smallest-parent 도 포함 optimization share-partitions 포함 : aggregation data 는 hash-table 이 memory 에 들어가기에 너무 크기 때문에, 하나 또는 그 이상의 attribute 에 대해서 data 를 partition 한다. Partitioning attribute 를 포함하는 모든 group-by 간에 data partitioning cost 를 공유한다.

12 00-04-2712  cache-results and amortize-scans ABCD Level 0 1 2 3 4 all A B C D AB AC AD BC BD CD ABC ABD ACD BCD AB AC AB

13 00-04-2713 Algorithm PipeHash zInput search lattice zFirst step 각 group-by 에 대해, 가장 작은 total size 추정치를 가지는 parent group-by 를 선택한다. 그 결과가 minimum spanning tree 이다. zNext step 대개 MST 안에 모든 group-by 를 함께 계산하기에 memory 가 충분하지 않다. 다른 hash-table 을 위해 memory displacement 가 일어날 때, 어떤 group-by 가 함께 계산될지, data partitioning 을 위해 어떤 attribute 를 선택할지 결정한다. Optimization cache-results 와 amortize-scan 을 위해 MST 의 subtree 중 가장 큰 것을 선택하도록 한다.

14 00-04-2714 all A B C D AB AC BC AD CD BD ABC ABD ACD BCD ABCD Raw Data Minimum spanning tree

15 00-04-2715 A AB AC AD ABCD Raw Data ABC ABD ACD BC ABC B AB all A ABCD BCD CDBD CD First subtree partitioned on A Remaining subtrees

16 00-04-2716 Comparing PipeSort and PipeHash(1/5) z Datasets z Performance results faster than the naive methods The performance of PipeHash is very close to lower bound for hash- based algorithms. PipeHash is inferior to the PipeSort algorithms.

17 00-04-2717 Comparing PipeSort and PipeHash(2/5)

18 00-04-2718 z 각 group-by 결과로 tuple 의 수가 많이 줄어들 때, hash- based method 가 sort-based method 보다 더 좋은 성능을 가질 것이다. zSynthetic datasets number of tuples, T number of grouping attributes, N ratio among the number of distinct values of each attribute, d 1 :d 2 :…:d N ratio of T to the total number of possible attribute value combinations, p - data sparsity 정도를 바꾸는데 사용 Comparing PipeSort and PipeHash(3/5)

19 00-04-2719 Effect of sparseness on relative performance of the hash and sort-based algorithms for a 5 attribute synthetic dataset. Comparing PipeSort and PipeHash(4/5)

20 00-04-2720 z Results x-axis denotes decreasing levels of sparsity. y-axis denotes the ratio between the total running time of algorithms PipeHash and PipeSort. data 가 점점 덜 sparse 해짐에 따라, hash-based method 가 sort-based method 보다 더 좋은 성능을 가진다. PipeHash 와 PipeSort algorithm 의 상대적인 성능의 predictor 는 sparsity 임을 알 수 있다. Comparing PipeSort and PipeHash(5/5)

21 00-04-2721 Conclusion zPresented five optimizations smallest-parent, cache- results, amortize-scans, share-sorts and share- partitions zThe PipeHash and PipeSort algorithms combine them so as to reduce the total cost. zPipeHash does better on low sparsity data whereas PipeSort does better on high sparsity data.


Download ppt "00-04-271 On Computing the Data Cube. Research Report 10026, IBM Almaden Research Center, San Jose, California, 1996. 병렬 분산 컴퓨팅 연구실 석사 1 학기 송지숙."

Similar presentations


Ads by Google