5. Intel Lab.とは?
• Intel Parallel Computing Lab.
– http://pcl.intel-research.net/
– USとインドの2拠点
• 所属研究者は約20名程度
• 研究目的(上記URLから抜粋)
Our lab's goal is worldwide leadership in highly parallel computing, and to
ensure Intel's leadership for this application segment. We also seek to be
an industry role-model for application-driven architecture research. We
work in close collaboration with leading academic and industry co-
travelers to understand hardware and software architectural implications
for Intel's upcoming multicore/manycore compute platforms
5
6. Intel Lab.とは?
• Intel Parallel Computing Lab.
– http://pcl.intel-research.net/
– USとインドの2拠点
• 所属研究者は約20名程度
• 研究目的(上記URLから抜粋)
Our lab's goal is worldwide leadership in highly parallel computing, and to
ensure Intel's leadership for this application segment. We also seek to be
an industry role-model for application-driven architecture research. We
work in close collaboration with leading academic and industry co-
travelers to understand hardware and software architectural implications
for Intel's upcoming multicore/manycore compute platforms
x86/x64コアを大量に搭載したHPC向けメ
ニーコアアーキテクチャ『Knights Ferry』
6
http://cloud.watch.impress.co.jp/docs/news/20101111_406140.html
7. CPU最適化に関する近年の研究動向 / データベース周辺
• データベース界隈では’99年以降メモリ-CPU間の最適化が流行
P. A. Boncz et al.: Database architecture optimized for the new
bottleneck: Memory access, VLDB’99 (VLDB 10 years best paper)
アルゴリズムや条件によって
オンメモリ上でも10~100倍の性能差が発生
• 近年の傾向: 参照データサイズ<メモリサイズ
– 近年のメモリサイズ拡大と,低価格化が原因
• 近年CPU最適化されたアルゴリズム多くの提案
– データベース内の主要カーネルである探索/圧縮/並び替え
本日の後半スライドでPick-up!!
7
10. キャッシュミス/DTLBミスの低減化
具体例 / 木構造のメモリレイアウト:
R. A. Hankins and J. M. Patel: Effect of node size on the performance of
cache-conscious b+-trees, SIGMETRICS’03
x x
Penalty = h( x) ( cache _ penalty TLB _ penalty )
64 4096
size: x
NODE
h(x)
※前提: キャシュライン 64B/Page 4KiB/
各NODE内データはすべて参照
10
11. キャッシュミス/DTLBミスの低減化
具体例 / 木構造のメモリレイアウト:
R. A. Hankins and J. M. Patel: Effect of node size on the performance of
問題: sizeをいくつに設定すべきか?
cache-conscious b+-trees, SIGMETRICS’03
⇒直観的なアプローチ: キャッシュラインサイズに調整
x x
Penalty = h( x) ( cache _ penalty TLB _ penalty )
64 4096
size: x
NODE
h(x)
※前提: キャシュライン 64B/Page 4KiB/
各NODE内データはすべて参照
11
12. キャッシュミス/DTLBミスの低減化
具体例 / 木構造のメモリレイアウト:
R. A. Hankins and J. M. Patel: Effect of node size on the performance of
問題: sizeをいくつに設定すべきか?
cache-conscious b+-trees, SIGMETRICS’03
⇒直観的なアプローチ: キャッシュラインサイズに調整
⇒その場合h(x)が高くなり,Penaltyが大きくなる可能性
x x
h( x) ( cache _ penalty
Penalty = はキャッシュラインより多少大きいほうが良いとの結果
実際,size TLB _ penalty )
64 4096
size: x
NODE
h(x)
※前提: キャシュライン 64B/Page 4KiB/
各NODE内データはすべて参照
12
14. メモリバンド使用量の考慮
• コア当たりに使用可能なメモリバンド量は年々減少
M. Reilly: When multicore isn’t enough: Trends and the future for
multi-multicore systems, HPEC'08
• アルゴリズムで扱うデータ量が増えた場合に,コア数に対して処理速
度がスケールしないという報告
C. Kim(Intel corp.) et al.: Designing Fast Architecture Sensitive Tree
Search on Modern Multi-Core/Many-Core Processors, ACM TODS’11
可能使用量(GiB/# of cores)
コア当たりのメモリバンド
2005 2008
年代 14
15. 研究 - CPU最適化アルゴリズムに関する具体例
・探索 - FAST
C. Kim(Intel corp.) et al.: Designing Fast Architecture Sensitive Tree
Search on Modern Multi-Core/Many-Core Processors, ACM TODS’11
・圧縮 - VSEncoder
F. Silvestri et al, VSEncoding: Efficient Coding and Fast Decoding of
Integer Lists via Dynamic Programming, ACM CIKM’10
・並び替え – bitonic-sort
J. Chhugani(Intel corp.) et al.: Efficient Implementation of Sorting on
Multi-Core SIMD CPU Architecture, VLDB’08
15
22. 具体例1: SIMD命令を利用した探索の分岐排除
• 索引の探索におけるCPU内のペナルティサイクルの考え方
R. A. Hankins and J. M. Patel: Effect of node size on the performance of
cache-conscious b+-trees, SIGMETRICS’03
一様な参照を前提に,探索の際に発生する分岐処理の
50%をペナルティ(投機ロードと分岐ペナルティ)として加算
22
23. 具体例1: SIMD命令を利用した探索の分岐排除
• 参考論文:
C. Kim(Intel corp.) et al.: Designing Fast Architecture Sensitive Tree
Search on Modern Multi-Core/Many-Core Processors, ACM TODS’11
※Knights Ferry上の評価も実施
• 提案アプローチ
- SIMD命令を利用した差分移動(分岐排除)
- キャッシュライン/Pageによるデータのブロック化
- 各ノード内の比較キーの圧縮 今回は扱わない
• 使用するSIMD命令:
32-bitのSIMD比較命令(_mm_cmpgt_epi32)
23