• No results found

Performance Analysis of Numerical Problems on a Loosely Coupled System

N/A
N/A
Protected

Academic year: 2021

Share "Performance Analysis of Numerical Problems on a Loosely Coupled System"

Copied!
31
0
0

Loading.... (view fulltext now)

Full text

(1)

COORDINATED SCIENCE LABORATORY

College o f Engineering

PERFORMANCE

ANAT YSTS O F

NUMERICAL PROBLEMS

ON A LOOSELY

COUPLED SYSTEM

Joseph T . Rahm eh

Jacob A . A braham

UNIVERSITY OF ILLINOIS A T URBANA-CHAMPAIGN

(2)

REPORT DOCUMENTATION PAGE

1*. REPORT SECURITY CLASSIFICATION

Unclassified

1b. RESTRICTIVE MARKINGS

None________ ___

2a. SECURITY CLASSIFICATION AUTHORITY

2b. DECLASSIFICATION/DOWNGRADING SCHEDULE

3. DISTRIBUTION/AVAILABILITY OF REPORT

Approved for public release; distribution unlimited

4. PERFORMING ORGANIZATION REPORT NUMBER(S)

UILU-ENG-87-2218

(CSG-66)

5. MONITORING ORGANIZATION REPORT NUMBER(S) 6a. NAME OF PERFORMING ORGANIZATION

Coordinated Science Lab University of Illinois

6b. OFFICE SYMBOL

(If applicable)

N/A

7a. NAME OF MONITORING ORGANIZATION

Semiconductor Research Corporation (SRC)* Texas Instruments, Inc. (TI) **__________

6c ADDRESS (Q'ty, State, and ZIP Code)

1101 W. Springfield Avenue Urbana, IL 61801

7b. ADDRESS (City, State, and ZIP Code)

Research Triangle Park * Dallas North Carolina Texas

27709

75265

k k

8a. NAME OF FUNDING/SPONSORING ORGANIZATION

SRC________________

JLL

8b. OFFICE SYMBOL

Of applicable)

9. PROCUREMENT INSTRUMENT IDENTIFICATION NUMBER

86-12-109 (SRC)

none (TI)

8c ADDRESS (City, State, and ZIP Code)

Research Triangle Park North Carolina

27709

Dallas Texas

75265

10. SOURCE OF FUNDING NUMBERS PROGRAM PROJECT TASK

ELEMENT NO. NO. NO.

WORK UNIT ACCESSION NO. 11. TITLE (Include Security Classification)

Performance Analysis of Numerical Problems on a Loosely Coupled System

12. PERSONAL AUTHOR(S)

Rahmeh, Joseph T. and Abraham, Jacob A.

13a. TYPE OF REPORT

Technical

13b. TIME COVERED FROM TO

14. DATE OF REPORT (Year, Month, Day)

March, 1987

15. PAGE COUNT

28

16. SUPPLEMENTARY NOTATION 17. COSATI CODES

FIELD GROUP SUB-GROUP ,

18. SUBJECT TERMS (Continue on reverse if necessary and identify by block number)

distributed systems; load balancing; modeling; simulation

19. ABSTRACT (Continue on reverse if necessary and identify by block number)

We present a performance model for a class of numerical problems on a loosely coupled system of processors. We validate the model by comparing its performance predictions to empirical data collected from the implementation of matrix multiplication, FFT,

and two-dimensional FFT on a network of workstations. We show that the large communication overhead limits the speedup and, for a fixed-size problem, may result in a decrease of speedup as the number of processors assigned to the problem is increased. We use the model to study the effects of broadcasting and the use of a communication processor on

the performance of the system.

20. DISTRIBUTION/AVAILABILITY OF ABSTRACT

SUNCLASSIFIED/UNLIMITED □ SAME AS RPT. □ OTIC USERS

21. A8STRACT SECURITY CLASSIFICATION

Unclassified_______

22a. NAME OF RESPONSIBLE INDIVIDUAL 22b. TELEPHONE Qnclude Area Code) 22c. OFFICE SYMBOL

DD FORM 1473,84 m a r 83 APR edition may be used until exhausted.

All other editions are obsolete.

SECURITY CLASSIFICATION OF THIS PAGE

(3)

UNCLASSIFIED

(4)

Joseph T . Rahmeh and

Jacob A . Abraham

Computer Systems Group U niversity o f Illinois Coordinated Science Laboratory

1101 W . Springfield Urbana IL 61801

* This work was supported by the Semiconductor Research Corporation under contract 86-12-109 and by a grant from Texas Instruments, Incorporated.

(5)

1. Introduction

Distributed com puter system s consisting o f a collection o f w orkstations and m ainframe machines connected through a local area network are becoming a standard w ay o f providing com ­ puter service. Such systems provide resource sharing, good perform ance, highly interactive user interfaces, and possibly im proved reliability over centralized systems. Stankovic [1] gives an excel­ lent survey o f distributed com puter systems.

Good perform ance in distributed com puter systems results from resource dedication and/or load balancing. Resource dedication calls fo r reserving a resource or set o f resources fo r the exclusive use o f one task Cor jo b ) in order to minimize its turnaround time. Load balancing, on the other hand, consists o f m oving tasks or subtasks from a loaded resource to unused or slightly loaded resource in order to maximize the throughput o f the w hole system . Note that in the case o f a single job and an idle system , resource dedication and load balancing are identical.

In this report w e consider the perform ance o f a single job distributed on a cluster o f w orksta­ tions dedicated to that job. Our w ork is m otivated b y the abundance o f com putation-intensive jobs and the availability o f w orkstations. Dedicating otherwise idle (at night tim e fo r exam ple) w orks­ tations to a com putation intensive job m ay offer a low cost solution to expensive problem s.

Performance o f distributed systems m ay be obtained through one o f three methods: modeling, sim ulation, and direct measurement [2]. These methods provide a range o f flexibility and accuracy. In general, modeling is the least accurate since it requires many sim plifying assumptions in order to make the m odel tractable. Direct measurement offers the most accuracy, how ever the results are lim ited to the system being measured.

(6)

In this report w e couple modeling and measurements and obtain an accurate m odel by: (1 ) concentrating on specific algorithms (this results in a simple m odel).

(2 ) embedding measured system parameters into the m odel, and

(3 ) validating the m odel b y comparing the perform ance it predicts to experimental data.

We then use the validated m odel to study the effects o f com m unication [3-5] on the perform ance o f the system and to determine the conditions under w hich the com m unication overhead reduces the speedup as m ore processors are directed to the problem .

The remainder o f the report is organized as follow s. In section tw o w e derive the perfor­ mance m odel o f the system . In section three w e validate the m odel b y comparing m odel-predicted and experimental results. In section fou r we use the validated m odel to study the effects o f vary­ ing system parameters on performance. Section five contains the conclusions.

(7)

2 . Perform ance M odel

The system w e are m odeling consists o f a set o f identical workstations connected through an single bus (ethem et cable). Let P denote the number o f processors participating in the experiment, and T and Tj> denote the task turnaround time on one and P processors, respectively. The perfor­ mance measures w e are interested in are the speedup.

and the efficiency.

The speedup o f a task (or jo b ) depends on the task, how the task is partitioned into subtasks, and how the subtasks are allocated to the participating processors. W e make the follow in g assumptions about the task and about the partitioning and allocation issues:

(1 ) The job originates at one processor hereafter referred to as the prim ary processor. A n y data pertaining to the job is originally available on ly on the prim ary processor.

(2 ) The job finishes on the prim ary processor. A ll results reside on the prim ary processor when the job terminates.

(3 ) A ll other processors, called secondary processors, on the netw ork are either idle or cooperating w ith the prim ary processor on the distributed job.

(4 ) The algorithm is perfectly orchestrated: there is no contention fo r the netw ork.

(5 ) The job consists o f tw o or more phases, each running either serially on the prim ary processor or in parallel on all o f the participating processors. W e consider jobs w ith on ly one parallel phase since the general case m ay be regarded as a sequence o f subjobs, each containing exactly

(8)

one parallel phase.

(6 ) In a parallel phase the prim ary processor splits the data between itself and the secondary pro­ cessors. sends portions o f the data to the secondary processors, computes its portion o f the problem , polls the secondaries fo r subresults, and merges the subresults.

W e further sim plify the analysis b y concentrating on ly on the parallel phase o f the job. The speedup and efficiency o f the w hole job can be easily determined from those o f the parallel phase.

2.1. Model Parameters and Equations

First, we define the m odel parameters fo r the parallel phase o f the algorithm . Let (1 ) n denote the size o f the the problem ,

(2 ) P the number o f processors,

(3 ) t the turnaround time on a single processor (7* denotes the single processor turnaround time fo r the w hole job ).

(4 ) tj> the turnaround time on P processors (Tp is used fo r the w hole job ). (5 ) r i the execution cost function on processor i,

(6 ) Si the size o f data sent to processor i,

(7 ) Ri the size o f data received from processor i,

(8 ) C the comm unication cost function (e.g., C (m ) is the cost o f sending m bytes from any proces­ sor to any other processor assuming no contention fo r the ethem et),

(9 ) Wi the w ait time fo r results from secondary processor i (e.g Wj is the time the prim ary pro­

cessor blocks waiting fo r secondary processor i to finish its com putation) and, finally, (1 0 ) M the cost to merge the subresults.

(9)

communication (send and receive) parameters.

The netw ork turnaround time is the sum o f the time to send the data to all the secondary processors, the com putation time on the prim ary processor, the tim e to w ait fo r and receive subresults from the secondary processors, and the time to merge the subresults:

p-i p- 1

ip = zees,) + To + Z O i + CCRi)) + M.

(2.1)

1=1 i = l

Note that the prim ary processor is processor 0. A n y analysis o f tP requires the knowledge o f the partitioning (S and R term s) o f the problem and the execution cost (r functions) o f each o f the par­ titions. W e first consider the case where the secondary processors each receive the same amount o f data and where the execution cost function does not depend on the data or the processor.

2.2. Even Partitioning Model

In the even partitioning m odel we assume that the secondary processors receive the same amount o f data and send back the same amount o f results. W e also assume that the execution cost functions are identical and independent o f the processor and o f the processed data. The partitioning strategey is what Dubois and Briggs [6] refer to by "vectorial decom position". Figure 2.1 shows a timing diagram fitting the above assumptions fo r a system consisting o f fou r processors. Note that the prim ary processor begins and finishes execution at the same time as the last secondary

proces-processor 0

1

send j j send |___________ compute__________ ^ receive ^ receive ^ receive ^ processor 1 1 receive |__________ com pute__________ ... .id le...^ send ... id le ...} processor 2 h - idle - ) rective |__________ com Pute__________ ...A4J?... , send j idle | processor 3 i ...A'?.1.'... -j receive ,__________ com Pute__________ ^... .id le... f send |

(10)

sor. Therefore, all secondary processore finish at the same time as or before the prim ary processor and the w ait terms vanish from the netw ork time equation. The netw ork time equation becomes:

tF = (P - l)C (S ) + r 0 + CP - 1)CCR) + M

= T0 + ( P - 1 ) CCS) + C (P ) + M (2.2)

which results in the follow in g speedup (w e use tr0 fo r the parallel phase and cr fo r the w hole job ):

t _

lT° + (P -l)( C C R ) + C (S )) + Af - l

tp t t

Note that, ideally, w e w ould like the speedup to be t/r0. The extra terms in the speedup equation result from the merge time and the idle segments in Figure 2.1. The idle segments in Figure 2.1 result from tw o factors:

(1 ) The prim ary processor communicates w ith the secondary processors one processor at a time. Thus, when data is sent to the first secondary processor, the rest are idle. W e w ill consider w ays to avoid such a serialization through broadcasting in section 4.

(2 ) The prim ary processor starts its com putation last; thus, the secondary processors finish first and have to be idle w hile waiting fo r the prim ary processor to receive their results. In section 4 w e w ill show how to avoid idling the secondary processors through the use o f a com m uni­ cation processor.

2 3 . Relating the Parallel Phase to the Whole Job

W e now establish the relationship between the speedup o f the parallel phase and that o f the w hole job. Recall that T and TP denote the turnaround time o f the w hole job on one and P proces­ sors, respectively. Let y denote the fraction o f T w hich is not parallelizable, i.e., y T represents the execution cost o f the portion o f the job that is not distributed. W e have:

(11)

therefore,

T

y T + " ~ y )T

«

(2 .3 )

For a fixed job size and varying number o f processors assigned to that job, w e now establish that, if the speedup o f a job peaks as w e increase the number o f processors assigned to it, then so does the speedup o f the parallel phase and at exactly the same number o f processors. The p roof hinges on the assumption that, fo r a fixed job size, the serial fraction y is independent o f the number o f pro­ cessors P

LEM M A 2.1: The speedup o f a job cr and the speedup o f its parallel phase cr0 assume their maximum (local or global) at the same number o f processors P.

PROOF: If y = 0 then cr = cr0 and the lemma is trivially valid. cr = y + y T + tF 1 T T ^ y T * y T + — Oo o’o

If y — 1 then <r = 1 and O’0 = 0 and the lemma is, again, trivially valid. Otherwise, 0 < y < 1. The derivative o f o’ w ith respect to P is:

(1 — y) ¿cr ~dP - d dP O’o

+ q - y )

O’o ( 1 - y ) do-c O’o2 1 t H + * r dP O'0 (2 .4 )

which implies that, fo r each value o f P, the derivatives o f O’ and o*0 either have the same sign or are both zero.

(12)

3* Im plem entation

3.1. Introduction

In this section w e describe the distributed, even partitioning implementation o f m atrix m ulti­ plication. Fast Fourier Transform (FFT), and 2-dim ensional Fast Fourier Transform (2 d FFT). W e apply the m odel derived in section tw o to each o f the above problems and compare the perform ance predicted by the m odel to the one measured from the implementations. Experimental data was col­ lected on a cluster o f five SUN-M icrosystem s w orkstations (m odel 3 /5 0 ) all equipped w ith a float­ ing point accelerator (FPA) chips and running the UNIX operating system . A ll experiments were repeated w ith the FPA turned off to emulate a system w ith a better com m unication to com putation ratio. Distribution was achieved through the use o f the remote procedure call, RPC, programming paradigm. First, w e describe the experiments used to determine the key parameters o f the m odel.

3.2. Measuring Model Parameters

The parameters o f the m odel consist o f the size o f the data sent to and received from the secondary processors, the com putation cost function, the communication cost function, and the cost o f merging the subresults received from the secondary processors. Since w e are considering even partitioning, the size parameters are independent o f the secondary processors, and the com putation cost function is independent o f the processors and the data.

The size parameters are obtained directly from the algorithm , as w ill be seen later. The com ­ putation cost function is obtained from the com plexity analysis o f the algorithm s, and the coefficients o f that function are evaluated by fitting the function to measured data. For example,

(13)

the com plexity analysis o f the FFT yields a cost function o f oen log n\ W e evaluate <x b y measur­ ing the cost o f the FFT (versus n) and then fitting the measured data to the function cm log n.

Since the com m unication medium is a packet-oriented bus [7], the com m unication cost fu n c­ tion is hypothesized to have the form :

C (m ) = a0 + b 0m + 1 (3 .1 )

and is approximated w ith:

Cirri') 53 ( — + b 0)m + l = am + l (3 .2 )

s

where l is the com m unication latency due to the operating system call and netw ork delay over­ heads. s is the packet size, and a 0 and b0 are the com m unication cost per packet and per byte respectively. The packet size was obtained from an operating system constant table. The coefficients clq, bo, and l were obtained em pirically through sim ple netw ork experiments. Replacing

the coefficients o f equation 3.2 b y their values, w e get (Cirri') is expressed in m illiseconds):

C (m ) s» 7 .9 3 e -3 m + 9.62 (3 .3 )

Figure 3.1 validates equation 3.3 by showing how w ell it fits the measured data. Figure 3.2 shows the transmission rate (both measured and com puted) versus the message size. Note that the best measured transmission rate o f 122 K bytes/s fa lls much low er than the rate o f 1.25 M bytes/s which a 10 M bits/second ethem et is capable o f delivering.

3 3 . Model Validation

In this section w e consider distributed implementations o f m atrix m ultiplication. Fast Fourier Transform , and 2-dim ensional Fast Fourier Transform problem s. For each job, we derive a speedup equation fo r the parallel phase and then use that to determine the speedup o f the w hole job (i and o-q express the the time and speedup o f the parallel phase and T and cr those o f the w hole

(14)

Time 800 (m s) 600 400 200 0 0 20000 40000 60000 80000 100000

Message size (bytes)

Fig. 3.1. Fit o f com m unication function.

Rate (K b ytes/s) 120 100 80 60

;

--- ;---

:

i f ..i... 1...

: (

...i... ;...

0 20000 40000 60000 80000 100000

Message size (bytes)

measured com puted

Fig. 3.2. Communication rate versus message size.

job).

3 3 .1 . M atrix Multiplication

The objective is the product o f tw o matrices:

A = B X C

where A , B. and C are uXu matrices (extension to non-square matrices is trivial). Each o f the pro­ cessors participating in the distributed algorithm computes u/P row s o f A (assume fo r a moment that u is a m ultiple o f P ). The distributed algorithm consists o f three steps:

(15)

(1 ) The prim ary processor ships C and u/P row s o f B_ to each secondary processor; a secondary processor starts com puting as soon as it receives data.

(2 ) The prim ary processor computes its u/P row s o f A .

(3 ) The prim ary processor receives the results o f the secondary processors into their appropriate positions in the A m atrix. Thus, the cost o f merging the subresults is zero.

The size o f the problem is n ~ u 2. The single processor com putation cost function is:

t = <mlJ (3 .4 ) where a is em pirically determined to be 1.302e-5 (1.6e-4 w ithout the FPA). The prim ary proces­ sor sends C and u/P row s o f B_ to and receives u/P row s o f A from each secondary processor, thus:

S = n + — and R — — .

P P (3 .5 )

It is understood that S and R are expressed in bytes, even though we do not include any conversion (to bytes) factors in their expressions.

The com putation cost function in the distributed algorithms is (cost o f evaluating u/P row s o f A ): ,1.5

r = an

The network time function can now be w ritten as:

tp —cox

1.5

+ (/>

-4

H

+ c

which correspond to a speedup o f:

(r0 = 1 A C P - i ) P C « 1-5 + C (3 .6 ) (3 .7 ) - l (3 .8 ) which is identical to the speedup, cr o f the w hole problem since m atrix m ultiplication contains no serial phase. Figure 3.3 shows both the measured and com puted speedup versus the number o f row s in the matrix.

(16)

□ measured —— com puted a measured (FPA) ••••••computed (FPA) 0 20 40 60 80 100 Number o f row s

Fig. 3.3. Speedup versus number o f row s fo r matrix m ultiplication.

3 3 .2 . Fast Fourier Transform

The Discrete Fourier transform (D FT) [8] maps the vector X = (x 0. * i, * * * xre- i ) into the vector Y = Qy0, y i. * * * yre- i ) such that

re—1

y t = L X i e - 2Jmkw,n ( 3 9 )

m— 0

A straightforw ard implementation o f the DFT requires 0 ( n 2) steps. However, the Fast Fourier Transform algorithm (FFT) [8-9] computes the DFT in 0 (n log ri) steps. The FFT consists o f log n stages w hich transform X into Y. Each stage consists o f n /2 butterfly operations on the output o f the previous stage (the first stage operates on X ). W e m od ify the FFT algorithm such that, at each stage, the tw o operands o f each butterfly operation are adjacent. Figure 3.4 contains a description o f the m odified algorithm . The "bit_reversal_perm utation" and the "shuffle" functions guarantee that the operands o f each butterfly operation are adjacent.

(17)

A = bit__reversal_perm utation( X ) fo r i= ljt o log n do 5 = parallel_Jjutterfly( A ) A = shuffleC B ) end fo r Y = shuffleC B )

Fig. 3.4. Parallel FFT algorithm.

The parallel implementation o f the m odified FFT algorithm distributes the n/2 butterfly operations among the participating processors. The function "parallel_butterfly" is the on ly distributed por­ tion o f the m odified algorithm ; its single processor com putation cost function (evaluation o f n/2 butterfly operations) is:

During one execution o f "parallel_butterfly", each secondary processor receives 1/P o f A and 1/C2F) o f a vector o f coefficients needed to perform the butterfly operations and returns 1/P o f 2? thus:

S = 1 .5 ^ and R = £ (3 .1 1 ) The com putation cost function on each o f the secondary processors is (cost o f evaluating n /( butterfly operations):

t = an (3 .1 0 )

(3 .1 2 ) The netw ork tim e function becomes:

fp = - ^ + CP - 1) c ( 1 .5 i ) + c ( - l )

(3 .1 3 )

which yields a speedup of:

(18)

To obtain the FFT speedup, <r. from the parallel phase speedup. <r0. all we need is to com pute the fraction o f non-parallelized code y . The serial FFT time is /3/ilogn., and the vector butterfly opera­ tion is perform ed logn times thus:

_ 0nlogn - on logn _ fl-o t

Y ¿Snlogn a

Beta and alpha are determined em pirically. Figure 3.5 shows the measured and com puted speedups o f the distributed FFT algorithm fo r a range o f number o f points.

3 .3 3 . Two Dimensional FFT

The tw o-dim ensional discrete Fourier transform [8] maps the m atrix X = [x^ L x« into the m atrix Y = such that

u—i 1=0

u - l

y r v = £ e -2 jr lir / u £ ^ - I J v m w / n

m=0

One implementation [8] o f the 2d-DFT consists o f the follow in g three steps:

(3 .1 6 )

(1 ) Perform the FFT on each o f the row s o f X.

Speedup

(19)

(2 ) Perform the FFT on each colum n o f the resulting matrix. (3 ) Transpose the result o f the second step.

In the distributed algorithm , w e sim ply partition the row s (same fo r colum ns) between the partici­ pating processors and perform the FFT on the row s in parallel.

The size o f the problem is n = u2 and the single processor cost o f the FFT o f the row s is (FFT o f u row s, u elements each):

t — u (a 0ulog u ) = an log n (3 .1 7 ) where a = ocq/2. Each secondary processor receives and sends u/P row s:

S = * ’ T - ’ 7 - (3 .1 8 )

The com putation cost function on the secondary processors is (FFT o f u/P row s, u elements each):

r = — n log n.

and the netw ork time function is:

f , = y t i log n + 2 (P - l ) c ( i ) . yielding a speedup o f:

O’ o = 4 + 1 } 2 C ( ^ )

P om. log n P

- l

The time com plexity o f the 2d-FFT algorithm is:

(3 .1 9 )

(3 .2 0 )

(3 .2 1 )

T = fin + 2an log n, (3 .22 ) where fin accounts fo r m atrix transposition and 2an log n represents the serial counterpart o f the tw o parallel phases. The serial fraction is:

^ j3 + 2a log n

Figure 3.6 shows the measured and predicted speedup o f the 2d-FFT problem .

(20)

□ measured — com puted a measured (FPA ) — ••computed (FPA) 0 50 100 150 200 250 Number o f row s

Fig. 3.6. Speedup versus number o f row s fo r 2d-FFT. Speedup

3.4. Discussion

The overall speedup, cr. depends on the speedup o f the parallel phase. cr0. and on the serial fraction, y . For FFT, the speedup o f the parallel phase is:

<r0 = 4 + ———[C (1.5n/P ) + C (n /P )] r an - l

f

+ C F - D

2.5a 21 -l. otP an

which is lim ited by the communication overhead term, 2 .5 a (P -l)/(a Z >), regardless o f the problem size n. The communication overhead, coupled w ith a constant serial fraction, y = (0 —cx)/0, results in a m ediocre speedup fo r FFT even fo r very large problem sizes.

In the case o f 2d-FFT, the parallel phase speedup.

1 x 2 ( P - l ) C ( n /P ) - l

* + 2 (P — 1) a + l

P onlogn Plogn cmlogn

contains com m unication overhead terms w hich approaches zero fo r large n. In addition the serial fraction, y = 0 /(0 + 2 alogn ). vanishes fo r large n. Therefore, the asym ptotic speedup is P; how ­ ever, the speedup approaches its asym ptotic value at a slow rate because the function logn grows very slow ly as n increases.

(21)

4 . Projections

In this section w e determine the maximum speedup achievable fo r the previously described class o f algorithms. W e then study the effect on perform ance o f 1) adding a com m unication pro­ cessor to each w orkstation and 2 ) broadcasting data to the secondary processors.

4.1. Maximum Speedup

Given a fixed size problem and a large number o f processors, w e w ould like to determine whether or not the speedup peaks and starts declining. If so, we want to determine the number o f processors at w hich this phenomenon occurs. By differentiating the speedup function w ith respect to P and setting the resulting expression to zero w e get:

¿ T o + (P - 1 ) A ( C ( S ) + CO O ) + ¿ J f + C(S) + C (P ) = 0. (4 .1 )

Pptak cm

Solving the above equation in the range o f processors applicable to the given problem , we obtain the number o f processors fo r w hich the speedup peaks. For example, when applied to m atrix m ultipli­ cation Equation 4.1 yields*:

- 11/2

- 2an

an + 21 ' (4 *2) which when evaluated at n = 2500 (50 b y 50 m atrix) results in P ^ = 10. Figures 4.1 and and 4.2 show the speedup versus the number o f processors fo r a range o f problem sizes fo r m atrix m ultipli­ cation, FFT, and 2d-FFT (the FPA results o f FFT is not shown because no speedup is acheived in that case).

* Recall that the single processor computation cost is coi1,5 and that the communication cost function is an + l where n is expressed in bytes.

(22)

Speedup

Speedup

Speedup

(23)

Speedup Number o f processors M atrix m ultiplication 512 x 512 matrix Speedup 2.5

2

1.5 1 0 5 10 15 20 25 30 Number o f processors 2d-FFT

Fig. 4.2. Speedup versus number o f processors (FPA).

256 x 256 128 x 128

64 x 64

4.2. Communication Processor

By equipping each w orkstation w ith a dedicated comm unication processor, w e can overlap communication and com putation and reduce the delays in the system . The operating system w ould include non-blocking interfaces to the communication processor allow ing the com putation processor to proceeds w ith its com putation right after transferring data to the com m unication processor. W e recognize tw o different types o f synchronization between the com m unication and com putation pro­ cessors:

Conservative

The com putation processor blocks w hile data is being transferred to a com m unication proces­ sor buffer. This guarantees that the com putation processor cannot corrupt data w hile it is being transferred.

(24)

Risky

The com putation proceeds right after passing to the com m unication processor the address and the size o f the data. The communication processor transfers the data directly to the netw ork. This avoids copying the data and blocking the com putation processor; how ever, it suffers the risk o f having the com putation processor m odify the data before thè com putation processor sends it.

W e w ill assume risky synchronization since w e are interested in the m a x im u m achievable speedup. The resulting timing diagram is shown in Figure 4.3 where "processor" refers to a com putation pro­ cessor and "cp" refers to a communication processors. The corresponding speedup equation becomes:

O' t C P -1 )C (S ) + CCR)

t t (4 .3 )

The com m unication processor reduces the com m unication overhead factor (P —1)C (2?) to C( R) : however, this reduction need not translate into a significant speedup boost since the reduced over­ head is on ly a portion o f the overall overhead C P -1 )(C U O +C (5 )). Figures 4.4 and 4.5 shows the resulting effect on speedup. M atrix m ultiplication shows no significant im provem ent in speedup since the size o f data received by the prim ary processor, R =n/P. is on ly a sm all fraction o f that sent to each secondary processor, S —n+n/P . In the case o f FFT, a more visible increase in speedup

idle receive* processor 0 1----— ^ cp 0 1--— processor 1 cp 11-processor 2 [• cp 2 processor 3 (•• cp 3 compute send idle receive idle send compute receive idle send* ’ compute receive idle 1 h receive compute 1 \ idle send receive idle idle J . . . . L ! send

(25)

Speedup Speedup Speedup

1.8

1.6

1.4

1.2

1.0 0 5 10 15 20 25 30 Number o f processors FFT

(26)

Speedup

2

0 0 5 10 15 20 25 ... 30 Number o f processors M atrix m ultiplication Speedup

Fig. 4.5. Speedup vs. number o f processors using comm unication processors (FPA ).

results because the size o f data received, R =n/P . is a significant fraction o f the size o f data sent,

S=1.5n/P. For 2d-FFT the size o f data sent. n/P. is identical to that received. Reducing

CP—l)C ( P ) to CCR) almost halves the overall com m unication overhead dram atically im proving the speedup o f 2d-FFT.

4 3 . Broadcasting

Broadcasting any com m on data to all the secondary processors reduces the com m unication time by reducing the size o f the transferred data. In addition, broadcasting all data (com m on or otherwise) to all secondary processors and having each secondary processor disregard the portions o f the data it does not need, incurs the com m unication latency overhead once instead o f P —1 times. Figure 4.6 shows the timing diagram fo r broadcasting. The corresponding speedup equation is:

(27)

~ . broadcast,

processor 0 1---1- compute . receive, receive, receive processor 1 (■•

processor 2 (■■ processor 3

idle compute send

■--- r idle

idle compute , idle , send , idle , t...r--- r ...r

idle compute idle

Fig. 4.6. Timing diagram fo r broadcasting.

send

o ’ = r C (P ) + ( P - l ) C ( i O

t t

- l

where B is the size o f the broadcast data and R is the size o f the data received from each secondary processor. W ith broadcasting, the overhead fo r sending the data changes from CP—1)C (5 ) to C (P ). In the w orst case, no com m on data is sent to the secondary processors, and the size o f the broadcast data is P = (P —1)S; the on ly saving in this case is in the com m unication latency w hich is incurred once instead o f P —1 times. H owever, the saving in comm unication latency is outweighed b y the delay incurred b y each secondary processor in the reception o f all o f the broadcast data. Both FFT and 2d-FFT fit the w orst case scenario and. consequently, show no im provem ent in speedup from broadcasting. In the best case, the same data is sent to all the processors and the size o f the broad­ cast data, B, is identical to that sent to each secondary processor in the serial com m unication case,

S. Thus the cost o f sending the data is reduced b y a factor o f P —1. M atrix m ultiplication comes

close to the best case since a sizable portion o f the data sent to the secondary processors is common. Figures 4.7 and and 4.8 show the speedup versus the number o f processors when broadcasting is used w ithout and w ith the FPA, respectively.

(28)

Speedup

Speedup

Speedup

(29)

Speedup

Speedup

(30)

5 . Conclusions

In this report w e presented a perform ance m odel fo r a loosely coupled cluster o f w orkstations and fo r a class o f parallel algorithms. W e validated the m odel b y comparing its results to em piri­ cal data. W e used the m odel to study the effects o f varying the system parameters. W e showed that the speedup is lim ited b y the large com m unication overhead. In addition, the large com m uni­ cation overhead m ay result in a decrease in speedup as more processors are directed to a given prob­ lem. W e also showed that broadcasting substantially im prove the speedup in the case where a large portion o f the broadcast data is used b y each receiving processor. The use o f a com m unication pro­ cessor is beneficial in the case where most o f the data received by each processor is different that that received b y any other processor.

(31)

REFERENCES

[1] J. Stankovic. “ A Perspective on Distributed Computer System s/* IEEE Transactions on

Computers, v ol. C -33, pp. 1102-1115, December 1984.

[2] P. Heidelberger and S. Lavenberg, “ Computer Performance Evaluation M ethodology/* IEEE

Transactions on Computers, v oi. C -33, pp. 1195-1230. December 1984.

[3] B. Lint and T. Agerwala. “ Communication issues in the Design and Analysis o f Parallel A lgorith m s/’ in IEEE Transactions on Software Engineering, pp. 174-188, March 1981. [4] D. V rsalovic, E. Gehringer. Z. Segali, and D. Siewiorek, "T he Influence o f Parallel

Decom position Strategies on the Performance o f M ultiprocessor S ystem s/’ in International

Symposium on Computer A rchitecture, Boston, pp. 396-405, June 1985.

[5] D. Gannon and J. Rosendale. "O n the Impact o f Communication Com plexity on the Design o f Parallel Numerical Algorithm .*’ IEEE Transactions on Computers, v oi. C -33, pp. 1180-1194, December 1984.

[6] M. Dubois and F. Briggs, "Perform ance o f Synchronized Iterative Processes in M ultiprocessor Systems,” IEEE Transactions on Software Engineering, v oi. SE-8, pp. 419-431, Juy 1982. [7] W . Stallings, Data and Computer Communications. New Y ork, New Y ork: M acm illan

Publishing Com pany, 1985.

[8] A . Oppenheim and R. Schafer, Digital Signal Processing. Englewood C liffs, New Jersey: Prentice-Hall. 1975.

[9] L. Jamieson, P. M ueller, and H. Siegel, "FFT Algorithm s fo r SIMD Parallel Processing Systems,” Journal o f Parallel and Distributed Computing, voi. 3, pp. 48-71, March 1986.

References

Related documents

o Developing E-Business project for server site applications with J2EE (Servlet, JSP, JavaBeans, EJB), html, JavaScript, and JDBC on Websphere Application Server, Oracle8i

Though we shall restrict ourselves to the case where o ' is of finite type over o, the conditions we shall state below can be con- sidered in a more general cases.. Each of th

Board for Master Plumbers Board for Master Plumbers. APPROVED: APPROVED:

In essence, sustainable development is a process of change in which the exploitation of resources, the direction of investments, the orientation of techno- logical

Having already shown that oxidation after reduction was not necessary for the production of anthocyan pigments—and this was confirmed in every case where

On the other hand, if the solution at D has a positive curvature, then the current turns back toward the slope and recrosses the turnoff depth, where its

When a new infusion pump is requested with the added feature of a continuous glucose monitoring system (i.e., Paradigm® REAL-Time Insulin Pump and CGMS) the medical criteria

Under these conditions, we achieved the highest consoli- dated net sales in the domestic construction industry for the fiscal years ended March 31, 2014 and 2015, achieving most