# HG changeset patch # User Daichi TOMA # Date 1342962539 -32400 # Node ID 7efb3ef942959024ac279dfe42ed235747dc091e # Parent fa9cfac507765816a5407781a18171739817aeba add a section of benchmark diff -r fa9cfac50776 -r 7efb3ef94295 Paper/paper.tex --- a/Paper/paper.tex Sun Jul 22 14:24:53 2012 +0900 +++ b/Paper/paper.tex Sun Jul 22 22:08:59 2012 +0900 @@ -60,35 +60,39 @@ \label{fig:scheduler} \end{figure} -\section{マルチコア上での並列実行の機構}\label{section:impl} - -PlayStation 3/Cell 上の場合, 各 SPE に Task が割り当てられ, 並列に実行される. - -今回新たに, Mac OS X, Linux 上でも並列に実行させることを可能にした. -これは, PlayStation 3/Cell の Mailbox に対応させる形で, -Synchronized Queue を用いて Mac OS X, Linux 側の Cerium Task Manager へ移植したものである. -操作しているスレッドが常に1つになるよう, バイナリセマフォで管理されている. -各スレッドは, input 用と output 用として Synchronized Queue を2つ持っており, -管理スレッドからタスクを受けて並列に実行するようになっている. - -また, PlayStation 3/Cell と違い各 CPU で同じメモリ空間が利用できるため, -DMA転送を用いていた箇所をポインタ渡しをするように修正し, 速度の向上を図った. +% Cell の説明いれる % \subsection{Mailbox} % Mailbox は, Cell の機能の1つである. % Mailbox は, PPE と SPE の間を双方向で, 32 bit メッセージの受け渡しが可能であり, % FIFO キュー構造になっている. +\section{mechanism of parallel execution on multi-core}\label{section:impl} -\section{ベンチマーク} -Word Count, Sort 及び Prime Counter の例題を用いて, 計測した. -それぞれ入力として, 100MB のテキストファイルの単語数カウント, 10 万入力のソート, 100 万までの範囲の素数を全て数え上げるようになっている. -比較対象として, PlayStation 3/Cell においても同様の例題を用いて計測している. -どちらも, 最適化レベルは最大にしてある. +If on a PlayStation 3, Task is assigned to each SPE, then to be executed in parallel. +Cerium Task Manager possible to be executed in parallel on Mac OSX and Linux anew. + +We implement a synchronized queue on Mac OS X and Linux. +The synchronized queue corresponds to the Mailbox on Playstation 3. +For only one thread use the synchronized queue, that was managed by a binary semaphore. +Each threads has two synchronized queues for input and output, +be able to execute in parallel tasks was received under managment thread. + +Furthermore, because multicore available the same memory space in comparison with Playstation 3, +we modified to pass the pointer a spots that were using the transfer DMA, aimed to improve the speed. -表\ref{table:benchmark}に結果を示す. +\section{Benchmark} -{\bf 実験環境} +Performance was measured using the example of Word Count, Sort and Prime Counter. +Word Count is to count number of words in the 100MBtext file. +Sort is to sort in one hundred thousand pieces of numeric. +Prime Counter is to enumerate all the prime numbers in the range of up to one million. +for comparsion performance was measured using the same example in PlayStation 3. +Both the optimization level is at the maximum. + +The results are shown in Table \ref{table:benchmark}. + +{\bf Experiment environment} CentOS/Xeon \begin{small} @@ -139,11 +143,14 @@ % Word Count 354 / 70 = 5.0571 % Sort 846 / 163 = 5.1901 % Prime Counter 266 / 50 = 5.32 -表\ref{table:benchmark}より, CentOS上で 6 CPU を利用した場合, 1 CPU を利用した場合と比較して -Word Count の例題で約 5.1 倍, Sort の例題で約 5.2 倍, Prime Counter の例題で, 約 5.3倍の速度向上が見られる. -しかしながら, 24 CPU を利用した場合, 12 CPU を利用した場合と比較して速度は上がっているものの速度向上率が落ちている. -これは並列化率が低いために性能を活かすことができず, 速度向上が頭打ちになっているとアムダールの法則\cite{amdahl}から考えられる. -並列化率の向上は今後の課題である. + +We use 6 CPU on CentOS, as compared with the case using 1 CPU, +about 5.1 times the speed improvement in the example of WordCount, +about 5.2 times the speed improvement in the example of Sort, +about 5.3 times the speed improvement in the example of Prime Counter. +If we use 24 CPU, the speed is rising as compared with the case using 12 CPU, however, the speed improvement rate is down. +This is probably concurrency is low, and that seems to be grinding to a halt speed improvement from Amdahl's law\cite{amdahl}. +Improvement of parallelization rate is a challenge for the future. % また, 図\ref{fig:multi_result}より, 台数効果が確認できる.