comparison preliminary/final-thesis.tex @ 3:d54646faa2a9 default tip

fix
author MasaKoha <kogagura@cr.ie.u-ryukyu.ac.jp>
date Tue, 16 Jun 2015 11:55:03 +0900
parents c0933fa26c81
children
comparison
equal deleted inserted replaced
2:c0933fa26c81 3:d54646faa2a9
49 \end{center} 49 \end{center}
50 \caption{include I/O Task} 50 \caption{include I/O Task}
51 \label{fig:includeio} 51 \label{fig:includeio}
52 \end{figure} 52 \end{figure}
53 53
54 \section{並列処理向け I/O の設計と実装} 54 \section{Design and implementation of parallel processing for I/O}
55 55
56 \subsection{mmap での実装の問題点} 56 \subsection{problems implementation of mmap}
57 先行研究では mmap によるファイルの読み込みを行っていた。 57 In previous research we has done the reading of files in mmap.
58 mmap でファイルを読み込むタイミングは、mmap 関数が呼ばれたときではなく、mmap した領域に対して何らかのアクセスをしたときに初めてファイルが読み込まれる。 58 Timing for reading files in mmap , not when the mmap function was called , for the first time the file is read when you access something with it mmap regions.
59 つまり、分割された Task は文字列検索をすぐに行うのではなく、文字列検索を行おうとした時に初めてファイルが格納される。 59 So divided Task is not to perform a string search immediately, the first time the file is stored in memory when it tries to string search .
60 Task は複数一斉に実行されることが望ましいが、mmap ではそれぞれの Task で読み込みが起こってしまうため、I/O ネックによる Task の待ちが発生する。 60 Task is desirably performed simultaneously .
61 Since the reading is in mmap in each Task would happening , waiting Task by the I/O bottleneck occurs.
61 62
62 \subsection{Blocked Read の設計と実装} 63 \subsection{Design and implementation of Asynchronous read}
63 Blocked Read とは、あるサイズずつで読み込む処理と、それらに文字列検索を行う処理を分離させるための実装方法である。 64 Asynchronous read separate to a process to read certain size and to perform a string search .
64 この方法では、読み込み専用の Blocked Read と、文字列検索を行う Task Blocks を別々に生成し処理を行う。 65 In this way , I do a read-only Asynchronous read, it was generated separately the Task Blocks to perform a string search processing .
65 Read Task はファイル全体を一度に読み込むのではなく、ある程度の大きさで分割を行い、読み込みされ次第それぞれの文字列検索が行われる。
66 66
67 Task は 1つずつ起動すると、起動した Task でメモリを圧迫してしまうため、Task を複数まとめたブロック単位で起動を行う。 67 Read Task is not to read the entire file at once , performs a split certain size , each character string search is performed as soon as they are read.
68 この1つのブロックで処理されるテキストファイルを、Blocked Read で読み込んでいき、読み込みが終わったら読み込まれた範囲の Task Blocks を起動する。 68 Task When starting one by one, because it would compress memory in Task you start to perform the boot block summarizes multiple Task.
69 もし、Blocked Read で読み込まれる前にその範囲を担当する Task が起動してしまうと、正しい結果が返ってこない。 69
70 それを防止するために、Task Blocks は必ず Blocked Read が行われてから起動するように wait をかけている。 70 A text file to be processed in this one block , and we read in the Asynchronous Read, to start the Task Blocks in the range that has been read when you are finished loading .
71 (図\ref{fig:blockedreadwait}) 71 If the Task, which is responsible for the range before it is read by the Asynchronous Read ends up starting, not return the correct results.
72 To prevent it, Task Blocks are always Blocked Read and wears wait to start from taking place.
73 (fig\ref{fig:blockedreadwait})
72 74
73 \begin{figure}[htbp] 75 \begin{figure}[htbp]
74 \begin{center} 76 \begin{center}
75 \includegraphics[width=0.5\textwidth]{pic/blockedreadwait.pdf} 77 \includegraphics[width=0.5\textwidth]{pic/blockedreadwait.pdf}
76 \end{center} 78 \end{center}
77 \caption{Wait for Blocked Read} 79 \caption{Wait for Blocked Read}
78 \label{fig:blockedreadwait} 80 \label{fig:blockedreadwait}
79 \end{figure} 81 \end{figure}
80 82
81 \subsection{I/O 専用 thread の実装} 83 \subsection{Implementation I/O thread}
82 Cerium Task Manager では Task 単位で CPU Type の設定を変更することができる。 84 It is possible to change the settings for the CPU Type in Cerium Task Manager In Task Unit.
83 SPE\_ANY という Type を設定すると、Cerium Task Manager 側が自動的に CPU を割り振る。 85 If you set the Type of SPE\_ANY, Cerium Task Manager side automatically allocates CPU.
84 しかし、今回の実装でこの Type を使用してしまうと、Blocked Read Task に割り込んで Task が割り振られてしまう問題がある。 86 However, if you would use this Type in this implementation, there is a problem that the Task to interrupt the Blocked Read Task would have been allocated.
85 その問題を解決するために、IO\_0 という I/O 専用の thread を実装した。 87 In order to solve the problem, an implementation of the thread of the dedicated I/O of IO\_0.
86 この Thread は I/O を最優先に実行されるようにチューニングを行った。 88 This Thread was tuned to run at the highest priority to the I/O.
87 (図\ref{fig:io0}) 89 (fig\ref{fig:io0})
88 %% 90 %%
89 %(図\ref{fig:speany}) 91 %(fig\ref{fig:speany})
90 % 92 %
91 %\begin{figure}[htbp] 93 %\begin{figure}[htbp]
92 %\begin{center} 94 %\begin{center}
93 %\includegraphics[width=0.4\textwidth]{pic/speany.pdf} 95 %\includegraphics[width=0.4\textwidth]{pic/speany.pdf}
94 %\end{center} 96 %\end{center}
111 113
112 \begin{itemize} 114 \begin{itemize}
113 \item Mac OS X Mavericks (10.9.1) 115 \item Mac OS X Mavericks (10.9.1)
114 \item HDD 1TB、Memory 16GB、CPU 2*2.66 GHz 6-Core Intel Xeon 116 \item HDD 1TB、Memory 16GB、CPU 2*2.66 GHz 6-Core Intel Xeon
115 \item CPU NUM 12 117 \item CPU NUM 12
116 \item 10GB のファイルに対して Booye-Moore String Search をかけ、検索文字列がいくつ含まれているのかカウント 118 \item Is multiplied by the Booye-Moore String Search for the 10GB file , count what is included a number of search string
117 \item 測定はファイルの読み込みから結果が返ってくるまでの時間 119 \item Time until the measurements returned results from reading the file
118 \end{itemize} 120 \end{itemize}
119 121
120 %以下の表\ref{table:result}に実行結果を示す。 122 %以下の表\ref{table:result}に実行結果を示す。
121 以下の表1に実行結果を示す。
122
123 \begin{tiny} 123 \begin{tiny}
124 \begin{table}[ht] 124 \begin{table}[ht]
125 \begin{center} 125 \begin{center}
126 \label{table:result} 126 \label{table:result}
127 \small 127 \small
142 \end{center} 142 \end{center}
143 \end{table} 143 \end{table}
144 \end{tiny} 144 \end{tiny}
145 145
146 %\ref{table:result}より、mmap より Blocked Read \& IO\_0 の実行速度が 36 \% 改善された。 146 %\ref{table:result}より、mmap より Blocked Read \& IO\_0 の実行速度が 36 \% 改善された。
147 表1より、mmap より Blocked Read \& SPE\_ANY の実行速度が 31\% 改善された。 147 From Table 1, the execution speed of Asynchronous Read \&SPE\_ANY has been improved 31\% from mmap.
148 また、Blocked Read の CPU Type も SPE\_ANY から IO\_0 に変更することによって更に 4 \% の改善が見られた。 148 In addition, CPU Type of Asynchronous Read was also seen further 4\% improvement by changing from SPE\_ANY to IO\_0.
149 これより、I/O を含む並列処理を行う場合は、mmap で実装することによって自動的に読み込ませるのではなく、自分自身で読み込みを制御したほうが速くなることがわかる。 149 From this , when performing parallel processing including I/O, instead of automatically to read by implementing in mmap, it is understood that better to control the reading in itself increases.
150 150
151 \section{conclusion} 151 \section{conclusion}
152 mmap で I/O を含む Task を実装するとき、mmap した領域に対して何らかの処理が加わった時にしか読み込みが行わないので、それぞれの Task に読み込みを任せてしまうことになる。 152 When implementing the Task containing an I / O with mmap, because reading is not carried out only when some processing is applied with respect to the mmap regions , so that it would leave the loading on each Task.
153 それを解決する方法として、Blocked Read と Task を並列に行う実装を行った。 153 As a method to solve it, and we implemented that performs Asynchronous Read and Task in parallel .
154 また、Blocked Read が、他の Task に割り込まれないように改善した結果、35 \% の実行速度の改善が見られた。 154 Also , Asynchronous Read is a result of improved so as not to be interrupted in another Task, 35 \% improvement in execution speed was observed .
155 本研究より、I/O を含む Task は、チューニング次第で更に改善する余地があると考える。 155 From this study , Task , including an I / O , it is considered that there is room to further improve depending tuning.
156
157 156
158 \thispagestyle{fancy} 157 \thispagestyle{fancy}
159 \begin{thebibliography}{9} 158 \begin{thebibliography}{9}
160 159
161 \bibitem{kinjyo}金城裕、河野真治、多賀野海人、小林佑亮 (琉球大学)\\ 160 \bibitem{kinjyo}金城裕、河野真治、多賀野海人、小林佑亮 (琉球大学)\\