You are on page 1of 4

-

1nalys$s of t#e flood$ng sear%# algor$t#m !$t# OPN2T


1r"ad$us4 6$erna%"$
II. T;2OR2TIC1/ 61C<)ROUND

AbstractIn this work we consider the popular OPNET simulator as a tool for performance evaluation of algorithms operating in peer-to-peer (P2P networks! "e created simple framework and used it to anal#se the flooding search algorithm which is a popular techni$ue for searching files in an unstructured P2P network! "e investigated the influence of the num%er of replicas and time to live (TT& of search $ueries on the algorithm performance! Preparing the simulation we did not reported the pro%lems which are commonl# encountered in P2P dedicated simulators although the si'e of simulated network was limited! Index Terms(omputer networks) (omputer performance) Overla# networks) P2P networks

large number of peer-to-peer (P2P) systems based on o erlay net!or"s #a e been de eloped $n re%ent years. &$multaneously !$t# t#e e olut$on of P2P systems a number of P2P o erlay s$mulators #a e be$ng de eloped' among t#em are( P2P&$m' Peer&$m' Neuro)r$d and Planet&$m. *ost of t#ese s$mulators !ere %reated by ar$ous resear%# groups for use by t#e P2P a%adem$% %ommun$ty. In sp$te of t#e s$mulators d$ ers$ty most of t#em la%" some $mportant features re+u$red from t#$s "$nd of soft!are ,-.. Usually t#e do%umentat$on $s poorly !r$tten or parts of t#e soft!are fun%t$onal$ty rema$n undo%umented. &ome of t#e s$mulators' su%# as Planet&$m' #a e no means to %olle%t stat$st$%s and t#ose t#at do pro $de often ery l$m$ted sets of ar$ables !#$%# are a a$lable for an end user. &omet$mes user !$s#$ng to %#ange t#e ar$ables for !#$%# data %an be %aptured' !$ll #a e to mod$fy t#e %ode as re+u$red. /a%" of %lar$ty $n t#e propert$es of e0per$ments ma"es reprodu%$b$l$ty of results and analys$s and %ompar$son bet!een algor$t#ms problemat$%. T#e full sur ey of P2P s$mulators and t#e$r su$tab$l$ty for s$mulat$ons may be found $.e. $n ,-.,2.. In t#$s paper !e e0am$ne su$tab$l$ty of OPN2T' !#$%# $s !ell "no!n %ommer%$al d$s%rete e ent s$mulator' as a tool for performan%e e aluat$on of P2P o erlay net!or"s. T#e ma$n %ontr$but$on of t#e paper $s %reat$on of s$mple frame!or" for a s$mulat$on of unstru%tured P2P net!or"s $n t#e OPN2T en $ronment. 3e s#o! pra%t$%al usage of t#e frame!or" analy4$ng t#e flood$ng sear%# algor$t#m used $n t#$s type of net!or"s.

I. INTRODUCTION

A. P2P overlay networks 1 Peer-to-Peer (P2P) f$le s#ar$ng system $s bu$lt as an o erlay on t#e e0$st$ng Internet $nfrastru%ture. It pro $des a f$le s#ar$ng ser $%e to a #$g#ly trans$ent populat$on of users (peers). 2arly systems' su%# as Napster' used a %entral ser er to store $nd$%es of part$%$pat$ng peers. T#$s %entral$4ed des$gn %on%erns of performan%e bottlene%" and s$ngle po$nt of fa$lure. To a o$d su%# poss$b$l$ty' $nstead of ma$nta$n$ng a #uge $nde0 $n a %entral$4ed system' a de%entral$4ed system d$str$butes all sear%#$ng and lo%at$ng loads a%ross all t#e part$%$pat$ng peers. T#oug# t#e de%entral$4ed approa%# %on%erns t#e o erload$ng and rel$ab$l$ty $ssues' and $t $s t#oug#t to bu$ld a s%alable P2P system' $ts su%%ess $s %ons$derably dependent on an eff$%$ent me%#an$sm to broad%ast +uer$es (messages' pa%"ets) a%ross a large populat$on of peers. Rea%#$ng out to a large s%ope of peers $s a fundamental pro%edure $n an unstru%tured P2P net!or". In our !or" !e %ons$der purely unstru%tured net!or" !#ere ea%# peer stores a lo%al %olle%t$on of ob=e%ts. Nodes generate sear%# +uer$es and send t#em t#roug# t#e net!or". Peers and ob=e%ts are assumed to #a e un$+ue $dent$f$ers' !$t# ob=e%t IDs used to spe%$fy t#e +uery target. &ear%# algor$t#ms %an not $n any !ay d$%tate ob=e%t pla%ement and repl$%at$on $n t#e system. T#ey are also not allo!ed to alter t#e topology of t#e P2P o erlay. Nodes t#at are d$re%tly l$n"ed $n t#e o erlay are ne$g#bours. 1 node $s al!ays a!are of t#e e0$sten%e and $dent$ty of $ts ne$g#bours. To $mpro e t#e sear%# and !#ole system performan%e' t#e ob=e%t may be repl$%ated on %erta$n number of #osts. B. Flooding algorithm T#e popular te%#n$+ue for sear%#$ng f$les $n an unstru%tured net!or" $s t#e flood$ng algor$t#m. In t#e algor$t#m ea%# node a%ts as bot# a transm$tter and a re%e$ er and ea%# node tr$es to for!ard e ery sear%# +uery to e ery one of $ts ne$g#bours e0%ept t#e sour%e node. 2a%# sear%# +uery #as an un$+ue number. 1 +uery re%e$ ed by a peer t#at #as t#e same number as t#e one re%e$ ed pre $ously !$ll be d$s%arded $n order to a o$d redundan%y. >lood$ng $s performed $n a #op by #op fas#$on %ounted by t$me-to-l$ e (TT/) %ounter for ea%# +uery. 1 +uery starts off !$t# $ts $n$t$al TT/ set to spe%$f$ed alue' !#$%# $s de%remented by one !#en $t tra els bet!een t!o nodes. 1 +uery %omes to $ts end e$t#er !#en $t be%omes a redundant +uery' !#en $ts TT/ $s de%reased to 9 or !#en t#e data $t $s loo"$ng for $s found. T#e flood$ng algor$t#m $s not too eff$-

5 1. 6$erna%"$ $s !$t# t#e Inst$tute of Computer &%$en%e' &$les$an Un$ ers$ty of Te%#nology' 1"adem$%"a -7' 88--99 )l$!$%e' Poland (e-ma$l( ar"ad$us4.b$erna%"$:polsl.pl).

2 TT/ parameter represents t#e ma0$mum #op-d$stan%e a +uery %an rea%# before $t gets d$s%arded. O er#ead of an algor$t#m $s measured $n a erage number of pa%"ets !#$%# t#e P2P net!or" #as to pro%ess per s$ngle sear%# +uery. 1ll t#e pa%"ets generated dur$ng a s$ngle sear%# are %alled t#e forwarded packets.

>$g. 2. &tate ma%#$ne d$agram of nodeCs pro%essor >$g. -. 1r%#$te%ture of a s$ngle net!or" node

%$ent' be%ause +uer$es are generally broad%ast $nd$s%r$m$nately $n a !#ole ne$g#bour#ood us$ng lot of net!or" resour%es. 1s a result $ts sear%# eff$%$en%y de%ays as t#e sear%# t$me $n%reases s$n%e t#e number of +uery messages $n%reases !$t# t#e s$4e of $s$ted peers. Conse+uently t#e algor$t#m fa%es t#e s%alab$l$ty problem !#en t#e +uery t$me $n%reases. To m$t$gate t#ose dra!ba%"s t#ere #a e been %reated numerous ot#ers fla ours of t#e flood$ng algor$t#m' $.e. ,?.,8.. Desp$te t#e aforement$oned dra!ba%"s t#e algor$t#m ad antage $s t#at $t demands ery l$ttle management o er#ead' adapts !ell to t#e trans$ent a%t$ $ty of P2P %l$ents and ta"es ad antage of t#e spontaneous repl$%at$on of popular %ontent. T#e flood$ng algor$t#m $s used $.e. $n popular )nutella system ,@.. )eneral re $e! of ot#er sear%# algor$t#m %an be found among ot#er $n ,7.. C. Performance metrics To measure sear%# performan%e !e too" metr$%s %ommonly used $n t#e papers %on%ern$ng t#$s top$% ,A.,B.. 1 sear%# +uery $s su%%essful $f $t d$s%o ers at least one repl$%a of t#e re+uested ob=e%t. T#e rat$o of su%%essful to total sear%#es made $s %alled t#e success rate. 1 s$ngle sear%# %an result $n mult$ple d$s%o er$es (#$ts)' !#$%# are repl$%as of t#e same ob=e%t stored at d$st$n%t nodes. Number of d$s%o er$es per s$ngle sear%# +uery $s %alled t#e hits per query. 1 erage number of #ops needed for su%%essful sear%# $s %alled t#e average hops number. It $s $nformat$on about delay $n f$nd$ng an ob=e%t as measured $n number of #ops. 3e d$d not model t#e a%tual net!or" laten%y #ere' but rat#er =ust measured t#e abstra%t number of #ops t#at a su%%essful sear%# message tra elled before $t repl$ed to t#e or$g$nator. 1 global

III. 2DP2RI*2NT A. Assumptions 3e %reated an o erlay peer-to-peer net!or" %ons$st$ng of -999 nodes' t#e l$n"s d$str$but$on !as a random ar$able !$t# t#e un$form d$str$but$on rang$ng bet!een 2 and B. In net!or" nodes !e pla%ed @99 d$st$n%t ob=e%ts. T#e abo e assumpt$ons !ere s$mpl$f$edE $n t#e real t#e topology of P2P net!or" l$"e )nutella $s a t!o-stage po!er-la! grap# ,@.. T#e number of nodes used $n t#e s$mulat$on $s also smaller by at least an order of magn$tude %ompared to t#e real net!or". 2a%# ob=e%t !as ass$gned a un$+ue natural number. Repl$%at$on of t#e ob=e%ts !as a parameter of t#e s$mulat$on and for our e0per$ment !e used a set %ons$st$ng of f$ e alues( 2' B' ?2' -2B and @-2. 3#en repl$%at$on parameter $s set to n $t means t#ere are n $nstan%es of e ery ob=e%t $n t#e net!or". 3e used un$form strategy' repl$%at$ng e eryt#$ng e+ually bet!een nodes. 2a%# node %onta$ned s$m$lar number of ob=e%t !#$%# may be est$mated by t#e follo!$ng formula( !"b#Count F $"b#Count %P G $!odeCount !#ere( !"b#Count $s number of ob=e%ts $n a s$ngle node' $"b#Count $s total number of ob=e%ts' %P repl$%at$on parameter and $!odeCount $s total number of nodes. In order to get better s$mulat$on performan%e and to s$mpl$fy s$mulat$on des$gn !e d$d not ta"e $nto a%%ount proto%ols sta%" (TCPGIP). &$mulat$on !as based only on pass$ng sear%# +uer$es bet!een net!or"s nodes !#$%# !as suff$%$ent $n t#e %ase of t#e flood$ng algor$t#m. T#e sear%# +uery (pa%"et) #as 8 f$elds( ID' sour%e address' sear%#ed ob=e%t ID and TT/. T#e f$rst t!o f$elds !ere not e0pl$%$tly used $n t#e %ommun$%at$on (!e d$d not send any a%"no!ledgement pa%"ets %on%ern$ng su%%essful sear%# +uer$es)' #o!e er t#ey !ere used for stat$st$%al pur-

? poses. In our e0per$ment !e tr$ed to ans!er t#e follo!$ng +uest$ons( 3#at per%ent of sear%# +uer$es ended up !$t# su%%ess $n fun%t$on of ob=e%ts repl$%at$on' TT/ of sear%# pa%"etsH ;o! many pa%"ets !ere found $n a s$ngle +ueryH In t#e %ase of su%%essful +uery !#at !as $ts sear%# t$me measured $n sear%# +uery #opsH ;o! many pa%"ets !ere generated by a s$ngle sear%# +ueryH B. imulation architecture T#e ar%#$te%ture of a s$ngle net!or" node $s presented on f$gure -. It %ons$sted of a pa%"et generator' a pa%"ets s$n"' transm$tters and re%e$ ers t#roug# !#$%# %onne%t$ons !ere made !$t# ot#ers nodes. &ear%# +uer$es !ere generated a%%ord$ng to t#e Po$sson d$str$but$on by ten of t#e nodes. Pa%"ets !#$%# t#e$r TT/ rea%#ed 9 !ere for!arded to t#e sink module and destroyed. 1 node !as %onne%ted !$t# ot#er nodes t#roug# b$d$re%t$onal l$n"s asso%$ated to t#e pa$rs of transm$tters and re%e$ ers modules. T#e ma$n log$% !as $n%luded $n t#e pro%essor module based on a state ma%#$ne d$agram I f$gure 2. T#e init state $n t#e d$agram !as respons$ble for $n$t$al$4at$on of stat$st$% and ot#er node parameters. In%om$ng pa%"ets !ere ser $%ed by t#e internal or e&ternal states depend$ng on !#et#er t#ey !ere ne!ly generated or t#ey !ere %om$ng from ot#er nodes.
Hits per query

1.2 1 0.8
Success rate

Su cce ss ra te

0.6 0.4 0.2 0 2 8 32


Replications

128

512

TTL = 4

TTL = 6

TTL = 8

T T L = 10

>$g. ?. &u%%ess rate per s$ngle +uery

180 160 140 120 100 80 60 40 20 0 2

Hits per query

IJ. &I*U/1TION R2&U/T& 3e gat#ered t#e e0per$ment results on t!o le els I global and lo%al. T#e global le el %on%erned t#e a eraged aggregated net!or" stat$st$% !#$le on t#e lo%al le el !e !ere able to e0am$ne s$ngle node be#a $our. 3e %olle%ted four stat$st$%s from t#e metr$%s ment$oned $n se%t$on II C. On t#e f$gure ? !e presented su%%ess rate per s$ngle +uery. 1s e0pe%ted t#ere $s a d$re%t relat$on bet!een TT/ and t#e su%%ess rate of a sear%# +uery. T#e %#o$%e of proper TT/ alue $s $mportant $n %ase of small number of repl$%at$ons' t#e larger t#e number of repl$%as t#e lo!er t#e alue of TT/ !#$%# $s suff$%$ent to f$nd an ob=e%t. T#e #$ts per s$ngle +uery are presented on f$gure 8. T#e #$g#er $s t#e number of t#e repl$%at$on t#e #$g#er $s t#e #$ts alue e0%ept s$tuat$on !#ere t#e repl$%at$on parameter $s @-2 and TT/ $s B or TT/ $s 7. T#$s abnormal$ty may be e0pla$ned as t#e follo!$ng( $n t#e %ase of #$g# number of repl$%at$ons t#e su%%ess rate $s ery %lose to one (f$gure ?) and t#e flood of pa%"ets $s +u$%"ly attenuated. &ear%# +uer$es d$d not #a e enoug# t$me to repl$%ate t#emsel es be%ause t#ey +u$%"ly ended up as su%%essful +uer$es and !ere per$s#ed.

32
Replications

128

512

TTL = 4

TTL = 6

TTL = 8

T T L = 10

>$g. 8. &u%%essful #$ts per s$ngle +uery

1 erage #ops number $s presented on f$gure @. 20%ept %ase !ere repl$%at$ons !as @-2 #ops number are %lose to TT/. &u%# results $nd$%ate t#at most of t#e sear%#ed ob=e%ts !ere pla%ed relat$ ely far from t#e node !#$%# $n o"ed t#e sear%#. On t#e f$gure 7 !e presented number of for!arded pa%"ets per +uery. T#e umber of for!arded pa%"et $s d$re%tly proport$onal to TT/ and $n ersely proport$onal to t#e ob=e%ts repl$%at$ons number. T#e stat$st$%s related to t#e success rate' hits per query' av' erage hops number and forwarded packets gat#ered at t#e global le el !ere also gat#ered at t#e lo%al le el. 1lt#oug# $t $s poss$ble to gat#er t#e lo%al stat$st$% for e ery node' su%# strategy !ould #a e slo!ed do!n t#e s$mulat$on speed' t#erefore !e gat#ered t#em for only t#ree sele%ted nodes. T#e res-

8 ults !ere presented on f$gure A and are !$t# agreement !$t# t#e global stat$st$%s.
12 10
A era!e "ops nu# $er A era!e "ops nu# $er

s$st$ng of more t#an @999 nodes lasted mu%# longer and somet$mes OPN2T stopped respond$ng at all.
1000 100 10

8
1

6 4 2 0 2 8 32
Replications TTL = 4 TTL = 6 TTL = 8 T T L = 10

0,1 +o(e 1
success rate

+o(e 2
"its per query

+o(e 3
-or'ar( rate

a era!e "ops nu#$er

>$g. A. /o%al stat$st$% for s$ngle nodes

128

512

>$g. @. 1 erage #ops number per su%%essful +uery

800 %00 600 500 400


*ac ) ets

&or'ar(e( pac)ets

Desp$te t#ese dra!ba%"s !e may state t#at t#e OPN2T en$ronment $s su$table for a Kf$rst-loo"L performan%e e aluat$on of P2P algor$t#ms. T#e en $ronment may be #elpful $.e. for a f$rst assessment of t#e algor$t#m( $f t#e results of +u$%" analys$s $n t#e OPN2T are prom$s$ng t#an $t may be s$mulated $n a ded$%ated P2P s$mulator. >urt#er !or"s !$ll %on%entrate on t#e adopt$on of our frame!or" to a s$mulat$on of more real$st$% models. 3e plan to $mport P2P net!or" po!er-la! grap# topology and e aluate performan%e of t#e s$mulat$on !#$%# %onta$ns larger number of nodes. T#ese steps s#ould lead to analys$s of more ad an%ed sear%# algor$t#ms and proposals of ne! ones. R2>2R2NC2&
,-. &. Na$%"en et al.' K1 &ur ey of Peer-to-Peer Net!or" &$mulators'L Pro' ceedings of $he eventh Annual Postgraduate ymposium( )iverpool( *+' 2997. &. Na$%"en et al.' KTo!ards yet anot#er peer-to-peer s$mulator'L Proc. Fourth ,nternational -orking Conference Performance .odelling and /valuation of 0eterogeneous !etworks 10/$'!/$s2 345( eptember' 2997. &. M$ang' /. )uo' $ D. N#ang' K/$g#t>lood( 1n 2ff$%$ent >lood$ng &%#eme for >$le &ear%# $n Unstru%tured Peer-to-Peer &ystems'L 299?' s. 72A-7?@. N. 6$sn$" $ 1. 1bou4e$d' K*odel$ng and 1nalys$s of Random 3al" &ear%# 1lgor$t#ms $n P2P Net!or"s'L I222 Computer &o%$ety 3as#$ngton' DC' U&1' 299@' s. O@--9?. *. R$peanu' I. >oster' $ 1. Iamn$t%#$' K*app$ng t#e )nutella Net!or"( Propert$es of /arge-&%ale Peer-to-Peer &ystems and Impl$%at$ons for &ystem Des$gn'L Ar&iv preprint cs.6C73238329 ' 2992. M. R$sson $ T. *oors' K&ur ey of resear%# to!ards robust peer-to-peer net!or"s( &ear%# met#ods'L Computer !etworks' ol. @9' 2997' s. ?8B@-?@2-. D. Tsouma"os $ N. Roussopoulos' K1 %ompar$son of peer-to-peer sear%# met#ods'L Proceedings of the i&th ,nternational -orkshop on the -eb and 6atabases' 299?. P. / et al.' K&ear%# and repl$%at$on $n unstru%tured peer-to-peer net!or"s'L Proceedings of the :4th international conference on uper' computing ' 1C* Ne! Qor"' NQ' U&1' 2992' s. B8-O@.

300 200 100 0 2 8 TTL = 4 32


Replic ations

,2.

,?.

128 TTL = 8

512 TTL = 10

,8.

TTL = 6

,@. >$g. 7. Number of for!arded pa%"ets per s$ngle +uery

J. CONC/U&ION& In t#$s !or" !e presented analys$s of flood$ng sear%# algor$t#m' popularly used $n P2P net!or"s' us$ng t#e OPN2T s$mulator. Perform$ng t#e s$mulat$on !e d$d not reported t#e problems !#$%# are %ommonly en%ountered $n P2P ded$%ated s$mulators. T#e ar%#$te%ture of t#e s$mulat$on seemed to be %lear' modular$4ed and eas$ly s%alable. 1lt#oug# !e reported some ot#ers $ssues' amongst t#em $s restr$%ted number of nodes $n t#e net!or". Tr$es !$t# s$mulat$on of net!or" %on-

,7.

,A.

,B.

You might also like