@@ -170,7 +170,8 @@ \subsubsection{Benefit to Project}
170
170
171
171
The main benefit of \cite {kademlia } is that it describes how the Kademlia algorithm
172
172
is implemented on a network. Using the information in this paper, I created an
173
- adaptation of the Kademlia algorithm for use in a simulation.
173
+ adaptation of the Kademlia algorithm for use in a simulation. The simulation in
174
+ turn can be used to test how well a Kademlia DHT handles node removals.
174
175
175
176
\section {Software }
176
177
\label {sec:software }
@@ -289,22 +290,21 @@ \subsubsection{simulation.py}
289
290
\subsubsection {RunSimulation.py }
290
291
\label {sec:runsim }
291
292
RunSimulation.py is a script that will build a network and then iteratively run
292
- a number of randomized look-ups (see
293
- \texttt {Simulation.perform\_ node\_ lookup }
294
- ; printing the average RTT to stdout after it finishes each
295
- iteration (trial). One important thing to note is that before actual tests are
296
- run, the script will perform a number of random look-ups equal to half of the
297
- size of the network. This is because in a new network the nodes will learn about
298
- other nodes in the system more rapidly than in an established network. Training
299
- the nodes at the beginning prevents this from affecting the data produced when
300
- nodes are being removed.
293
+ a number of randomized look-ups (see \texttt {Simulation.perform\_ node\_ lookup })
294
+ printing the average RTT to stdout after it finishes each iteration (trial). One
295
+ important thing to note is that before actual tests are run, the script will
296
+ perform a number of random look-ups equal to half of the size of the
297
+ network. This is because in a new network the nodes will learn about other nodes
298
+ in the system more rapidly than in an established network. Training the nodes at
299
+ the beginning prevents this from affecting the data produced when nodes are
300
+ being removed.
301
301
302
302
After each round of look-ups RunSimulation.py will disable some nodes at
303
303
random and repeat. It also saves the number and average look-up time for each
304
304
trial in a space-separated external file for use later.
305
305
306
- RunSimulation.py requires at least 2.7.x, also remember to give it execute
307
- privileges. Instead of execute privileges it can also be invoked with:
306
+ RunSimulation.py requires at least 2.7.x. Also remember to give it execute
307
+ privileges. Instead of needing execute privileges, it can also be invoked with:
308
308
\begin {verbatim }
309
309
python RunSimulation.py ...
310
310
\end {verbatim }
@@ -363,21 +363,21 @@ \subsubsection{plots.gnuplot}
363
363
use it, run it at the prompt as follows:
364
364
\begin {verbatim }
365
365
$ gnuplot
366
- gnuplot> load ' plots.gnuplots'
366
+ gnuplot> load ` plots.gnuplots'
367
367
\end {verbatim }
368
368
The parameters used to create the plots can be altered by editing the following
369
369
variables in plots.gnuplot:
370
370
\begin {description }
371
371
\item [graph\_ lower\_ bound] The lowest number of nodes that would be removed
372
- per trial in run\_ tests.sh. Corresponds to " Node disable start bound" in run\_ tests.sh.
372
+ per trial in run\_ tests.sh. Corresponds to `` Node disable start bound" in run\_ tests.sh.
373
373
\item [graph\_ upper\_ bound] The highest number of nodes that would be removed
374
- per trial in run\_ tests.sh. Corresponds to " Node disable upper bound" in run\_ tests.sh.
374
+ per trial in run\_ tests.sh. Corresponds to `` Node disable upper bound" in run\_ tests.sh.
375
375
\item [graph\_ increment] The number that was added for each experiment in
376
- run\_ tests.sh. Corresponds to " disable increment" in run\_ tests.sh.
376
+ run\_ tests.sh. Corresponds to `` disable increment" in run\_ tests.sh.
377
377
\item [output\_ type] The file output type to write the graphs to. This can be
378
378
any file format supported by you copy of gnuplot. Default is eps.
379
379
\item [file\_ suffix] The part of the filenames produced by run\_ tests.sh after
380
- the disable number. Default is ' \texttt{\_increase.dat}' .
380
+ the disable number. Default is ` \texttt {\_ increase.dat }'.
381
381
\item [image\_ size] The size of the images produced by gnuplot, the default is 1024x768.
382
382
\end {description }
383
383
@@ -412,15 +412,15 @@ \section{Experimental Results and Conclusion}
412
412
\cite {kademlia }. The network was then trained by doing five-thousand random
413
413
lookups so that nodes learning in early iterations would not affect trends as
414
414
much as nodes were removed. This was not strictly necessary, as a comparison of
415
- the data in 0\_ increase.dat and 0\_ increase\_ no\_ train.dat shows.
415
+ the data in \texttt { 0\_ increase.dat } and \texttt { 0\_ increase\_ no\_ train.dat } shows.
416
416
In each test, there were one-hundred trials consisting of
417
417
one-thousand random lookups. After each trial, some nodes were removed at random
418
418
before doing the next. After each test, the network was regenerated using the
419
419
same random seed and the number of nodes to remove after each trial was
420
420
increased by five. RunSimulation.py was run a total of ten times, meaning that
421
421
at minimum zero nodes were removed from the network after each trial (as a
422
422
control group) and at maximum fifty nodes were removed from the network after
423
- each trial. The data from these experiments are included in raw form in Appendix \ref {sec:data }
423
+ each trial. The data from these experiments are included in raw form in Section \ref {sec:data }
424
424
425
425
Figure \ref {fig:points } shows a plot of the average RTT for a lookup versus the
426
426
trial number. Each color/shape represents a different number of nodes being
@@ -449,24 +449,28 @@ \section{Experimental Results and Conclusion}
449
449
450
450
\begin {figure }[htdp]
451
451
\centering
452
+ \caption {}
452
453
\includegraphics [width=\textwidth ]{points}
453
454
\label {fig:points }
454
455
\end {figure }
455
456
456
457
\begin {figure }[htdp]
457
458
\centering
459
+ \caption {}
458
460
\includegraphics [width=\textwidth ]{combined}
459
461
\label {fig:combined }
460
462
\end {figure }
461
463
462
464
\begin {figure }[htdp]
463
465
\centering
466
+ \caption {}
464
467
\includegraphics [width=\textwidth ]{linear}
465
468
\label {fig:linear }
466
469
\end {figure }
467
470
468
471
\begin {figure }[htdp]
469
472
\centering
473
+ \caption {}
470
474
\includegraphics [width=\textwidth ]{slopes}
471
475
\label {fig:slopes }
472
476
\end {figure }
0 commit comments