Comparison of parallel algorithms for path

0 downloads 0 Views 718KB Size Report
queries oii PRISMA/DB. Iii iidditioii, the .... way, all objects in tlie extent of the first class C1 in the path are ... tlic path c1.c2.c3.c4 is divided vertically iiito < cl, cg >,.
Comparison of Parallel Algorithms for Path Expression Query in Object Database Systems Guoren Wang, Ge Yu School of Inforination Science and Engineering, Northeastern University, Shenyang 110006, P.R. China { wanggr, yuge} @inail.neu.edu.cn

Kunihiko Kaneko, Akifiiini Makinouchi Graduate School of Inforination Science and Electrical Engineering, Kyushu University, Fukuoka 812, Japan { kaneko,akifunii}@db.is.kyushu-u.ac.jp

A bSt ract

uid

In this paper? We proposed a new parallel algorithm for

computing path expression, named Parallel Cascade Semijoin (PCSJ). Moreover. a iiew sclieduliiig strategy called

right-deep zigzag tree is designed to further improve the performance of the PCSJ algorithm. The experinleiits have been iiiiplenieiited in a NOW distributed aiid parallel environment. The results show that tlie PCSJ algorithm outperforms the other two parallel algorithms(tlie parallel version of forward pointer chasing algorithm(PFPC) and the index splitting parallel algoritlim(lndezS~~z~)) wheii ctmiputing path expressions with restrictive predicates and that tlie right-deep zigzag tree scheduling strategy has tlie better performance than the right-deep tree sclieduliiig strategy. K e y Words: Object databases. path expressi(ons. parallel algorithms, schecluling strategies

1

rclatioiial database systciiis caii iiot cff'cctivcly cfficiciitly iricct tlic rcquircinciits of ciiiergiiig atlvaiiccd database applications tliic t o tlic liiiiitatioiis of tlicir iriodcliiig capability. 111 tlicsc applicatioii doiiiaiiis, d a t a types arid sciiiaiiti rlrlollg d a t a arc lllucll riclicr tliaii coiivciitioiial applicatioiis. Oiic of proinisiiig q>proaclics t o iricct tlic iiccds of tlicsc doiliairis is object-oriciitatioii. Oiic tlistiiiguislictl feature of object database systciri is path cxprcssioii i i i i d iiiost queries oii a i i object tlatabasc arc Ixrscd oil patli cxprcssioii l>cc:~iiscit is tlic iriost iiatural i r i i d coiivciiiciit way to iicccss tlic object database, for cxaiiiplc! to iiavigatc tlic hyper-liiiks iii a web-based database. l3ccausc of tlic ortliogoiiality of O()L[I]! a patli cxprcssioii ciiii be placed in SELECT. FROM. iiiicl WHERE clauses. Tlic followiiig is ii typical cxaiiiplc of OQL statciriciit wliicli iiscs Ixrtli cxprcssioiis iii the SELECT. FROM. i i i i d WHERE cliitiscs, respectively. 111 this paper1 we will focus oii the pmillcl cxccutioii of tlic patli cxprcssioiis iii W H E R E cliiiiscs? this kiiicl of p t l i cxprcssioiis is iilso callcd as coiriplcx prctlicatcs. Iii tlic ODMG 2.0 staiitlartl! tlic cxprcssiiig capability of Ixrtli cxprcssioiis is liiriitcd t o soiiic degree[11. For e x a i ~ i ~ ah ,predicate caii be qqAicd oiily oii tlic last class iii ii piitli. Actually, tlic dcfiiiitioii of Ixrtli cxprcssioiis cirii be cxtciitlccl sucli t h a t cacli class iii a patli cxprcssioii c u i be qualified with oiic or ~rrorcpredicates. Tlic gciicral foriri of a cxtciidcd patli cxprcssioii is ;is follows. l ~ l Iiaiid,

Introduction

0 1 1 O l l C llalld. d a t a Irlallagctl by database lrlallagclrlcllt systcrris :ire becoining very large iii data-iiitciisivc iipplications such as E-Coiriiricrcc, Digital Library. DNA Barik, Geographic Iiiforrnatioii Systciris(GIS). T h u s cfficiciit parallel a l g o r i t h m for acccssiiig aiid rriaiiipulatiiig a large volurric of d a t a arc required t o provide liigli perfoririaiicc for users. Tlic parallel processing is aii iiiiportaiit approach for realiziiig liigli-perfoririaiicc query proccssiiig in such data-iiitciisive applicatioiis. U p t o iiow. a lot of research work lias lxcii doiic for ~ ~ . r d algoritliiris iii tlic coiitcxt of relatioiial database systciris. For cxairiplc, DeWitt et al. proposed a parallel hybrid hasli joiii algorithm in tlic papcr[4] a i i d Kitsurcgawa preseiitcd a cciitralixcd GRACE joiii algoritliiri[7] aiid correspoiidiiig parallel algoritlirri[8]. 0 1 1 tlic other

+

I11 rcceiit ycirrs! l l i o ~ c a l l d 111orc rcscarcl1crs arc irioviiig tlicir rcscarcli interests froiri pardlcl rclatioiial database systciris to parallel object clatabax

Proceedings of the Seventh International Conference on Database Systems for Advanced Applications. Hong Kong, April 18-21, 2001.

0-7695-0996-7/01$10.00 0 2001 IEEE

wlicrc rv is a raiigc variable? N A ; (1 5 ,i 5 TL) is a iicstccl attribute of class Ci,p t ( l 5 ,i 5 n 1) is a predicate applied oii class C;. Tlic cxtciit of class C; is tlciiotctl tis Ci itself.

250

systerris[6][ 131, and corresporidiiigly some parallel join algorithms have been proposed for object database systerris[9]. Parallel pointer-based joiii techniques have been preserited for object-oriented databases in tlie paper[9]. However, t o tlie best of our knowledge, few of approaches have beeii presented for coIriputiIig path expressioiis iii parallel. It is sure t h a t parallel poiiiterbased join techniques can be employed for cornputiiig path expressioris aiid they are easy t o be parallelixed. However, we thiiik t h a t they can be irriproved from the following three aspects. First, these join algoritlinis do not utilize tlie cascade feature of path expressions. T h a t is, a path expression can be computed in a pipelining way by corivertiiig the path cxpressioii to a right-deep tree. Secoridly, a path expression can be converted to an cquivaleiit semi-join rather than join expression and thereby reducing CPU cost aiid comrnuiiicatioii cost. Thirdly, during tlie execution of a semi-join expression, an object's OID rather than the whole object is iiecessary to seiid from a semi-joiii operation t o the iiext oiie, thus, tlie cost of corrirnunicatioii for computing tlie path can be reduced further.

how to schedule the corriputatioii of a path expressioii, filially discuss tlie parallel execution of a sub-patli cxpressioii.

2.1

If there is a11 extent for each class iii ii path expression, then tlic implicit joiiis iii the path expression can be converted iiito explicit joiiis for corriputiiig the path expression. For example, the path (sec expressioii ( 1 ) ) described iii Scctioii 1 can be corriputcd by the following join expressioiis.

If each join operation in forrriula (2) is replaced by one semi-joiii operation, an equivalent semi-join expressioii can be obtaiiicd a s follows.

The rriaiii coiitributioii of this paper is that it presents a new parallel algorithm for computing path expressioiis: yurmlled cuscude serrri-j;oirL(PCSJ) which computes a path expression using semi-join operations rather than join aiid thereby dramatically reducing the cost of computing the path expression corripared with the Pointer-based parallel joiii algorithm. The experimental results show that the PCSJ algoritlirri greatly outperforms tlie other two typical parallel algorithms. In order t o deal with limited memory size, this paper proposes a new scheduling strategy called riglitdeep zigzag tree to further improve the pcrforrriaricc of the PCSJ algoritlirri by avoiding extra 1/0 disk overhead. Our prelirriiiiary experirrieiital result shows that the right-deep zigzag tree schedulirig strategy has the better performalice than the right-deep tree scheduliiig strategy.

Formula ( 2) caii be evaluated aiid performed iii two reversed dircctioiis: forward and backward, rcspectively, while formula ( 3 ) caii be performed iii oiily oiic direction, i.e., backward. The forward semi-joiii cxpressioii is iiot cquivalciit to tlie backward seirii-join cxprcssion because semi-joiii operator is not coirirnutablc. In formula (3), the cxccutioii of aiiy semi-join operation, to say s d ( C i , y ; ) x sed(Ci+1,pi+l)(I 5 i 5 n ) can be roughly described a s follows. First, the cxteiit of class C; is scaiiiied aiid predicate pi is applied on tlic scaiiried objects, a d theii tlie selected objects arc used to build a hash table for class Ci by applyiiig a hash functioii oii tlie Iicstcd attribute N A i . Sccoiidly, the result objects of the previous scrrii-join operation, i.e. sed(Ci+l,pi+l) x sed(Ci+2,pif2), are used to probe tlic hash table of class Ci with the sanie hash functioii as t h a t used in tlie buildiiig phasc. If a i i object iii tlie hash table is matched, then OIDs of tlic iriatclicd objects is passed t o the next seirii-join operation, i.e. sed(Ci-1,pi-l) x sed(Ci,p;). The semi-join approach to path cxprcssioiis has the followiiig advaiitagcs over the poiritcr-based joiii ~ ~ p p ~ o d i .

T h e remainder of this paper is organized as follows. Section 2 preserits a parallel cascade semi-join algorithm. Sectioii 3 iiitroduces two other kinds of parallel algorithm for corriputiiig path expressioris, iiicludiiig tlie parallel forward pointer chasiiig algorithm and the index splittiiig approacli. Section 4 gives tlie performance analysis t ~ i i dcoiriparisoii of the PCSJ algorithm with the other two parallcl path algorithms. Finally, Section 5 concludes the paper.

2

Using semi-join to compute path expressions

(1) Due to replacelrielit of joiii operatioii with scinijoin operation, tlic cxccutioii cost of the path expressioii is greatly rcdiiccd, iricludiiig CPU aiid communication cost.

Parallel cascade semi-join algorithm

this section, we first explain how to use semi-join operation to compute path expressioiis, slid then describe

(2) For tlic pointer-based joiii approach, a projcctioii operation is iiccded for projecting objects froin the

111

251

disk file F’. Aiid thcii, the sub-patli cxprcssioii p i is sclicdulcd aiid executed. Duriiig tlic cxccutioii of subpath p1 disk file F’ is read t o probe corrcspoiidiiig liash tables. This is siiriilar t o tlic idea of right-deep tree sclicdulirig strategy described iii papcrs[3] aiid [ll].Although tlic paper[2] has sliowii that tlic sclierria usiiig scgiriciited riglit-deep trees for pipeliiicd liasli joiiis outpcrforrris tlie sclieiria usiiig riglit-dccy trees. tlie scgrriciitcd riglit-deep tree sclierria caii iiot be directly applied t o coiripute patli expressioris because of tlie cascade fcaturc of path cxprcssioii. Iii order t o avoid extra disk 1/0 overhead, we present a iicw sclieduliiig strategy called right-deep zigzag tree as shown in Fig. l ( c ) aid the dyiiarnic bottoin-up sclieduling strategy is adopted to deal with tlic rricrriory constrailit. Our sclicduliiig strategy is iiot only a special foriri of zigzag tree but also a special form of scgiriciited riglitdeep tree, so this sclicduliiig strategy is referred t o as riglit-deep zigzag tree, whicli lias the followiiig characteristics.

filial results of tlic joiii cxprcssioii, wliilc iii tlic seirii-join approacli it is obvious t h a t this projcctioii opcratioii is uiiiicccss~~ry because just OIDs ratlicr tliaii objects arc sciit from scirii-join operatioii t o tlic iicxt oiie.

( 3 ) A c ~ ~ scrrii-joiii ~ l c cxprcssioii caii be iiriplciiiciitetl a s a scini-join riglit-deep tree. The other feature of a scirii-joiii cascade query is tliat tlic position of aiiy scrrii-joiii opcratioii iii the cxprcssioii is fixed. Tlius optiiriizatioii of a cascade query is relatively easier to be doiic tliaii a gciicral join query. 2.2

Right-deep zigzag tree scheduling strategy

For the parallcl cvaluatioii of iriulti-joiii queries, tlicrc arc sorric iiitcrcstiiig sclicduliiig strategies: lcft-liiicar(lcft-dcep) trees, left-oriciitcd bushy trees, wide busliy trees, riglit-oriciitcd l~usliytrees, riglitliiiear(rig1it-deep) trccs,dcscribcd in tlic paper[l4]. T h e paper reports the cxpcrieiiccs with tlic irriplciriciitatioii of tlicsc strategies for tlic irriplciriciitatioii of rriulti-joiii queries oii PRISMA/DB. Iii iidditioii, the papcr[2] extciidcd tlic riglit-tlccp tree strategy t o the scgirieiited riglit-dccp tree strategy for tlic cxecutioii of pipeliiied 1i:wli joiiis a i i d gave tlic siiriulatioii expcrirriciital coiriparisoii of tlicsc two strategies. Tlic paper[l6] presciitcd a iiew sclieduliiig strategy called zigzag tree, which is iiitcririediatc betwccii left-deep tree aiitl rightdeep tree, a l l d the paper[ 101 allalyzcd allcl coiriparcd tlic x i g m g stratcgy with tlic riglit-dccp tree i~iiclbushy tree strategies. I t is obvious tliat tliesc sclicdiiliiig strategies ciiii iiot be directly applied to tlic pamllel computation of path exprcssioiis except for tlic riglitdeep tree strategy.

(1) For aiiy sub-path p z of a riglit-deep zigzag tree, if i is iiii odd number tlieii p z is a right-deep sub-tree. Otherwise, p z is a left-deep sub-tree aiid the length of all left-deep sub-trees iii a right-deep zigxag tree is 2. T h e first sub-path is a right-deep sub-tree.

(2) Just all right-deep sub-paths iii a right-deep zigxag tree arc scliedulcd t o execute iii parallel. The result of the itli(i # I) right-deep sub-patli is directly used t o build corrcspoiidiiig liasli table for the execution of the (i-l)tli right-deep sub-path ratlicr tliaii t o write back iiito a disk file aid thereby t o avoid extra. disk overhead occurriiig in right-deep tree sclicdulirig strategy.

For ii cascade scirii-join operatioils iii a patli exprcssioii, if tlicrc is iiot ciiough available rriaiii rricrriory lioldiiig tlic hash tables for i~ path cxprcssioii, tlieii tlic piitli cxprcssioii can be brokcii iiito several subpath cxprcssioiis sucli t h a t tlic liash tables for cacli sub-path cxprcssioii caii be licltl in tlic availablc rriaiii iriciriory. For cxairiple, for tlic path cxprcssioii as shown iii Fig. l(a). If all hash tables for the path w e expected t o fit iiito iriciriory, tlic patli caii be executed iii parallel with the algoritliiri described iii tlie iicxt subscctioii. However? if tlicrc is iiot eiiougli iriciriory, tlicii tliis path has to be brokcii iiito several sub-patli cxprcssioiis. Assiiiiie t h a t tlic patli is brokcii into two sub-patli cxprcssioiis pi = {result t- ( ~ d ( C 1 , p Ix) ( s c l ( C z , p z )x F’ } a ~ i i dp2 = { F’ +- ( s L ‘ I ( C ~x, ~(sel(C4,~4) ~) x (scI(C5,p5) x (sel(C~,p~) }, as sliowii in Fig. l(b). First, tlic sub-path cxprcssioii p z is scliedulcd aiid executed. Tlic result of the sub-patli is written into the

( 3 ) Right-deep zigzag tree is a i i cxtrciric foriii of zigzag tree. Right-deep zigzag tree also is aii extreme form of riglit-deep tree. A riglit-deep zigzag tree caii also be viewed as a cascade scgrriciitcd rightdeep tree. i.e. tlic result of the itli riglit-deep subpath is the left iiiput of tlic last semi-join operatioil of the (i-1)tli riglit-deep sub-patli. So, riglit-deep zigzag tree car1 also be iiarricd cascade seginciited riglit-deep tree, t o reflect tlie cascade feature of patli exprcssioris.

2.3

Parallel execution of sub-path expressions

this subscctioii, we will discuss the parallel executioii of a riglit-deep sub-patli iii a riglit-deep zigzag tree. It works iii two pliascs: buildiiig aiid probing. In the buildiiig phase, cxtcrits of the classes except for the last

111

252

resu1 t

result

objects. Arid tlieii the same hash furictioii p l ~ fas that used in the building phase is corriputed on the OID of eacli selected object, and the hashed value is used to deterrriirie which hash table is used to probe through the split table. If liash table HT,, for example, is selected, then only the OID part of the selected object of class Cn+l rather than the whole object is sent t o site i rrmdulo m t o probe hash table HTi of class C,. Sirriilarly, if aii object, t o say o’, is matched in has11 table H T , of class C , then the OID value of o’ is used to probe a has11 table of class Cn+l,to say H T j , at site j rruxfulo rrL. Finally, in the hash tables of class C, all the rriatclicd objects are results of the path expression. Tlie probing phase of tlie PCSJ algoritlirn is derrioiistrated in Fig. 3.

result

lb) Right-deep tree

la) A path

IC)

Right-deep zig-zag G e e

Figure 1: Sclieduliiig strategies oiie class iii sub-patli cxprcssioii are partitioiiccl usiiig a split table a i d tlieii tlic liasli tables corrcspoiidiiig to

various partitions are built. Tliesc I I partitioiiiiig opcratioiis are pcrforrried iii parallel. The procedure of partitioiiiiig the extent of class C, is sliowii in Fig. 2. First, tlic cxtciit of class Ci is scaiiiicd aiid tlic operatiori s d ( p ; ) is applied OII the scaiiiicd objects. After a partitioiiirig hash function p l f~ is irriposcd oii tlie join attribute N A ; of tlic selected objects? a split table is used to tletcrrriiiic wliicli liasli table, to say liasli table H T j , tliesc objects s l i o ~ l dbe iiiscrtcd iiito. Tlie~i?tlic l i a s l i function ILf j tliffereiit from phf is used t o build llahsll table H T j . The iiuiribcr of partitioiis of eacli class iii the path expression arc the sairic, wliicli is just tlcpciitlcrit oii the iiniiibcr of sites available, that is tiirics of the iiuiribcr of sites available. We assiiirie that tlic iiuiribcr of sites avi~ilablcbe 111, tlicii the iiurribcr of partitioiis 11 is tiirics of in, tliat is. 11 = k * m(k 2 1). Tliesc partitioils are allocated to III sites iii rouiid-robiii way with forrriula siteao(thc i t h p(Lrtit%o.u)= ,i riiwtlulo ‘m. Site I

split table

I1 I

Site 2

2

Figure 3: Probing phase of the PCSJ algoritliiri

3

this sectioii, we iiitroducc otlier two kiiids of parallel algoritlinis, tlie parallel forward poiiitcr cliasiiig algoritlirri aiid the iiidex splitting approach, for coinputing path expressioiis so that we can aiialyze and corripare tlic pcrforrriaiice of PCSJ with that of tlicrri.

Iii

Site h modulo m

]-____I

3.1

4 i

Hashuoin ttribute)

Other two parallel algorithms for path expressions

Building

select(pi)

Ci

Figure 2: Builtliiig plisse of tlie PCSJ algoritlini

Duriiig tile probiiig plii~sc.the extciit of ClthSS cn+l is scariiied aiid predicate pn+l is applied oii the scaiiiied

253

Parallel forward pointer chasing algorithm

Siiicc relationships arnong objects are stored iii tlie database, oiie iiatural way t o execute a path expression is forward poiiiter cliasiiig along path instarices. In this way, all objects in tlie extent of the first class C1 in the path are first fetched and then predicate y1 is imposed oii tlierri. For each fetched and matched object o, its iiext object is obtaiiied by forward chasing tlie poiiiter along the path iiistaiice aiid the correspoiidiiig prcdicate is checked. This forward chasing is continuously goiiig if the object is satisfied with the predicate aiid tlic last object of the path iiistaiice is iiot encountered. Otherwise, the next path iiistaiice is forward chased.

IiidcxSplit algoritliiris. Filially. we also coiriparc tlic pcrfoririaiicc of tlic riglit-deep zigzag tree sclictluliiig strategy aiid the riglit-tlccp tree sclictluliiig strategy.

If all predicates iii the path cxpressioii are satisfied. tlicii the object o is oiic of the result objects with rcspect t o the patli cxpressioii aiid is put to the result buffer. For the sake of perforrriaiicc coiripiLrisoii, we 1iwe been designed arid iiriplcrriciited a parallel vcrsioii of forward pointer cliasirig(s1iort for P F P C ) . Readers c u i refer paper tlic papcr[5] for the detailed dcsigii i~iid irriplcirieiitatioii tccliiiiqucs of tlic P F P C algorithrri.

3.2

4.1

In ortlcr t o test tlic pcrforiiiaiicc of tlicsc algoritliiris, we dcsigii a special test database. Pcrfoririaiicc tests include the speedup a i i d scaleup tests. T h e spccdup rrieiLiis tlic ability t o grows witli tlic systciri size wliilc kccpiiig tlic problcrri size a s coiistaiit. Scaleup i r i c ~ ~ s ~ i r c s tlic ability t o grow witli both tlic systciri size and the problcin size. Scaleup is defiiied as tlic ability of a i i Ntiirics laigcr systcrri to perform a i i N-tiiiics larger job iii tlic bairie elapsed tirric as tlic origiiial systciri. We dcfiiic tlie class in test database a s follows.

Index splitting Approach

Aii iiidex splittiiig approach for path exprcssioii is proposed iii (121. Iii the sclieme, iiidcx is split vcrtically aiid horixoiitally iiito sub-iiidices, each of wliich is placet1 011 LL separate PE (Process Elerrieiit). Iiidex retrieval is doiie iii parallel witli iriiiiirrial corrirriuiiicatioii cost. Each sub-iiidcx of multi-index is called as a Vpartitioii alid each sub-iiidcx obtained by splittiiig a Vpartitioii liorixoiitally is called a HV-partitioii. Fig. 4 shows iiidex elerrieiit dciioted by < rm, r L >. For cxc1, cg, c3 a i i d ainple. patli expression is C1.Cg.C3.C4: c4 arc corrcspoiidiiig OID values in a patli iiistancc. so tlic path c1.c2.c3.c4is divided vertically iiito < cl, cg >, < cg, c3 >, < c3, c4 >. Before ruiiiiiiig the algoritliiri, all the HV-partitioiis are stored irito the PES. Whcii a simple value or aii OID is givcii as a retrieval request. the retrieval opcratioii is pcrforined as sliowii iii Fig. 4. V.

V

Test environment and test database

c l a s s B a s i c c l a s s : p u b l i c d-Object { d-Ref NA; int selAttr; char o t h e r A t t r [strLength] ;

3 Tlic attribute sclAttr is used t o set restrictive prcdicatcs applied on tlic class. NA is a iicstcd attribute of class Basicclass( the itciri for the last class in the path is set t o 111111). Tlic attribute otlicrAttr is used to set the size of objects iii tlic test database. Tlic size of objects is 252 bytes.

V

In tlic speedup test, we dcsigii test database t o coiriputc path cxprcssioii wlicii tlic patli lciigtli is 3: t h a t is C,.C,.C,.C, so . we coiistruct 4 cxtcrits for 4 classes 011 4 sites, a r i d tlicrc is 100>000objects i i i cacli cxtciit. Tlic tested path cxprcssioii is C1 [Pl].Cs[Ps].C3 [P3].C4[P4]. At tlic sairic time, we require: (1)Tlic selectivity of p i is 90% for class Ci;(2)90% objects iii two collcctioii c i ~ i ibe joiiied.

H

H

-.. relrlevill

request

Accordiiig t o above rccluirciiiciits, tlic iiuiribcr of rcsultu is about:

H

100,000 * 0.9 * 0.g3 = 65,610

111 tlic scaleup test, tlic lciigtli of patli expression is added a s sites iiicrcasc. So ciglit cxtciits is built to foriri tlic pat,li cxpressioii:C1 [PI] .Cz[Ps]...C7[P,].Cs (PSI at iriaxiinuin. We will test C l [ P ~ ] . C z [...PC~, ][ P ~wlicii ], i sites arc workiiig ( l < i < = 8 ) .

Figure 4: Parallel algorithrri of iiidcx splitting

4

(4)

Performance evaluation

Tlic liartlwarc coiifiguratioii for tcstiiig is ciglit PCs

In order t o further evaluate the pcrforrriaiicc of tlie PCSJ algoritlini, we have desigiicd aiid irriplerriciitcd the PFPC ant1 IritlexSplit algoritlirris, aiid liavc done rriucli actual test work. This section first iritroduccs tlie test environment aiid the test database, aiid thcii analyzes aid cornpares tlic speedup aiid scaleup performance of the P C S J algoritlirri with the P F P C and

coiiiicctcd with liigli-speed switch. Eiglit P C s arc all

tlic S:LIIIC iii coiifiguratioii: AMD-KG 233Mliz CPU: G4MB rriciriory aiid 4.3GB liard disk. Tlic opcratiiig system is Solaris 2.5 aiid Sliussc-Uo systciri is 2.0[15]. On every workiiig site, tlie WAKASHI server is ruiiiiiiig. Sliussc-Uo is a distributed aiitl parallel object

254

database systeiri that lias beeii uiider dcveloprrieiit at Kyusliu University of Japan aiid Nortlieastcrii University of Cliiiia. 111the Sliussc-Uo system, licaps arc provided for building databases. A heap consists of fixcdlength pages. I t is persisterit when it is mapped oiito a disk. otlicrwise volatile. A database rriay coiisist of IKIOW tliaii one persistelit lieap. Each licap can be globally sliared by aiiy client iii the system. 111 the testing database, objects of cacli class are stored in different persistelit lieap, i.e. 8 persistent heaps are used for the pcrforrriaiice evaluation.

1200 lo00

We liave tested the parallel forward poiiiter clias; 2 iiig algoritlirri(PFPC), parallel cascade semi-joiii algorithrri(PCSJ) and parallel index splitting algoritlirri(IndexSp1it) based on tlic test database. Also, we give tlie perforrriaiicc corriparisoii aiid aiialysis of the right-deep z i p a g tree sclieduliiig strategy with the right-deep tree sclieduliiig strategy. 4.2

:

PCSJ PFPC

'\.,

'.._,

-

-+--

Indexsplit -*.-

"...

2

Number of sites

Speedup performance

Fig. 5(a) sliows the speedup respoiisc time t o coiiipute C ~ [ P ~ ] . C ~ [ P Z ] . Cfrom ~ [ P2~t o]8.sites; C ~ [aPi d~ ] Fig. 5(b) shows tlic correspoiidiiig speedup curve for three parallel algorithms. We can see t h a t tlie response time of P F P C and IiidexSplit are I K I U C ~longer tlian that of PCSJ, especially wheii there are less working sites. T h e speedup pcrforrriaiice shows PCSJ is faster tliaii P F P C and IridexSplit wlieri corriputiIig path expressioris with restrictive predivates. For P F P C aiid IndexSplit, all objects of classes in the path have t o be scanned aiid read into rriemory t o check if the predicates OIL tlie path is satisfied, so for every traversiiig operation from oiie class t o the next class one 1/0 may occur. Because P F P C and IiidexSplit algoritlirris do not consider the rrierriory size colistrailit. oiic object may be read from disk several times and thereby extra 1/0 overliead occurs. Thus tlie so-called 1/0 thrashing probleiri rriiglit occur. Because PCSJ considers tlic rrierriory sizc constraint, therc is IIO extra 1/0 overhead. So. PCSJ is faster thari P F P C aiid IridexSplit. Because IiidexSplit lias t o pay additional cost for dealing with tlie iiidex, IiidexSplit is slower tliaii P F P C . The comrrioii treiiclciicy for the three parallel algorithms is t h a t response tirrie decreases as tlie i i u ~ ~ ofi bsites ~ increases. And tlic graph sliows that respoiisc time will continue t o drop down wlieii tlie number of sites exceeds 8.

4.3

0

1c

Scaleup performance

Fig. S(a) sliows scaleup rcspoiise time for corriputiiig Cl[Pl].C~[P2] ...C;[P;]wheii i sites arc available arid

255

I 2

3

4

5

Number of sites

6

7

8

Figure 5: (a)Spcedup respoiisc tirrie (b)Spectlup rate Fig. G(b) sliows tlic corrcspoiidiiig scaleup pcrforrriaiicc curve for three parallel algoritlims. Obviously, the scalcup pcrforrriaiicc of PCSJ is rriucli better thaii that of P F P C aiid IiidcxSplit. Iri PCSJ, tlic scaleup curve is always iicar t o liiicar. Tlicrc is a little iiitcrferciicc hetwccii sites iii tlie process of PCSJ, siiicc every liash table locates differerit storage space witliiii DSVM space and tlic arriouiit of coirirriuiiicatioii always keeps coiistaiit. On the otlicr side, P F P C aiitl IiidexSplit liavc worse scaleup. Tlic rriaiii rcasoii is t h a t tlic P F P C aid IridexSplit do not adopt the partitioiiiiig tccliiiiqlue aiid thereby tlic interferelice airioiig sites iiicrcascs as the iiurriber of sites iiicrcascs. 4.4

Discussion

From tlic previous perforinancc analysis. we caii see t h a t PCSJ lias tlic best speedup a i i d scaleup perforrriaiicc airioiig tlie t h e e parallel algoritlirris wlieii corriputiiig path cxprcssioiis with restrictive prcdicates. However, wliat happens for path cxprcssioiis witliout restrictive predicates'! that is t o say. how about tlic pcrforrriaiicc of tlic tlirce parallel algoritlirrls for patli expressions occurriiig in tlic SELECT and/or FROM

200

c

-I ............. 5..............e ......

0' 2

3

5

4

6

8

7

3

4

08 -

0.6 06 -

3

4

'y: .........

7

8

5

6

7

8

............

..I..+

33 33.

--%.

........

....

..U .U

.

....---........... 0 .Q

05 0.5

*.__ .-__ -.___ ..... o....

.... .....

.......

0 44 l

3

4

5 6 Number of sites

7

I

t

2

8

Number of sites

Figure 7: (a) Speedup resporise time without predicates (b) Speedup rate without predicates

Figure 6: (a)Scalcup respoiisc time (b) Scaleup rate clauses'! Fig. 7(a) aiid Fig. 7(b) sliow the speedup respoiisc time aid the speedup curves of tlie tlirce parallcl algoritlirris in tlic case of path expressioiis without predicates, respectively. Froin the response time. IiidcxSplit is fastest airioiig tlic t h e e algoritlirris w i t h 6 sites. This is rriaiiily bccausc PCSJ aiid P F P C have to read all objects iii tlic path expressioii from disk xio matter wlicther or iiot tlicrc exist predicates in tlie path cxpressioii wliile IridexSplit iieed iiot read aiiy object by tlic liclp of index. However, tlic PCSJ algorithin outperforms tlic IiidcxSplit algoritlim as the riurnber of sites iiicrcascs bcyoiitl 6. From Fig. 7(b), we can sec that IiitlexSplit has the worst speedup in the case of without predicates altliougli IiidcxSplit lias tlie fastest rcspoiisc time. This is because the overhead of parallelizatioii dorriiiiates tlie wliolc rcspoiisc time. Tlie fact sliows tliat it is uiiiiccessary t o parallelizc tlic cxecutioii of path expressions bascd oil the splitting index.

4.5

6

PFPC .*-IndexSplit e Linear *

07 0.7

2

I

5

I

t

1.1

..........

Number of sites

Number of sites I

?'.

schcduliiig strategies with limited rnernory, 8 sites. T h e lerigtli of the path expression is set t o 8. Tlie y-axis value is tlie response time and the x-axis value is the percentage of available rncrnory. T h e percentage of available rriernory is giveii iii the forinula: percentage = $. From Fig. 8, we can see t h a t the response time of two strategies are same wheii 100% lissli tables are expected t o fit into memory. However, as the size of the available memory decreases the rcspoiise time of two schedule strategies increases since tlie path expressions lias t o be broke11 iiito two several sub-path due t o the rrierriory size colistrailit. T h e right-deep zigzag tree outperforms the riglit-deep tree. This is mainly because t h a t whexi a path exprcssioii is broken into several sub-path expressions t o corripute, tlic right-deep zigzag tree schedule strategy just spends overhead t o start the parallel cxecutioii of these sub-path expressions while the right-deep tree schcduliiig strategy weds extra I/O disk overhead besides the startup time for each subpath exprcssioii.

Right-deep zigzag tree vs right-deep tree

This subsectiou aiialyzes tlic perforrnaiicc of different sclicduliiig strategies. Fig. 8 gives tlie performance curves of right-deep zigzag tree aiid right-deep tree

256

280

i\

140 0

[4] D.DeWitt, S.Gliaiideharizadeli, D.SchIieider, e t al. “The Gamrna database rriachiiie project,” IEEE TKDE, 1990, 2(1): pp.44-62. [5] Q.Faiig, G.Warig, G.Yu, K.KaIieko, arid A.Makinouchi, “Desigii and Perforrriaiice Evaluation of Parallel Algorithms for P a t h Expressions.” 1999 Iriterriutionul SyrrLposiurri o n Dutubuse Applicutions in Non- Traditionul Ewuironments, Kyoto, J a p a ~ i ,1999, pp.373-380. [6] K.-C.Kirn, “Parallelism in object-oriented query processing,” Proc. of the 6th ICDE Co,riference, Feb. 1990, pp.209-217. [7] M.Kitsuregawa, H.Tanaka, and T.Moto-oka, “Application of hash t o d a t a base machine aiid its arcliitecture,” New Generutio,ri Cowiputirig, 1983, 1(1)(81 M.Kitsuregawa, S.Tsudaka, arid M.Nakaiio, “parallel GRACE liasli join oii sliared-everything rriultiproccssor: Implerneiitatiou and perforrriance cvaluatiori on syrnmetry ~81,”Proceedings of the 8th ICDE Conference, Temper, Arizoiia, Feb. 1992, pp.256-264. [9] D.Licuweii, D.DcWitt, aiid M.Mehta, *‘Parallcl poiiitcr-based join techniques for object-oriented databases,” Proceedings of the 2nd PDIS Confere n c e , J ; ~ i i i i ~1993. y [lo] R.S.G.Laiizclotec, P.Valduriez, arid M.Zait, “Ori the cffectivciiess of optirriizatioii search strategies for parallel cxccutioii spaces.” P~.oceed.inysof t h e 19th VLDB Conference, Dublin, Ireland, 1993, pp493-504. 111 D.A.Scliiicider aid D.J.DcWitt, .’Tradeoff‘s in processirig corriplex joiii queries via hashing iii multiprocessor database rriacliiiics.“ Proceedings of the 16th V L D B Co,riference, Btishbaiie, Australia, 1990! pp.469-480. 121 T.Tsuji aiid T.Hochiii, .‘P;~rdlcl Iridcx Retrieval of Complex Objects”, Akuu,ricetl Dotubuse $ystems f o r I;rr.tegrmtz’onof Mekiu u n d User E r w i w r i rrc.ents ’98, Siiigapore, 1998, pp.179-184. [U] A.K.Tliakore, S.Y.W.Su, aiid H.X.Lam, “Algoritliiris for asyricliroiious parallel processing of object-orieiited databases,“ IEEE TKDE, 1995:7(3), pp.487-504. [14] A.N.Wilschut, J.Folkstra, aiid P.M.G.Apers, ”Parallel cvaluatioii of rriulti-join queries.” Proceedings of the SIGMOD Co,ri$mxce, Sail Jose, CA USA, pp.115-126 (151 G.Yu, K.Kaiieko, G.Bai, aiid A.Makinouchi, “Traiisactioii rrianagernent for a distributed object storage system WAKASHI-design, irriplementation aiid performance,” Pwc. of the 1 2 n d ICDE Confe,rence, New Orleitiis, 1996, pp.460-468. [16] M.Ziaiie, M.Zait? aiid P.Borla-Salarnet, *‘Pardle1 Query Processing with Zigzag Trees.” VLDB JowrriuZ, 1993, 2(3): pp.277-301.

Right-deep zigzag tree + Right-deep tree -*---

1 2 Available memory( (2“x)/8 )

I

3

Figure 8: Right-deep zigzag tree vs right-deep tree with limited incrriory

5

Conclusions

This ~ x i p c rstudies oiic of tlic open problcrris iii’parallcl object database systeiris, iianicly parallel coinputatioii of path expressions. After analyziiig the cxistiiig kipproaclics t o path cxprcssioiis, tliis paper has prcseiitetl a iicw paraillel algorithm PCSJ t o corriputc path cxprcssioiis iii object database systems, and givcii the pcrforI I I M I C ~ aiiiilysis aiid corriparisoii of algoritlirri with the otlicr two typical p2~r:~llclalgoritliins. Tlie cxpcrirnciital results show tliat tlic PCSJ algoritlirii outperform tlic otlicr two p:~I;~llclalgoritlirris wlicii corriputiiig path expressions with restrictive predicates. At the Silllie time, a iicw schcduliiig strategy r i g h t - d e e p zigtug tree is proposed to furtlicr iinprovc the pcrforrriaiicc of tlic PCSJ algoritlirn by avoidiiig extra disk overhead. Tlic cxpcrirriciital result shows t h a t tlic ~vigclht-dee-yzigzag tr’ee outperforiris tlic right-deep tree iii the case of liiriitcd rriciriory. Tlic algorithiri lias bceii irriplcrrieiited i i i aii object database systerri Shusse-Uo wliicli is uiider tlcvclopiiieiit a t Kyusliu University of Japaii aid Nortlicastcrii Uiiivcrsity of Chiiia iii tlic ciiviroiirrieiit of Networks Of Workstatioiis(N0W).

References [l] R.Cattcl1, The olrjcct d o t u b u s e .stu,ri.dard: ODMG 2.0. M o I g ~ i iKaufrriaiiii Publishers, Inc. 1997.

[2] M.-S.Clicii, M.Lo, P.S.Yu, et al. Wsiiig segriiciitcd riglit-deep trees for tlic cxccutioii of pipcliiicd liash joiiis.” Pwceedings of tlie 18th VLDB Co,rAference, V i ~ ~ i c o u v cCra~~ i a d a ,1992, pp.15-26. [3] M.-S.Clieii, M.Lo, P.S.Yu, et id. “Applying segiricritcd riglit-deep trees to pipcliiiiiig multiple

liasli joiiis,?’ IEEE TKDE, 1995, 7(4): pp.656-668. 257