26
© 2006 GridCOMP Grids Programming with components. An advanced component platform for an effective invisible grid is a Specific Targeted Research Project supported by the IST programme of the European Commission (DG Information Society and Media, project n°034442) Components, GCM, and Behavioural skeletons Marco Aldinucci University of Pisa, Italy (CoreGRID REP Programme) M. Danelutto, S. Campa University of Pisa, Italy P. Kilpatrick QUB, UK N. Tonellotto, P.Dazzi ISTI-CNR, Italy November 22th, 2007 QUB, Belfast, UK

Components, GCM, and Behavioural skeletonsgroups.di.unipi.it/~aldinuc/talks/2007_Belfast_BeSke.pdf · Components, GCM, and Behavioural skeletons M a r c o A l d i n u c c i U n i

  • Upload
    others

  • View
    5

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Components, GCM, and Behavioural skeletonsgroups.di.unipi.it/~aldinuc/talks/2007_Belfast_BeSke.pdf · Components, GCM, and Behavioural skeletons M a r c o A l d i n u c c i U n i

© 2006 GridCOMP Grids Programming with components. An advanced component platform for an effective invisible grid is a Specific Targeted Research Project supported by the IST programme of the European Commission (DG Information Society and Media, project n°034442)

Components, GCM, and Behavioural skeletons

M a r c o A l d i n u c c iU n i v e r s i t y o f P i s a , I t a l y

( C o r e G R I D R E P P r o g r a m m e )

M . D a n e l u t t o , S . C a m p a U n i v e r s i t y o f P i s a , I t a l y

P . K i l p a t r i c kQ U B , U K

N . T o n e l l o t t o , P . D a z z iI S T I - C N R , I t a l y

November 22th, 2007QUB, Belfast, UK

Page 2: Components, GCM, and Behavioural skeletonsgroups.di.unipi.it/~aldinuc/talks/2007_Belfast_BeSke.pdf · Components, GCM, and Behavioural skeletons M a r c o A l d i n u c c i U n i

Outline

PreludeUni. Pisa and the HPC lab.

Motivationwhy adaptive and autonomic management

why skeletons

Behavioural Skeletons parametric composite component with management

functional and non-functional description

families of behavioural skeletons

GCM implementation preliminary experiments and performances

2

Page 3: Components, GCM, and Behavioural skeletonsgroups.di.unipi.it/~aldinuc/talks/2007_Belfast_BeSke.pdf · Components, GCM, and Behavioural skeletons M a r c o A l d i n u c c i U n i

Computer Science Dept.First in Italy (estab. 1968)Research and teaching

Bachelor, master, and PhD programme~ 70 tenures + lot of fellows

Parallel architecture lab. (current)1 Full Prof. (M. Vanneschi)1 Associate Prof. (M. Danelutto)2 Researchers (M. Aldinucci, M. Coppola)1 PostDoc (S. Campa) 2 Phd students (M. Meneghin, C. Bertolli), 2 senior engineers (M. Torquati, R. Ravazzolo)4 junior engineers + several master students (in thesis)

Pisa Computer Science Department & Parallel arch. Lab

3

Page 4: Components, GCM, and Behavioural skeletonsgroups.di.unipi.it/~aldinuc/talks/2007_Belfast_BeSke.pdf · Components, GCM, and Behavioural skeletons M a r c o A l d i n u c c i U n i

Participation in Projects (1997-2007)

Ongoing

IN.SY.EME (MIUR-IT FIRB) Integrated System for Emergency - Jul. 2007, 36 mFRIMP (Cassa di Risparmio di Pisa) Software for Network Processors Feb. 2007, 24 mVirtuaLinux (Eurotech SpA) Roboust Virtual Clutering - Nov. 2006, 6 mBEinGRID (EU-IP, 6th FP) The Grid infrastructure for the Retail Management Experiment - Jun. 2006, 18 mXtreemOS (EU-IP, 6th FP): Building and Promoting a Linux-based Operating System to Support Virtual Organisations for Next Generation Grids - Jun. 2006, 48 mGridComp (EU-STREP, 6th FP) Grid Component Model - June 2006, 30 mSFIDA (MIUR FAR-ICT): Innovative platform supporting collaborative-business for Small-Medium Enterprises - Sept. 2007, 24 m CoreGrid (EU-Network of Excellence, 6th FP): Foundations, Software Infrastructures and Applications for large scale distributed, Grid and Peer-to-Peer Technologies - 2004, 48 m

Completed

Galieo Pisa-ParisVII/INRIA (Exchange Programme) 2004 - 2006MOPROSCO Pisa-ParisVII/INRIA (Exchange Programme) 2005 - 2007Grid.it (MIUR FIRB) 2003 - 2006GridCoord (EU-Special Action, 6th FP) 2004 - 2006Vigoni Pisa-Berlino/Muenster (Exchange Programme) 2003 - 2005SAIB (Ricerca Industriale MIUR) 2002 - 2004Law 449/97 year 2000 (strategic projects MIUR-CNR) 2002 - 2004Law 449/97 year 1999 (strategic projects MIUR-CNR) 2002 - 2004ASI-PQE2000 (MIUR) 2001- 2002Agenzia2000 (MIUR) 2000-2002Vigoni Pisa-Passau (Exchange Programme) 1998 - 2000MOSAICO (MIUR 40%) 1998 - 2000PQE2000 (CNR, ENA, INFN, Alenia Spazio) 1997 - 2000

4

Page 5: Components, GCM, and Behavioural skeletonsgroups.di.unipi.it/~aldinuc/talks/2007_Belfast_BeSke.pdf · Components, GCM, and Behavioural skeletons M a r c o A l d i n u c c i U n i

Scientific Productivity of the Lab(1997-2007)

Research & dissemination21 intl. journals (8 A-class), 35 intl. conferences (20 A-class), 26 intl. workshops & symposium, 12 parts of books, served as editors for several journal and books, 2 large conferences organised (400+ attendees), several invited talks

Software (open source & copyrighted)2 full programming environments for parallel languages

with language compiler: SkiE, ASSIST

several libraries for parallel programmingon top of Java, C, C++, Fortran, MPI, ACE, sockets, shmem, ...

servers and applicationsdistributed shared memory & storage, web server farm, // datamining, ...

cluster virtualization, cluster robustness, storage virtualizationVirtuaLinux

5

Page 6: Components, GCM, and Behavioural skeletonsgroups.di.unipi.it/~aldinuc/talks/2007_Belfast_BeSke.pdf · Components, GCM, and Behavioural skeletons M a r c o A l d i n u c c i U n i

CGM model key points

Hierarchic modelExpressiveness

Structured composition

Interactions among componentsCollective/group

Configurable/programmable

Not only RPC, but also stream/event

NF aspects and QoS controlAutonomic computing paradigm

6

Page 7: Components, GCM, and Behavioural skeletonsgroups.di.unipi.it/~aldinuc/talks/2007_Belfast_BeSke.pdf · Components, GCM, and Behavioural skeletons M a r c o A l d i n u c c i U n i

Why Autonomic Computing

// programming & the gridconcurrency exploitation, concurrent activities set up, mapping/scheduling, communication/synchronisation handling and data allocation, ...

manage resources heterogeneity and unreliability, networks latency and bandwidth unsteadiness, resources topology and availability changes, firewalls, private networks, reservation and jobs schedulers, ...

7

... and a non trivial QoS for applicationsnot easy leveraging only on middleware

our approach:high-level methodologies + tools

Page 8: Components, GCM, and Behavioural skeletonsgroups.di.unipi.it/~aldinuc/talks/2007_Belfast_BeSke.pdf · Components, GCM, and Behavioural skeletons M a r c o A l d i n u c c i U n i

Autonomic Computing paradigm

8

Monitor Plan

Execute

Analysebrokencontract

nextconfiguration

QoS data

monitor: collect execution stats: machine load, service time, input/output queues lengths, ...analyse: instantiate performance models with monitored data, detect broken contract, in and in the case try to detect the cause of the problemplan: select a (predefined or user defined) strategy to re-convey the contract to validity. The strategy is actually a “program” using execute APIexecute: leverage on mechanism to apply the plan

C1

C2

C3

C4

C5

C6

Managedcomponents

Manager

Page 9: Components, GCM, and Behavioural skeletonsgroups.di.unipi.it/~aldinuc/talks/2007_Belfast_BeSke.pdf · Components, GCM, and Behavioural skeletons M a r c o A l d i n u c c i U n i

Why skeletons 1/2

Management is difficultApplication change along time (ADL not enough)

How “describe” functional, non-functional features and their inter-relations?

The low-level programming of component and its management is simply too complex

Component reuse is already a problemSpecialising component yet more with management strategy would just worsen the problem

Especially if the component should be reverse engineered to be used (its behaviour may change along the run)

9

Page 10: Components, GCM, and Behavioural skeletonsgroups.di.unipi.it/~aldinuc/talks/2007_Belfast_BeSke.pdf · Components, GCM, and Behavioural skeletons M a r c o A l d i n u c c i U n i

Why skeletons 2/2Skeletons represent patterns of parallel computations (expressed in GCM as graphs of components)

Exploit the inherent skeleton semanticsthus, restrict the general case of skeleton assembly

graph of any component ➠ parametric networks of components exhibiting a given property

enough general to enable reuse

enough restricted to predetermine management strategies

Can be enforced with additional requirementsE.g.: Any adaptation does not change the functional semantics

10

Page 11: Components, GCM, and Behavioural skeletonsgroups.di.unipi.it/~aldinuc/talks/2007_Belfast_BeSke.pdf · Components, GCM, and Behavioural skeletons M a r c o A l d i n u c c i U n i

Behavioural Skeletons idea

Represent an evolution of the algorithmic skeleton concept for component management

abstract parametric paradigms of component assembly

specialized to solve one or more management goalsself-configuration/optimization/healing/protection.

Are higher-order components

Are not exclusivecan be composed with non-skeletal assemblies via standard components connectors

overcome a classic limitation of skeletal systems

11

Page 12: Components, GCM, and Behavioural skeletonsgroups.di.unipi.it/~aldinuc/talks/2007_Belfast_BeSke.pdf · Components, GCM, and Behavioural skeletons M a r c o A l d i n u c c i U n i

Behavioural Skeletons proprieties

Expose a description of its functional behaviour

Establish a parametric orchestration schema of inner components

May carry constraints that inner components are required to comply with

May carry a number of pre-defined plans aiming to cope with a given self-management goal

Carry an implementation (they are factories)

12

Page 13: Components, GCM, and Behavioural skeletonsgroups.di.unipi.it/~aldinuc/talks/2007_Belfast_BeSke.pdf · Components, GCM, and Behavioural skeletons M a r c o A l d i n u c c i U n i

Be-Skeletons families

Functional ReplicationFarm/parameter sweep (self-optimization)

Simple Data-Parallel (self-configuring map-reduce)

Active/Passive Replication (self-healing)

ProxyPipeline (coupled self-protecting proxies)

WrappersFacade (self-protection)

Many others can be borrowed from Design Patterns

13

Page 14: Components, GCM, and Behavioural skeletonsgroups.di.unipi.it/~aldinuc/talks/2007_Belfast_BeSke.pdf · Components, GCM, and Behavioural skeletons M a r c o A l d i n u c c i U n i

Functional replication

FarmS = unicast, C = from_any, W = stateless inner component

Data ParallelS = scatter, C = gather, W = stateless inner component

Fault-tolerant Active ReplicationS = broadcast, C = get_one_in_a_set, W= stateless inner ...

...

14

skeletonbehaviour(e.g. Orc)

S

W

...

W

WC

AC

Functionalserver port

Functionalclient port

AM

stream stream

skeletonbehaviour(e.g. Orc)

S

W

...

W

W

AC

Functionalserver port

AM

RPC

Page 15: Components, GCM, and Behavioural skeletonsgroups.di.unipi.it/~aldinuc/talks/2007_Belfast_BeSke.pdf · Components, GCM, and Behavioural skeletons M a r c o A l d i n u c c i U n i

Functional replication

Meant to parametrically expose all allowed adaptation

Any AM policy that does not change this semantics is correctAs an example changing i in this schema is correct Functional semantics is invariant from i, non-functional one is not (and changing i means changing the number of Ws for self-* purposes

15

skeletonbehaviour(e.g. Orc)

S

W

...

W

WC

AC

Functionalserver port

Functionalclient port

AM

Wi(ini, outi) !ini.get > tk > process(tk) > r > (outi.put(r) | Wi(ini, outi))

Functional behaviourdescription

(orchestration)

system(data, S,G, W, in, out, N) !S(data, in) | (| i : 1 ! i ! N : Wi(ini, outi)) | C(out)

system(data, S,G, W, in, out, N) !S(data, in) | (| i : 1 ! i ! N : Wi(ini, outi)) | C(out)

Page 16: Components, GCM, and Behavioural skeletonsgroups.di.unipi.it/~aldinuc/talks/2007_Belfast_BeSke.pdf · Components, GCM, and Behavioural skeletons M a r c o A l d i n u c c i U n i

ABC

GCM implementation

16

W

W

W

W

W

W

1. Choose a schema (.e.g. functional replication)ABC API is chosenaccordingly

2. Choose an inner component(compliant to Be-Ske constraints)3. Choose behavior of ports

(e.g. unicast/from_any, scatter/gather)

W

W

B/LC

S CS C

4. Wire it in your application.Run it, then trigger adaptations

AM

ABC = Autonomic Behaviour Controller (implements mechanisms)AM = Autonomic Manager (implements policies)

B/LC = Binding + Lifecycle Controller

5. Possibly, automatize the process with a Manager

Page 17: Components, GCM, and Behavioural skeletonsgroups.di.unipi.it/~aldinuc/talks/2007_Belfast_BeSke.pdf · Components, GCM, and Behavioural skeletons M a r c o A l d i n u c c i U n i

Farm example (Mandelbroot)17

screenoutput

mandelbroot

mandelbroot

mandelbroot

ABC

linesgen S C

mandelbroot

mandelbroot

mandelbroot

farm

unicast from_any

get_service_time

change // degree

raise "contract violation"

new contract (e.g. Ts<k)

Page 18: Components, GCM, and Behavioural skeletonsgroups.di.unipi.it/~aldinuc/talks/2007_Belfast_BeSke.pdf · Components, GCM, and Behavioural skeletons M a r c o A l d i n u c c i U n i

Grid programming with components: an advanced COMPonent platform for an effective invisible grid

Page 19: Components, GCM, and Behavioural skeletonsgroups.di.unipi.it/~aldinuc/talks/2007_Belfast_BeSke.pdf · Components, GCM, and Behavioural skeletons M a r c o A l d i n u c c i U n i

Not just farm (i.e. param sweep)

Many other skeletons already developed for GCMsome mentioned before

Easy extendible to stateful variantsimposing inner component expose NF ports for state access

Policies not discussed hereexpressed with a when-event-if-cond-then-action list of rules

some exist, work ongoing ...

19

Page 20: Components, GCM, and Behavioural skeletonsgroups.di.unipi.it/~aldinuc/talks/2007_Belfast_BeSke.pdf · Components, GCM, and Behavioural skeletons M a r c o A l d i n u c c i U n i

Typical Log of a Run (Explained)

20

1

1.5

2

2.5

3

3.5

4

Thro

ughput (t

asks/s

)

Avg. farm throughputQoS contract

0 2 4 6 8

10 12

110100908070605040

N. of P

Es

Time (minutes)

N. of workersN. of PEs with artificial load

past future

Page 21: Components, GCM, and Behavioural skeletonsgroups.di.unipi.it/~aldinuc/talks/2007_Belfast_BeSke.pdf · Components, GCM, and Behavioural skeletons M a r c o A l d i n u c c i U n i

new workers are mappedon empty nodes

new workers are mapped on nodes alreadyrunning other instances of the same component

0

1,500

3,000

4,500

6,000

5 10 15 20 25 30 35 40 45 50 55 60 65 70 75 80 85 90

Overheads

21

Restart New Stop

Ove

rhea

d (m

s)

N. of workers

Page 22: Components, GCM, and Behavioural skeletonsgroups.di.unipi.it/~aldinuc/talks/2007_Belfast_BeSke.pdf · Components, GCM, and Behavioural skeletons M a r c o A l d i n u c c i U n i

Proactive/Java Appears quite heavyweight

w.r.t. other approaches

22

19

!"# $"#

%&#

#'#

!"!#!$%&'("!)*+$#!("&+*",&-.&/0,1

!"# $"#

#'#

%&#

!"# $"#

%&#

#'#

%&#

2+('3,,

("&/04

!"$%&'("!)*+$#!("&+*",&-.56&/0,1

$"$%7832%$" 9:9

;:9&-<!==%3>$+31!"#$%&'()*#'(&"$'

"33=&6&/0 /04

+,-.'/0-12$3*#'(&"$'

343'*#3

2$+<(=&+3$'?3,&$+3'("@A,$@3&2(!"#

+3'("@B&%$#3"'7

+3'("@B&#!<3

<("!#(+

#!<3

C$*"'?-D/9E/041 $'.

4("5*6%2",%(*#'(&"$'

D/,&$+3+3=!,#+!F*#3=

G?3&"3>&2+('3,,'("#$'#,&#?3&9:9

Fig. 2. Reconfiguration dynamics and metrics.

TCP/IP or Globus provided communication channels. The two applications arecomposed by one parmod and two sequential modules. The first is a data-parallelapplication receiving a stream of integer arrays and computing a forall of sim-ple function for each stream item; the matrix is stored in the parmod sharedstate. The second is a farm application computing a simple function on di!erentstream items. Since Rt also depends on sequential function cost, in both caseswe choose sequential functions with a close to zero computational cost in orderto evaluate mechanism on the finest possible grain.

The reconfiguration overhead (Ro) measured during our experiments, with-out any reconfiguration change actually performed, is practically negligible, re-maining under the limit of 0,004%, the measurement of the other two metricsare reported in Table 1.

Notice that in the case of a data-parallel parmod, Rl grows linearly with(x + y) for the reconfiguration x ! y for both kinds of reconf-safe points, anddepends on shared state size and mapping. Farm parmod cannot be reconfiguredon-barrier since it has no barrier, and achieves a negligible Rl (below 10!3 ms).This is due to the fact that no processes are stopped in the transition from oneconfiguration to the next. Rt, which includes both the protocol cost and time toreach next reconf-safe point, grows linearly with (x + y) for the former cost andheavily depends on user-function cost for the latter.

parmod kind Data-parallel (with shared state) Farm (without shared state)

reconf. kind add PEs remove PEs add PEs remove PEs

# of PEs involved 1"2 2"4 4"8 2"1 4"2 8"4 1"2 2"4 4"8 2"1 4"2 8"4

Rl on-barrier 1.2 1.6 2.3 0.8 1.4 3.7 – – – – – –Rl on-stream-item 4.7 12.0 33.9 3.9 6.5 19.1 # 0 # 0 # 0 # 0 # 0 # 0

Rt 24.4 30.5 36.6 21.2 35.3 43.5 24.0 32.7 48.6 17.1 21.6 31.9

Table 1. Evaluation of reconfiguration overheads (ms). On this cluster, 50 ms areneeded to ping 200KB between two PEs, or to compute a 1M integer additions.

ASSIST/C++ overheads (ms)

M. Aldinucci, A. Petrocelli, E. Pistoletti, M. Torquati, M. Vanneschi, L. Veraldi, and C. Zoccolo. Dynamic reconfiguration of grid-aware applications in ASSIST.

Euro-Par 2005, vol. 3648 of LNCS, Lisboa, Portugal. Springer Verlag, August 2005.

Page 23: Components, GCM, and Behavioural skeletonsgroups.di.unipi.it/~aldinuc/talks/2007_Belfast_BeSke.pdf · Components, GCM, and Behavioural skeletons M a r c o A l d i n u c c i U n i

Proactive Communication Time (Int)

23

Communication time

0

10

20

30

40

50

60

0 2000 4000 6000 8000 10000

int[N]

tim

e (

ms)

int[ ]

Communication Bandwidth (Theoretical 12800 KB/s)

0

100

200

300

400

500

600

700

0 2000 4000 6000 8000 10000

int[N]

Ban

dw

idth

(K

B/

s)

int[ ]

Page 24: Components, GCM, and Behavioural skeletonsgroups.di.unipi.it/~aldinuc/talks/2007_Belfast_BeSke.pdf · Components, GCM, and Behavioural skeletons M a r c o A l d i n u c c i U n i

Variations and Flavours

skeletonbehaviour(e.g. Orc)

S

W

...

W

WC

AC

Functionalserver port

Functionalclient port

AM

streamingproducer

streamingconsumer

skeletonbehaviour(e.g. Orc)

S

W

...

W

W

AC

Functionalserver port

AM

RPCproducer-consumer

RPCproducer-

consumers

or in general ...

skeletonbehaviour(e.g. Orc)

Sk

W

...

W

W

Cj

AC

AM

S1

...

C1

...

RPC orstreaming

data dependencies

RPC orstreaming

data dependencies

and even more ...

Page 25: Components, GCM, and Behavioural skeletonsgroups.di.unipi.it/~aldinuc/talks/2007_Belfast_BeSke.pdf · Components, GCM, and Behavioural skeletons M a r c o A l d i n u c c i U n i

Abstracting Out Variants n client and y server ports

synchronous and/or asynchronous

stream and/or RPC

programmable, possibly nondeterministic, relations among portswait for an item on port_A and/or one item on port_B

in general, any CSP expression

But ... be careful, this is the ASSIST modelall features described above + distributed membrane + autonomicity, QoS contracts, limited hierarchy depth (i.e. 2)

sophisticated C++ implementation, language not easy to modify

GCM should be enough expressive and not too complexwe consider ASSIST as the complexity asymptote

25

Page 26: Components, GCM, and Behavioural skeletonsgroups.di.unipi.it/~aldinuc/talks/2007_Belfast_BeSke.pdf · Components, GCM, and Behavioural skeletons M a r c o A l d i n u c c i U n i

Conclusions

Behavioural Skeletons templates with built-in management for the App designer

methodology for the skeleton designermanagement can be changed/refined

just prove your own management is correct against skeleton functional description

can be freely mixed with standard GCM componentsbecause once instanced, they are standard

Already implemented on GCMnot happy about GCM runtime performances (can be improved)

We also implemented in ASSIST with different performances

26