annotate slides/master.html @ 70:0b1a059c49fa

fix
author kono
date Thu, 13 Feb 2014 12:08:24 +0900
parents 5e39ab004ae0
children 98a55a935619
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
31
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1 <!DOCTYPE html>
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3 <!--
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4 Google HTML5 slide template
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
5
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
6 Authors: Luke Mahé (code)
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
7 Marcin Wichary (code and design)
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
8
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
9 Dominic Mazzoni (browser compatibility)
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
10 Charles Chen (ChromeVox support)
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
11
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
12 URL: http://code.google.com/p/html5slides/
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
13 -->
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
14
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
15 <html>
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
16 <head>
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
17 <title>
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
18 関数型言語 Haskell による並列データベースの実装
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
19 </title>
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
20
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
21 <meta charset='utf-8'>
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
22 <script
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
23 src='http://web.amothic.com/html5slides/slides.js'></script>
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
24 </head>
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
25
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
26 <style>
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
27 /* Your individual styles here, or just use inline styles if that’s
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
28 what you want. */
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
29
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
30
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
31 </style>
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
32
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
33 <body style='display: none'>
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
34
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
35 <section class='slides layout-regular template-concurrency'>
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
36
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
37 <!-- Your slides (<article>s) go here. Delete or comment out the
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
38 slides below. -->
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
39
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
40 <article>
70
kono
parents: 69
diff changeset
41 <h1> 関数型言語 Haskell による並列データベースの実装 </h1>
31
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
42 <p>
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
43 Daichi TOMA
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
44 <br>
66
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
45 Feb 12, 2014
31
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
46 </p>
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
47 </article>
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
48
70
kono
parents: 69
diff changeset
49 <article>
kono
parents: 69
diff changeset
50 <h3> 研究概要 </h3>
kono
parents: 69
diff changeset
51 <p> Haskell を用いて信頼性の高い並列データベースを実装した </p>
kono
parents: 69
diff changeset
52 <p> Haskell は rseq により並列実行を指示し、STMにより共有データを実現する</p>
kono
parents: 69
diff changeset
53 <p> Haskellの並列処理は、最新のコンパイラで性能がでることがわかった</p>
kono
parents: 69
diff changeset
54 <p> 読み込みに関して 12 コアで実行した場合、10.37 倍 という性能向上率が確認できた </p>
kono
parents: 69
diff changeset
55 <p> Web 掲示板サービスを開発し、Java と比較して読み込みで 3.25 倍、書き込みで 3.78 倍の性能差が確認できた </p>
kono
parents: 69
diff changeset
56 <p> Network および IO の並列性能はあまり出てないことがわかった</p>
kono
parents: 69
diff changeset
57 </article>
31
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
58
70
kono
parents: 69
diff changeset
59 <article>
kono
parents: 69
diff changeset
60 <h3> Haskellによる信頼性の高いサービスの構築</h3>
kono
parents: 69
diff changeset
61 <p> Web サービスの脆弱性を悪用されると多大な被害がでる </p>
kono
parents: 69
diff changeset
62 <p> 脆弱性の大半はBuffer Overflowや、Cross site scripting、SQL injection </p>
kono
parents: 69
diff changeset
63 <p> これらは型エラー。Haskell は、これらをコンパイル時にチェック</p>
kono
parents: 69
diff changeset
64 <p> 入力として受け取った文字列が、HTML型に実行時に自動変換されたりしない<br>
kono
parents: 69
diff changeset
65 ⇒ クロスサイトスクリプティングが防げる </p>
kono
parents: 69
diff changeset
66 </article>
31
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
67
70
kono
parents: 69
diff changeset
68 <article>
kono
parents: 69
diff changeset
69 <h3> Haskellの型検査の例(list) </h3>
kono
parents: 69
diff changeset
70 :
kono
parents: 69
diff changeset
71 / \
kono
parents: 69
diff changeset
72 1 []
43
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
73 <pre>
70
kono
parents: 69
diff changeset
74 let a = 0 : [1,2,3] -- [0,1,2,3]
kono
parents: 69
diff changeset
75 let b = 'a' : [1,2,3] -- error
kono
parents: 69
diff changeset
76 let c = 1 : ['a','b','c'] -- error
43
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
77 </pre>
70
kono
parents: 69
diff changeset
78 </article>
43
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
79
70
kono
parents: 69
diff changeset
80 <article>
kono
parents: 69
diff changeset
81 <h3> 型推論 </h3>
kono
parents: 69
diff changeset
82 <p> 前提として関数に以下のような型が定義されているとする </p>
46
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 45
diff changeset
83 <pre>
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 45
diff changeset
84 getNode :: Node -&gt; Path -&gt; Node
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 45
diff changeset
85 elems :: Map k a -&gt; [a]
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 45
diff changeset
86 children :: Node -&gt; Map Int Node
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 45
diff changeset
87 </pre>
70
kono
parents: 69
diff changeset
88 <p> 新しくgetChildrenという関数を定義する</p>
43
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
89 <pre>
66
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
90 getChildren node path = elems (children (getNode node path))
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
91 </pre>
70
kono
parents: 69
diff changeset
92 <p> 型をHaskellが自動で導出する </p>
66
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
93 <pre>
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
94 *Jungle&gt; :type getChildren
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
95 getChildren :: Node -&gt; Path -&gt; [Node]
43
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
96 </pre>
46
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 45
diff changeset
97 </article>
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 45
diff changeset
98
70
kono
parents: 69
diff changeset
99 <article>
kono
parents: 69
diff changeset
100 <h3> 実用的なデータベースには並列実行が必須 </h3>
kono
parents: 69
diff changeset
101 <p> 現在、CPU はマルチコア化がすすんでいる </p>
kono
parents: 69
diff changeset
102 <p> 実用的なデータベースとするためにはマルチコアに対応させる必要性がある </p>
kono
parents: 69
diff changeset
103 <p> 並列に処理できればマルチコアで性能が出る </p>
kono
parents: 69
diff changeset
104 <p> Haskell は Eval モナド(rpar)といったモナドで並列実行の機能を提供</p>
kono
parents: 69
diff changeset
105 <p> モナドは、Haskellでメタ計算を提供する構文あるいはAPI</p>
kono
parents: 69
diff changeset
106 <p> システムコールのようなものと考えてよい</p>
kono
parents: 69
diff changeset
107 <p> モナドの例:IOモナド、エラーモナド、STMモナド </p>
kono
parents: 69
diff changeset
108 </article>
46
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 45
diff changeset
109
70
kono
parents: 69
diff changeset
110 Haskell の並列処理
kono
parents: 69
diff changeset
111 rparの例
43
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
112 <article>
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
113 <h3>
68
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 67
diff changeset
114 Haskell の遅延評価
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 67
diff changeset
115 </h3>
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 67
diff changeset
116 <p>
69
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 68
diff changeset
117 並列実行は遅延評価が問題になる
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 68
diff changeset
118 </p>
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 68
diff changeset
119 <p>
68
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 67
diff changeset
120 haskell では値が必要となるまで式の評価が行われない
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 67
diff changeset
121 </p>
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 67
diff changeset
122 <p>
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 67
diff changeset
123 並列に実行するように指示しても、評価が行われなければ並列に動かない
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 67
diff changeset
124 </p>
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 67
diff changeset
125 </article>
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 67
diff changeset
126
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 67
diff changeset
127 <article>
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 67
diff changeset
128 <h3>
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 67
diff changeset
129 Haskell の遅延評価
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 67
diff changeset
130 </h3>
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 67
diff changeset
131 <p>
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 67
diff changeset
132 sprintは評価を行わずに値を表示するコマンド
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 67
diff changeset
133 </p>
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 67
diff changeset
134 <p>
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 67
diff changeset
135 _ は未評価の式を表し、thunk と呼ばれる
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 67
diff changeset
136 </p>
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 67
diff changeset
137
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 67
diff changeset
138 <pre>
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 67
diff changeset
139 ghci&gt; let y = map (+1) [1,2,3] :: [Int]
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 67
diff changeset
140 ghci&gt; :sprint y
69
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 68
diff changeset
141 y = _
68
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 67
diff changeset
142 ghci&gt; length y
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 67
diff changeset
143 3
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 67
diff changeset
144 ghci&gt; :sprint y
69
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 68
diff changeset
145 y = [_,_,_]
68
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 67
diff changeset
146 ghci&gt; head y
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 67
diff changeset
147 2
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 67
diff changeset
148 ghci&gt; :sprint y
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 67
diff changeset
149 y = [2,_,_]
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 67
diff changeset
150 </pre>
69
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 68
diff changeset
151 <p>
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 68
diff changeset
152 並列実行時には出力などを挟んで強制的に即時評価されるようにする
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 68
diff changeset
153 </p>
68
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 67
diff changeset
154 </article>
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 67
diff changeset
155
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 67
diff changeset
156 <article>
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 67
diff changeset
157 <h3>
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 67
diff changeset
158 データベースの設計 - 非破壊的木構造
31
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
159 </h3>
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
160 <p>
66
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
161 マルチコア上で、データベースの性能向上をさせるためには、各コアからデータに同時にアクセスできるようにする
31
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
162 </p>
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
163 <p>
46
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 45
diff changeset
164 非破壊的木構造という手法を用いる。
31
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
165
46
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 45
diff changeset
166 非破壊的木構造は、元となる木構造を書き換えずに編集できる。
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 45
diff changeset
167 </p>
31
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
168 <p>
43
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
169 既にあるデータを変更しないので、データの競合状態が発生しない。並列に読み書きできる
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
170 </p>
46
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 45
diff changeset
171 <br>
31
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
172 <div align="center">
46
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 45
diff changeset
173 <img src="images/concurrent_edit.png" width="400px">
31
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
174 </div>
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
175 </article>
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
176
70
kono
parents: 69
diff changeset
177 <article>
kono
parents: 69
diff changeset
178 <h3> Haskell でのRoot Node の管理 </h3>
31
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
179
70
kono
parents: 69
diff changeset
180 <p> Root Node は最新のNode → 状態を持つ</p>
kono
parents: 69
diff changeset
181 <p> 共有された状態を作るには Software Transactional Memory (STM) を使う </p>
kono
parents: 69
diff changeset
182 <p> STM は、ノンブロッキングで共有データを扱える </p>
kono
parents: 69
diff changeset
183 <p> 共有データの変更は以下の様に行われる </p>
31
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
184 <ul>
66
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
185 <li>他から変更がなければそのまま適用
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
186 <li>変更している間に、他から変更されれば変更処理をやり直し
31
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
187 </ul>
70
kono
parents: 69
diff changeset
188 </article>
31
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
189
43
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
190
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
191 <article>
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
192 <h3>
66
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
193 非破壊的木構造データベース Jungle
43
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
194 </h3>
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
195 <p>
66
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
196 非破壊的木構造を扱うデータベース Jungle を開発した
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
197 </p>
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
198 <p>
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
199 Jungle の基本的な使い方
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
200 </p>
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
201 <ul>
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
202 <li> 木構造を保持する Jungle を作成
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
203 <li> Jungle に新しい木を作成
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
204 <li> 木から最新のルートノードを取ってきて、データを参照する
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
205 <li> もしくは、ノードを編集し、木の最新のルートノードを更新する
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
206 </ul>
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
207 </article>
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
208
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
209 <article>
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
210 <h3>
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
211 木構造を保持する Jungle の作成
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
212 </h3>
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
213 <pre>
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
214 data Jungle = Jungle (TVar (Map String Tree))
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
215 </pre>
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
216 <p>
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
217 TVarがついているのはSTMを使っている変数
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
218 </p>
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
219 <p>
69
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 68
diff changeset
220 各スレッドから新しく木を作ったりできるように木構造の保持にSTMを使っている
66
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
221 </p>
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
222 <p>
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
223 Jungle は複数の Tree を名前で管理する
43
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
224 </p>
31
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
225 <div align="center">
66
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
226 <img src="images/jungle_type.png" width="500px">
31
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
227 </div>
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
228 </article>
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
229
66
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
230
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
231 <article>
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
232 <h3>
67
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 66
diff changeset
233 木から最新のルートノードを取ってくる
66
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
234 </h3>
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
235 <p>
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
236 木から最新のルートノードを取ってくるにはgetRootNodeという関数を使う
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
237 </p>
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
238 <pre>
43
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
239 getRootNode :: Jungle -&gt; String -&gt; IO Node
66
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
240 </pre>
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
241 <p>
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
242 Jungleと木の名前を渡すと最新のルートノードが返ってくる
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
243 </p>
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
244 </article>
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
245
70
kono
parents: 69
diff changeset
246 <article>
kono
parents: 69
diff changeset
247 <h3> ノード </h3>
kono
parents: 69
diff changeset
248 <p> Node はChildren(Node)とattributesを持つ </p>
kono
parents: 69
diff changeset
249 <p> Jungle の参照や変更の関数は全てノードに対して行う </p>
66
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
250 <div align="center">
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
251 <img src="images/node_component.png" width="500px">
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
252 </div>
70
kono
parents: 69
diff changeset
253 </article>
66
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
254
70
kono
parents: 69
diff changeset
255 <article>
kono
parents: 69
diff changeset
256 <h3> ノードを編集し、木の最新のルートノードを更新する </h3>
kono
parents: 69
diff changeset
257 <p> updateRootNodeやupdateRootNodeWithで更新できる </p>
kono
parents: 69
diff changeset
258 <p> 内部でSTMを使っているのでIOモナドを返す</p>
66
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
259 <pre>
43
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
260 updateRootNode :: Jungle -&gt; String -&gt; Node -&gt; IO ()
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
261 updateRootNodeWith :: (Node -&gt; Node) -&gt; Jungle -&gt; String -&gt; IO ()
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
262 </pre>
70
kono
parents: 69
diff changeset
263 <p> updateRootNodeには編集したNodeを渡すことで木の最新のルートノードを更新できる </p>
kono
parents: 69
diff changeset
264 <p> updateRootNodeWithにはNodeを編集する関数を渡すことで木の最新のルートノードを更新できる </p>
kono
parents: 69
diff changeset
265 </article>
31
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
266
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
267 <article>
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
268 <h3>
43
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
269 性能計測
31
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
270 </h3>
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
271 <p>
43
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
272 Jungle がマルチコアプロセッサで性能が出るのか、実用的なWebサービスが提供できるのか確認する
31
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
273 </p>
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
274 <p>
66
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
275 性能の計測に用いるサーバの仕様
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
276 </p>
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
277 ハイパースレッディングで24コアまで使える<br>
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
278 ハイパースレッディングはおよそ20%程度クロックあたりの性能が向上する
33
705c29dd2f6d add read benchmark
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 32
diff changeset
279 </p>
705c29dd2f6d add read benchmark
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 32
diff changeset
280 <table>
705c29dd2f6d add read benchmark
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 32
diff changeset
281 <tr>
705c29dd2f6d add read benchmark
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 32
diff changeset
282 <th>名前</th>
705c29dd2f6d add read benchmark
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 32
diff changeset
283 <th>概要</th>
705c29dd2f6d add read benchmark
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 32
diff changeset
284 </tr>
705c29dd2f6d add read benchmark
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 32
diff changeset
285 <tr>
705c29dd2f6d add read benchmark
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 32
diff changeset
286 <td>CPU</td>
705c29dd2f6d add read benchmark
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 32
diff changeset
287 <td>Intel(R) Xeon(R) CPU X5650@2.67GHz * 2</td>
705c29dd2f6d add read benchmark
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 32
diff changeset
288 </tr>
705c29dd2f6d add read benchmark
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 32
diff changeset
289 <tr>
705c29dd2f6d add read benchmark
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 32
diff changeset
290 <td>コア数</td>
705c29dd2f6d add read benchmark
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 32
diff changeset
291 <td>12</td>
705c29dd2f6d add read benchmark
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 32
diff changeset
292 </tr>
705c29dd2f6d add read benchmark
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 32
diff changeset
293 <tr>
705c29dd2f6d add read benchmark
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 32
diff changeset
294 <td>メインメモリ</td>
705c29dd2f6d add read benchmark
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 32
diff changeset
295 <td>126 GB</td>
705c29dd2f6d add read benchmark
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 32
diff changeset
296 </tr>
705c29dd2f6d add read benchmark
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 32
diff changeset
297 <tr>
705c29dd2f6d add read benchmark
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 32
diff changeset
298 <td>OS</td>
66
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
299 <td>Fedora 19</td>
33
705c29dd2f6d add read benchmark
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 32
diff changeset
300 </tr>
705c29dd2f6d add read benchmark
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 32
diff changeset
301 </table>
31
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
302 </article>
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
303
66
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
304 <article>
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
305 <h3>
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
306 Haskell コンパイラ
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
307 </h3>
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
308 <p>
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
309 Haskell のコンパイラには The Glasgow Haskell Compiler (GHC) を利用する
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
310 </p>
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
311 <p>
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
312 現在の GHC の安定版 7.6.3 は並列時にIOマネージャーがスケールしないという問題がある
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
313 </p>
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
314 <p>
70
kono
parents: 69
diff changeset
315 リリース候補版である 7.8 を用いることにより、よりよい性能を得ることができた
66
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
316 </p>
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
317 </article>
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
318
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
319 <article>
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
320 <h3>
70
kono
parents: 69
diff changeset
321 親和性機能(affinity)を利用する
66
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
322 </h3>
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
323 <p>
67
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 66
diff changeset
324 親和性機能とは OS スレッドをCPUコアに固定する機能
66
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
325 </p>
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
326 <p>
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
327 並列実行時の性能が向上するため性能計測で利用する
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
328 </p>
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
329 <p>
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
330 Haskell は実行時に -qa オプションを使うこと親和性機能を使うように指示できる
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
331 </p>
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
332 </article>
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
333
43
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
334 <article class="smaller">
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
335 <h3>
66
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
336 読み込みの性能計測
43
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
337 </h3>
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
338 <p>
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
339 木構造の読み込みにかかる時間を計測する
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
340 </p>
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
341 <p>
66
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
342 12 スレッドで親和性機能を使って実行した場合 10.37 倍の性能向上
43
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
343 </p>
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
344 <p>
67
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 66
diff changeset
345 親和性機能を使って24スレッドで実行すると実行時間が大幅に伸びる。
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 66
diff changeset
346 スレッドが CPU に固定されるため、性能計測以外のプログラムがうまくスケジューリングされないためだと考えられる
43
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
347 </p>
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
348 <table>
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
349 <tr>
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
350 <th>CPU数</th>
66
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
351 <th>親和性機能なし</th>
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
352 <th>親和性機能あり</th>
43
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
353 </tr>
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
354 <tr>
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
355 <td>1</td>
66
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
356 <td>60.95 s</td>
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
357 <td>61.00 s</td>
43
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
358 </tr>
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
359 <tr>
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
360 <td>2</td>
66
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
361 <td>30.83 s</td>
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
362 <td>33.95 s</td>
43
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
363 </tr>
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
364 <tr>
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
365 <td>4</td>
66
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
366 <td>15.49 s</td>
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
367 <td>16.10 s</td>
43
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
368 </tr>
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
369 <tr>
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
370 <td>8</td>
66
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
371 <td>10.31 s</td>
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
372 <td>8.79 s</td>
43
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
373 </tr>
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
374 <tr>
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
375 <td>12</td>
66
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
376 <td>8.49 s</td>
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
377 <td>5.88 s</td>
43
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
378 </tr>
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
379 <tr>
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
380 <td>16</td>
66
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
381 <td>5.82 s</td>
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
382 <td>5.81 s</td>
43
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
383 </tr>
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
384 <tr>
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
385 <td>20</td>
66
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
386 <td>6.54 s</td>
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
387 <td>5.48 s</td>
43
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
388 </tr>
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
389 <tr>
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
390 <td>24</td>
66
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
391 <td>8.21 s</td>
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
392 <td>125.09 s</td>
43
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
393 </tr>
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
394 </table>
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
395 </p>
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
396 </article>
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
397
66
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
398 <article class='nobackground'>
31
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
399 <h3>
66
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
400 読み込みの性能計測
43
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
401 </h3>
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
402 <p>
66
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
403 親和性機能を使った場合、実コアの12スレッドまでほぼ線形にスケールする
43
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
404 </p>
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
405 <div align="center">
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
406 <img src="images/read.png" width="700px">
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
407 </div>
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
408 </article>
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
409
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
410 <article class="smaller">
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
411 <h3>
66
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
412 書き込みの性能計測
31
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
413 </h3>
33
705c29dd2f6d add read benchmark
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 32
diff changeset
414 <p>
43
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
415 木構造の書き込みにかかる時間を計測する
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
416 </p>
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
417 <p>
66
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
418 12 スレッドで親和性機能を使って実行した場合 3.82 倍の性能向上
43
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
419 </p>
67
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 66
diff changeset
420 <p>
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 66
diff changeset
421 読み込みと同様に親和性機能を使って24スレッドで実行すると実行時間が大幅に伸びる
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 66
diff changeset
422 </p>
43
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
423 <table>
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
424 <tr>
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
425 <th>CPU数</th>
66
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
426 <th>親和性機能なし</th>
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
427 <th>親和性機能あり</th>
43
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
428 </tr>
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
429 <tr>
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
430 <td>1</td>
66
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
431 <td>49.70 s</td>
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
432 <td>49.61 s</td>
43
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
433 </tr>
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
434 <tr>
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
435 <td>2</td>
66
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
436 <td>27.77 s</td>
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
437 <td>30.76 s</td>
43
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
438 </tr>
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
439 <tr>
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
440 <td>4</td>
66
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
441 <td>18.06 s</td>
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
442 <td>18.05 s</td>
43
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
443 </tr>
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
444 <tr>
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
445 <td>8</td>
66
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
446 <td>16.66 s</td>
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
447 <td>12.50 s</td>
43
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
448 </tr>
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
449 <tr>
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
450 <td>12</td>
66
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
451 <td>15.62 s</td>
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
452 <td>12.96 s</td>
43
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
453 </tr>
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
454 <tr>
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
455 <td>16</td>
66
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
456 <td>14.91 s</td>
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
457 <td>13.11 s</td>
43
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
458 </tr>
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
459 <tr>
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
460 <td>20</td>
66
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
461 <td>15.31 s</td>
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
462 <td>13.84 s</td>
43
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
463 </tr>
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
464 <tr>
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
465 <td>24</td>
66
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
466 <td>18.11 s</td>
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
467 <td>71.66 s</td>
43
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
468 </tr>
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
469 </table>
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
470 </p>
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
471 </article>
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
472
66
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
473 <article class='nobackground'>
43
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
474 <h3>
66
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
475 書き込みの性能計測
43
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
476 </h3>
66
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
477 <p>
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
478 4 倍程度で性能向上が頭打ちになっている
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
479 </p>
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
480 <p>
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
481 同時に書き込みがあった場合、STMが処理をやり直すため並列度が下がる
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
482 </p>
43
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
483 <div align="center">
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
484 <img src="images/write.png" width="700px">
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
485 </div>
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
486 </article>
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
487
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
488 <article>
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
489 <h3>
46
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 45
diff changeset
490 考察
43
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
491 </h3>
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
492 <p>
66
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
493 読み込みが高速
43
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
494 </p>
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
495 <p>
66
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
496 書き込みより読み込みが多用されるシステムに向いている
43
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
497 </p>
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
498 </article>
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
499
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
500 <article>
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
501 <h3>
66
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
502 Webサービスに組み込んでの性能計測
43
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
503 </h3>
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
504 <p>
66
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
505 Haskell の HTTP サーバ Warp と組み合わせて Web掲示板サービスを開発する
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
506 </p>
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
507 <p>
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
508 測定ツール weighttp を用いて掲示板に読み込みと書き込みで負荷をかける。
43
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
509 </p>
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
510 <p>
67
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 66
diff changeset
511 Warp は、ハイパースレッディングで明らかに遅くなるので使わない
33
705c29dd2f6d add read benchmark
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 32
diff changeset
512 </p>
66
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
513 </article>
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
514
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
515 <article class="nobackground">
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
516 <h3>
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
517 ネットワークのボトルネック
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
518 </h3>
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
519 <p>
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
520 ネットワークのボトルネックが大きい
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
521 </p>
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
522 <p>
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
523 並列環境でどのようにスケールするか計測したいため、ネットワークを介さずに性能計測を行う
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
524 </p>
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
525 <br>
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
526 <div align="center">
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
527 <img src="images/warp.png" width="600px">
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
528 </div>
31
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
529 </article>
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
530
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
531 <article>
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
532 <h3>
66
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
533 実験環境
43
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
534 </h3>
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
535 <p>
66
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
536 3 コアを測定ツール weighttp に使い、
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
537 8 コアを Web 掲示板サービスに使う
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
538 </p>
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
539 <br>
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
540 <div align="center">
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
541 <img src="images/request.png" width="400px">
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
542 </div>
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
543 </article>
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
544
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
545 <article>
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
546 <h3>
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
547 Webサービスに組み込んでの性能計測
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
548 </h3>
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
549 <p>
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
550 読み込みと書き込みの実験結果
43
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
551 </p>
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
552 <p>
66
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
553 1秒間あたりどれだけリクエストを捌けるかという指標で比較
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
554 大きければ大きいほど性能が良い
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
555 </p>
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
556 <p>
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
557 8 スレッドで実行時、読み込みは 6.18 倍、書き込みは3.93倍の性能向上
43
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
558 </p>
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
559 <table>
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
560 <tr>
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
561 <th>CPU数</th>
66
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
562 <th>読み込み</th>
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
563 <th>書き込み</th>
43
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
564 </tr>
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
565 <tr>
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
566 <td>1</td>
66
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
567 <td>22,624 req/s</td>
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
568 <td>28,552 req/s</td>
43
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
569 </tr>
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
570 <tr>
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
571 <td>2</td>
66
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
572 <td>43,083 req/s</td>
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
573 <td>53,765 req/s</td>
43
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
574 </tr>
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
575 <tr>
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
576 <td>4</td>
66
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
577 <td>92,548 req/s</td>
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
578 <td>98,691 req/s</td>
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
579 </tr>
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
580 <tr>
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
581 <td>6</td>
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
582 <td>119,310 req/s</td>
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
583 <td>99,009 req/s</td>
43
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
584 </tr>
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
585 <tr>
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
586 <td>8</td>
66
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
587 <td>139,965 req/s</td>
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
588 <td>112,212 req/s</td>
43
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
589 </tr>
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
590 </table>
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
591 </article>
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
592
66
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
593 <article class='nobackground'>
43
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
594 <h3>
66
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
595 Webサービスに組み込んでの性能計測
31
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
596 </h3>
43
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
597 <p>
66
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
598 Jungle 単体での実験結果と同じで、読み込みのほうがスケールする
43
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
599 </p>
66
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
600 <div align="center">
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
601 <img src="images/bbs.png" width="700px">
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
602 </div>
43
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
603 </article>
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
604
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
605 <article>
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
606 <h3>
66
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
607 Java との比較
43
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
608 </h3>
66
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
609 <p>
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
610 HaskellとJavaで同様のWeb掲示板サービスを用意する
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
611 </p>
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
612 <p>
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
613 実環境を想定して、ブレードサーバ2台用意し、ネットワークを介して負荷をかける
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
614 </p>
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
615 <p>
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
616 100 万リクエストを処理するのにかかる時間を計測
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
617 </p>
43
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
618
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
619 <table>
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
620 <tr>
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
621 <th>測定</th>
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
622 <th>Haskell</th>
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
623 <th>Java</th>
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
624 </tr>
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
625 <tr>
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
626 <td>読み込み</td>
66
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
627 <td>16.31 s</td>
43
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
628 <td>53.13 s</td>
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
629 </tr>
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
630 <tr>
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
631 <td>書き込み</td>
66
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
632 <td>20.17 s</td>
43
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
633 <td>76.4 s</td>
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
634 </tr>
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
635 </table>
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
636 <p>
66
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
637 読み込みで 3.25 倍、書き込みで 3.78 倍の性能差
43
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
638 </p>
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
639 <p>
66
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
640 Haskell は実用的なWebサービスを開発できる
46
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 45
diff changeset
641 </p>
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 45
diff changeset
642 </article>
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 45
diff changeset
643
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 45
diff changeset
644 <article>
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 45
diff changeset
645 <h3>
66
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
646 Java との比較 - 生産性
46
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 45
diff changeset
647 </h3>
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 45
diff changeset
648 <p>
66
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
649 生産性の面からも Java との比較を行う
46
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 45
diff changeset
650 </p>
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 45
diff changeset
651 <p>
66
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
652 Haskell 版 Jungle は 284 行、
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
653 Java 版 Jungle は 3,390 行
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
654 </p>
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
655 <p>
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
656 実装が 1/12 程度のサイズとなっている
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
657 </p>
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
658 <p>
67
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 66
diff changeset
659 再帰的なデータ型の定義ができることや、関数の再利用が行いやすいことが要因
66
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
660 </p>
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
661 <p>
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
662 同じ機能を実装する場合でも、Haskell は Java と比較してコード行数が短くなる
43
aa6de0f67a0a add files
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
663 </p>
31
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
664 </article>
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
665
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
666 <article>
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
667 <h3>
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
668 まとめ
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
669 </h3>
45
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 43
diff changeset
670 <p>
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 43
diff changeset
671 純粋関数型言語 Haskell を用いて並列データベースの実装をおこなった
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 43
diff changeset
672 </p>
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 43
diff changeset
673 <p>
66
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
674 読み込みに関して 12 コアで実行した場合、10.37 倍 という性能向上率が確認できた
45
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 43
diff changeset
675 </p>
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 43
diff changeset
676 <p>
66
7c7afe38c9d6 rewrite slides
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 46
diff changeset
677 また、Web 掲示板サービスを開発し、Java と比較して読み込みで 3.25 倍、書き込みで 3.78 倍の性能が確認できた
45
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 43
diff changeset
678 </p>
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 43
diff changeset
679 </article>
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 43
diff changeset
680
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 43
diff changeset
681 <article>
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 43
diff changeset
682 <h3>
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 43
diff changeset
683 今後の課題
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 43
diff changeset
684 </h3>
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 43
diff changeset
685 <p>
46
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 45
diff changeset
686 書き込み処理の性能向上
45
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 43
diff changeset
687 </p>
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 43
diff changeset
688 <p>
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 43
diff changeset
689 分散データベースとしての実装
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 43
diff changeset
690 </p>
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 43
diff changeset
691 <p>
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 43
diff changeset
692 永続性の実装
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 43
diff changeset
693 </p>
31
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
694 </article>
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
695
68
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 67
diff changeset
696 <article>
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 67
diff changeset
697 <h3>
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 67
diff changeset
698 GHC 7.6.3 の IO マネージャーの問題
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 67
diff changeset
699 </h3>
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 67
diff changeset
700 <p>
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 67
diff changeset
701 GHC 7.6.3 には 並列実行時に IO マネージャーがスケールしないという問題がある
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 67
diff changeset
702 </p>
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 67
diff changeset
703 <div align="center">
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 67
diff changeset
704 <img src="images/ghc.png" width="700px">
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 67
diff changeset
705 </div>
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 67
diff changeset
706 </article>
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents: 67
diff changeset
707
31
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
708 </body>
Daichi TOMA <toma@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
709 </html>