annotate paper/evaluation.tex @ 2:642ff24cf0bc

fig modify
author fuchita
date Tue, 12 Feb 2008 18:08:59 +0900
parents 420c2d37b2bf
children f3ef2f99653f
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
420c2d37b2bf Initial revision
fuchita
parents:
diff changeset
1 \chapter{分散デバッグ機能と評価}
420c2d37b2bf Initial revision
fuchita
parents:
diff changeset
2 \section{分散デバッグ開発}
420c2d37b2bf Initial revision
fuchita
parents:
diff changeset
3 本章ではFederated Lindaを用いた分散開発環境でのデバッグについて述べる。
420c2d37b2bf Initial revision
fuchita
parents:
diff changeset
4 本論文で提案する分散デバッグのアプローチは、3章で問題点を挙げた通信状態のデバッグ
420c2d37b2bf Initial revision
fuchita
parents:
diff changeset
5 をタプルサーバーへの拡張を行う事で実現するものである。
420c2d37b2bf Initial revision
fuchita
parents:
diff changeset
6 以下にその詳細と、その他の実現すべき分散デバッグ環境についてを示す。
420c2d37b2bf Initial revision
fuchita
parents:
diff changeset
7
420c2d37b2bf Initial revision
fuchita
parents:
diff changeset
8 \subsection{Java版タプルサーバーへの機能拡張}
420c2d37b2bf Initial revision
fuchita
parents:
diff changeset
9 分散プログラムでは複数のノードが独立で実行され、互いに
420c2d37b2bf Initial revision
fuchita
parents:
diff changeset
10 通信しあうという実行環境の為に、逐次プログラムよりもデバッグを行う事は難しい。
420c2d37b2bf Initial revision
fuchita
parents:
diff changeset
11 現在主に用いられている単体の逐次デバッガは分散環境用に作られていないことから、
420c2d37b2bf Initial revision
fuchita
parents:
diff changeset
12 分散環境でのデバッグの場合、1プロセスに対してデバッガを動かすか、
420c2d37b2bf Initial revision
fuchita
parents:
diff changeset
13 複数プロセスに対してそれぞれデバッガを動かしてデバッグを行うかの
420c2d37b2bf Initial revision
fuchita
parents:
diff changeset
14 どちらかのスタイルがとられる。これではデバッグすべきプロセスが増えるとその手間はかなりの物になり、
420c2d37b2bf Initial revision
fuchita
parents:
diff changeset
15 現実的なデバッグ手法とは言えない。
420c2d37b2bf Initial revision
fuchita
parents:
diff changeset
16
420c2d37b2bf Initial revision
fuchita
parents:
diff changeset
17 また、上記の手法を用いたとしても分散プログラム環境下ではプログラム状態の非決定性が存在するため
420c2d37b2bf Initial revision
fuchita
parents:
diff changeset
18 問題がある。通信の到着順序によっても分岐が変化してしまうことから、デバッグ対象のエラーに
420c2d37b2bf Initial revision
fuchita
parents:
diff changeset
19 対して再現性を確保するのは難しい。通常、分散環境下でのデバッグではこれらの点をふまえて、
420c2d37b2bf Initial revision
fuchita
parents:
diff changeset
20
420c2d37b2bf Initial revision
fuchita
parents:
diff changeset
21 \begin{itemize}
420c2d37b2bf Initial revision
fuchita
parents:
diff changeset
22 \item {通信におけるプログラムの状態が決定的になるようテストする}
420c2d37b2bf Initial revision
fuchita
parents:
diff changeset
23 \item {非決定性をシミュレートする}
420c2d37b2bf Initial revision
fuchita
parents:
diff changeset
24 \item {バリア同期で通信を止めてメモリ等の状態を調べる}
420c2d37b2bf Initial revision
fuchita
parents:
diff changeset
25 \item {各ノードでのスナップショットをとってログを解析する}
420c2d37b2bf Initial revision
fuchita
parents:
diff changeset
26 \end{itemize}
420c2d37b2bf Initial revision
fuchita
parents:
diff changeset
27
420c2d37b2bf Initial revision
fuchita
parents:
diff changeset
28 といった方法がとられる。
420c2d37b2bf Initial revision
fuchita
parents:
diff changeset
29 今回は、Fedarated Lindaを用いた分散プログラム開発としてCompact Routingを用いるFederated Lindaの
420c2d37b2bf Initial revision
fuchita
parents:
diff changeset
30 分散アルゴリズムの開発を行った経験にて、必要であると考えられた、サーバーやクライアント間での通信を止めずに、動いているFederated Lindaの通信量をデバッグする(すなわち、通信量のスケーラビリティを見る)インターフェースを開発した。
420c2d37b2bf Initial revision
fuchita
parents:
diff changeset
31
420c2d37b2bf Initial revision
fuchita
parents:
diff changeset
32 \subsection{Java版タプルサーバーへの通信量デバッグ機能の実装}
420c2d37b2bf Initial revision
fuchita
parents:
diff changeset
33 \begin{center}
420c2d37b2bf Initial revision
fuchita
parents:
diff changeset
34 \begin{itembox}[l]{ComDebug機能拡張部分}
420c2d37b2bf Initial revision
fuchita
parents:
diff changeset
35 {\footnotesize
420c2d37b2bf Initial revision
fuchita
parents:
diff changeset
36 \begin{verbatim}
420c2d37b2bf Initial revision
fuchita
parents:
diff changeset
37 if (debug) {
420c2d37b2bf Initial revision
fuchita
parents:
diff changeset
38 System.out.println("data from : "+key.channel());
420c2d37b2bf Initial revision
fuchita
parents:
diff changeset
39 }
420c2d37b2bf Initial revision
fuchita
parents:
diff changeset
40 if((mode == '!') || (len == 0)) {
420c2d37b2bf Initial revision
fuchita
parents:
diff changeset
41 Connection_Close(key);
420c2d37b2bf Initial revision
fuchita
parents:
diff changeset
42 com_debug.reportCh_remove(key, reportCh_list);
420c2d37b2bf Initial revision
fuchita
parents:
diff changeset
43 }
420c2d37b2bf Initial revision
fuchita
parents:
diff changeset
44 else if(mode == PSX_CHECK) {
420c2d37b2bf Initial revision
fuchita
parents:
diff changeset
45 Check(key, command);
420c2d37b2bf Initial revision
fuchita
parents:
diff changeset
46 }
420c2d37b2bf Initial revision
fuchita
parents:
diff changeset
47 else if(mode == PSX_IN || mode == PSX_RD){
420c2d37b2bf Initial revision
fuchita
parents:
diff changeset
48 In_Rd(key, command, mode);
420c2d37b2bf Initial revision
fuchita
parents:
diff changeset
49 }
420c2d37b2bf Initial revision
fuchita
parents:
diff changeset
50 else if (mode == PSX_WAIT_RD) {
420c2d37b2bf Initial revision
fuchita
parents:
diff changeset
51 Wait_Rd(key, command, mode);
420c2d37b2bf Initial revision
fuchita
parents:
diff changeset
52 } else if(mode == PSX_OUT) {
420c2d37b2bf Initial revision
fuchita
parents:
diff changeset
53 Out(command, data);
420c2d37b2bf Initial revision
fuchita
parents:
diff changeset
54 } else {
420c2d37b2bf Initial revision
fuchita
parents:
diff changeset
55 System.out.println("Uncorrect buffer");
420c2d37b2bf Initial revision
fuchita
parents:
diff changeset
56 System.exit(1);
420c2d37b2bf Initial revision
fuchita
parents:
diff changeset
57 }
420c2d37b2bf Initial revision
fuchita
parents:
diff changeset
58
420c2d37b2bf Initial revision
fuchita
parents:
diff changeset
59 //COM_DEBUG
420c2d37b2bf Initial revision
fuchita
parents:
diff changeset
60 if(id > PRIVILEGED_ID_START && id < PRIVILEGED_ID_END){
420c2d37b2bf Initial revision
fuchita
parents:
diff changeset
61 ComDebug.addChannel(key, reportCh_list);
420c2d37b2bf Initial revision
fuchita
parents:
diff changeset
62 }
420c2d37b2bf Initial revision
fuchita
parents:
diff changeset
63 //DEBUG用カウンタ
420c2d37b2bf Initial revision
fuchita
parents:
diff changeset
64 ComDebug.Com_inc(key, com_Loggingtable, mode);
420c2d37b2bf Initial revision
fuchita
parents:
diff changeset
65 //DEBUG用レポート
420c2d37b2bf Initial revision
fuchita
parents:
diff changeset
66 ComDebug.Report(reportCh_list, command, com_Loggingtable.toString());
420c2d37b2bf Initial revision
fuchita
parents:
diff changeset
67
420c2d37b2bf Initial revision
fuchita
parents:
diff changeset
68 \end{verbatim}
420c2d37b2bf Initial revision
fuchita
parents:
diff changeset
69 }
420c2d37b2bf Initial revision
fuchita
parents:
diff changeset
70 \end{itembox}
420c2d37b2bf Initial revision
fuchita
parents:
diff changeset
71 \end{center}
420c2d37b2bf Initial revision
fuchita
parents:
diff changeset
72
420c2d37b2bf Initial revision
fuchita
parents:
diff changeset
73 \newpage
420c2d37b2bf Initial revision
fuchita
parents:
diff changeset
74 \subsection{通信ログ情報のグラフィカルな表示ツール}
420c2d37b2bf Initial revision
fuchita
parents:
diff changeset
75
420c2d37b2bf Initial revision
fuchita
parents:
diff changeset
76 \begin{figure}[htbp]
420c2d37b2bf Initial revision
fuchita
parents:
diff changeset
77 \begin{center}
2
642ff24cf0bc fig modify
fuchita
parents: 0
diff changeset
78 \includegraphics[width=10cm]{fig/pdf/visual01.pdf}
0
420c2d37b2bf Initial revision
fuchita
parents:
diff changeset
79 \caption{通信量のグラフィカルな表示ツール}
420c2d37b2bf Initial revision
fuchita
parents:
diff changeset
80 \label{visual01}
420c2d37b2bf Initial revision
fuchita
parents:
diff changeset
81 \end{center}
420c2d37b2bf Initial revision
fuchita
parents:
diff changeset
82 \end{figure}
420c2d37b2bf Initial revision
fuchita
parents:
diff changeset
83
420c2d37b2bf Initial revision
fuchita
parents:
diff changeset
84
420c2d37b2bf Initial revision
fuchita
parents:
diff changeset
85 \subsection{Federated Lindaにおける分散デバッグ}
420c2d37b2bf Initial revision
fuchita
parents:
diff changeset
86 分散環境におけるデバッグとは、単純に全ノードに対してデバッガを走らせれば完全にデバッグできるという
420c2d37b2bf Initial revision
fuchita
parents:
diff changeset
87 訳ではない。事実、システム資源の異なるノードに対してネットワークを介したリモートデバッグの手法は
420c2d37b2bf Initial revision
fuchita
parents:
diff changeset
88 数多く開発されていても、それが大規模システムを想定した分散プログラムに対してスケーラビリティを
420c2d37b2bf Initial revision
fuchita
parents:
diff changeset
89 保ったままデバッグ可能という解を得てはいない。
420c2d37b2bf Initial revision
fuchita
parents:
diff changeset
90
420c2d37b2bf Initial revision
fuchita
parents:
diff changeset
91 Federated Lindaはタプルのリレーという、より分散プログラムを意識したモデルであることから、デバッグ
420c2d37b2bf Initial revision
fuchita
parents:
diff changeset
92 インターフェースの大域的状態の取得にもスケーラビリティを持った実装を目指す。
420c2d37b2bf Initial revision
fuchita
parents:
diff changeset
93 その基本的なアイデアは、デバッグ情報を取得するインターフェースに対してもLindaプロトコルによるタプ
420c2d37b2bf Initial revision
fuchita
parents:
diff changeset
94 ルの伝搬を利用して実装するというものである。
420c2d37b2bf Initial revision
fuchita
parents:
diff changeset
95
420c2d37b2bf Initial revision
fuchita
parents:
diff changeset
96 下図\ref{FDLindaDebug}に示すように、Federated Lindaを用いたデバッグインターフェースは、デバッガ
420c2d37b2bf Initial revision
fuchita
parents:
diff changeset
97 プロセスからあるノードに対してデバッグ情報の取得を指示するオペレーションを発行し、デバッグ情報の
420c2d37b2bf Initial revision
fuchita
parents:
diff changeset
98 取得を行うデバッグプロトコルとしてタプル間を伝搬させる。
420c2d37b2bf Initial revision
fuchita
parents:
diff changeset
99 デバッガが受け取る結果はFederared Linda内のスナップショットとしての大域的状態であり、それを元に
420c2d37b2bf Initial revision
fuchita
parents:
diff changeset
100 デバッグを行う。このような仕組みをとる事で、大規模な分散プログラム環境であってもスケーラビリティ
420c2d37b2bf Initial revision
fuchita
parents:
diff changeset
101 を保ったままデバッグを行う事が可能となる。
420c2d37b2bf Initial revision
fuchita
parents:
diff changeset
102
420c2d37b2bf Initial revision
fuchita
parents:
diff changeset
103 \begin{figure}[htbp]
420c2d37b2bf Initial revision
fuchita
parents:
diff changeset
104 \begin{center}
420c2d37b2bf Initial revision
fuchita
parents:
diff changeset
105 \includegraphics[width=14cm]{fig/pdf/FDLindaDebug.pdf}
420c2d37b2bf Initial revision
fuchita
parents:
diff changeset
106 \caption{スケーラビリティを意識したデバッグインターフェース}
420c2d37b2bf Initial revision
fuchita
parents:
diff changeset
107 \label{FDLindaDebug}
420c2d37b2bf Initial revision
fuchita
parents:
diff changeset
108 \end{center}
420c2d37b2bf Initial revision
fuchita
parents:
diff changeset
109 \end{figure}
420c2d37b2bf Initial revision
fuchita
parents:
diff changeset
110
420c2d37b2bf Initial revision
fuchita
parents:
diff changeset
111
420c2d37b2bf Initial revision
fuchita
parents:
diff changeset
112
420c2d37b2bf Initial revision
fuchita
parents:
diff changeset
113 \subsection{分散デバッグの実現}
420c2d37b2bf Initial revision
fuchita
parents:
diff changeset
114 Federated Lindaにおける分散デバッグ環境の開発の為に、リングトポロジにおける分散スナップショ
420c2d37b2bf Initial revision
fuchita
parents:
diff changeset
115 ットを用いたログデバッギングを考える。以下にその詳細を示す。
420c2d37b2bf Initial revision
fuchita
parents:
diff changeset
116
420c2d37b2bf Initial revision
fuchita
parents:
diff changeset
117 \subsubsection{リングトポロジにおける分散スナップショット}
420c2d37b2bf Initial revision
fuchita
parents:
diff changeset
118
420c2d37b2bf Initial revision
fuchita
parents:
diff changeset
119 \begin{figure}[htbp]
420c2d37b2bf Initial revision
fuchita
parents:
diff changeset
120 \begin{center}
420c2d37b2bf Initial revision
fuchita
parents:
diff changeset
121 \includegraphics[width=6cm]{fig/pdf/Ring.pdf}
420c2d37b2bf Initial revision
fuchita
parents:
diff changeset
122 \caption{リングトポロジでの分散スナップショット}
420c2d37b2bf Initial revision
fuchita
parents:
diff changeset
123 \label{Ring}
420c2d37b2bf Initial revision
fuchita
parents:
diff changeset
124 \end{center}
420c2d37b2bf Initial revision
fuchita
parents:
diff changeset
125 \end{figure}
420c2d37b2bf Initial revision
fuchita
parents:
diff changeset
126
420c2d37b2bf Initial revision
fuchita
parents:
diff changeset
127 \begin{figure}[htbp]
420c2d37b2bf Initial revision
fuchita
parents:
diff changeset
128 \begin{center}
420c2d37b2bf Initial revision
fuchita
parents:
diff changeset
129 \includegraphics[width=6cm]{fig/pdf/RingInRing.pdf}
420c2d37b2bf Initial revision
fuchita
parents:
diff changeset
130 \caption{リンググループを内包したリングトポロジ}
420c2d37b2bf Initial revision
fuchita
parents:
diff changeset
131 \label{RingInRing}
420c2d37b2bf Initial revision
fuchita
parents:
diff changeset
132 \end{center}
420c2d37b2bf Initial revision
fuchita
parents:
diff changeset
133 \end{figure}
420c2d37b2bf Initial revision
fuchita
parents:
diff changeset
134
420c2d37b2bf Initial revision
fuchita
parents:
diff changeset
135
420c2d37b2bf Initial revision
fuchita
parents:
diff changeset
136 \begin{verbatim}
420c2d37b2bf Initial revision
fuchita
parents:
diff changeset
137
420c2d37b2bf Initial revision
fuchita
parents:
diff changeset
138 \end{verbatim}