27
Architecture Extraction with Kieker and SLAstic André van Hoorn University of Stuttgart, Germany Contact: [email protected] (including contributions by many colleagues) August 22, 2014 @ SPEC RG DevOps Performance WG A. van Hoorn, U Stuttgart, Germany Architecture Extraction with Kieker and SLAstic August 22, 2014 @ DevOps Performance WG 1 / 22

Architecture Extraction with Kieker and SLAstic...Aug 22, 2014  · A. van Hoorn, U Stuttgart, Germany Architecture Extraction with Kieker and SLAstic August 22, 2014 @ DevOps Performance

  • Upload
    others

  • View
    3

  • Download
    0

Embed Size (px)

Citation preview

Architecture Extraction with Kieker and SLAstic

André van HoornUniversity of Stuttgart, Germany

Contact: [email protected]

(including contributions by many colleagues)

August 22, 2014 @ SPEC RG DevOps Performance WG

A. van Hoorn, U Stuttgart, Germany Architecture Extraction with Kieker and SLAstic August 22, 2014 @ DevOps Performance WG 1 / 22

Kieker: Dynamic Analysis WorkflowArchitecture Extraction with Kieker

Monitoring Probe

Software System with Monitoring Instrumentation

MeasurementMonitoring log/stream

Monitoring Records

Analysis

Analysis Configuration (via API and WebGUI)

Pipes and Filters

Invo

catio

ns/m

inut

e [x

100

0]

Calendar time (hh:mm)

Workload Anomaly Detection

0.0

0.5

1.0

1.5

2.0

SRV0::@3:..Bookstore

SRV0::@1:..Catalog

SRV0::@2:..CRM

SRV1::@1:..Catalog

searchBook()

getBook(..)

getOffers()

getBook(..)

<<execution container>>SRV0

<<deployment component>>@3:..Bookstore

<<deployment component>>@2:..CRM

<<deployment component>>@1:..Catalog

<<execution container>>SRV1

<<deployment component>>@1:..Catalog

searchBook() getOffers()1635

getBook(..)

543

getBook(..)

1092

573

1062

$1635

Online and Offline Visualization

A. van Hoorn, U Stuttgart, Germany Architecture Extraction with Kieker and SLAstic August 22, 2014 @ DevOps Performance WG 2 / 22

Core Kieker Framework ComponentsArchitecture Extraction with Kieker

Kieker.Monitoring

MonitoringProbe

Java probes/samplers:

Mo

nito

ring

Pro

bes/S

amp

lers

Control-flow

tracing SpringAspectJ

Servlet CXF/SOAP

Manual instrumentation

<your interception technology>

Resource

monitoring

<your technology>

CPU utilization

Memory usage

Sigar

Servlet

<your monitoring probe>

+ basic adapters for C#/.NET Visual Basic 6/COM COBOL

Monitoring Record

Mo

nito

ring

Reco

rds Current time

Resource utilization

CPU utilization

Operation execution

Control-flow events

<your monitoring record type>

Memory/swap usage

A. van Hoorn, U Stuttgart, Germany Architecture Extraction with Kieker and SLAstic August 22, 2014 @ DevOps Performance WG 3 / 22

Core Kieker Framework ComponentsArchitecture Extraction with Kieker

Kieker.Monitoring

MonitoringProbe

JMX Interface

Periodic Sampling

Logging

Time Source

Monitoring Controller

Monitoring Writer

Monitoring Log/Stream

<your monitoring reader/writer>

File system

Database (SQL)

Mo

nito

ring

Read

ers/Writers

Java Messaging Service (JMS)

Java Management Ext. (JMX)

Named pipe

Monitoring Record

Kieker.Analysis

MonitoringReader

A. van Hoorn, U Stuttgart, Germany Architecture Extraction with Kieker and SLAstic August 22, 2014 @ DevOps Performance WG 3 / 22

Core Kieker Framework ComponentsArchitecture Extraction with Kieker

Kieker.Monitoring

MonitoringProbe

JMX Interface

Periodic Sampling

Logging

Time Source

Monitoring Controller

Monitoring Writer

Monitoring Log/Stream

Monitoring Record

Kieker.Analysis

MonitoringReader

Analysis Controller

<your visualization>

Sequence diagrams

Dependency graphs

Call graphs

Visualization

Architecture reconstr.

Pipe-and-filter fram

ework

An

alysis/Visu

alization

Plu

gin

s

<your trace analysis>

Trace analysis

<your reconstruction plugin>

<your analysis plugin/tool>

Analysis /Visualization

Plugin

Pipe & Filter Configuration

A. van Hoorn, U Stuttgart, Germany Architecture Extraction with Kieker and SLAstic August 22, 2014 @ DevOps Performance WG 3 / 22

Industrial Enterprise Case Study System[van Hoorn et al. 2009, van Hoorn 2014]Architecture Extraction with Kieker

Architecture Discovery: Model Extraction + Visualization

<<execution container>>pikdb1

<<execution container>>pikdb0

<<execution container>>css0

<<execution container>>css1

<<deployment component>>@5:..AccountService

<<deployment component>>@3:..KiekerTpmonResponseOutProbe

47406<<deployment component>>

@8:..SupportService

3718 <<deployment component>>@4:..EmailService

6530<<deployment component>>

@7:..WebhostingService

1969

<<deployment component>>@6:..DomainService1522

<<deployment component>>@9:..DnsService

167

<<deployment component>>@3:..KiekerTpmonResponseOutProbe

<<deployment component>>@4:..EmailService

6386<<deployment component>>

@5:..AccountService

47408

<<deployment component>>@6:..DomainService

1556

<<deployment component>>@7:..WebhostingService

1947

<<deployment component>>@8:..SupportService

3772

<<deployment component>>@9:..DnsService

176

<<deployment component>>@1:..KiekerRequestRegistrationAndLoggingFilter

<<deployment component>>@2:..KiekerTpmonResponseInProbe

50199

77410

77540

<<deployment component>>@1:..KiekerRequestRegistrationAndLoggingFilter

<<deployment component>>@2:..KiekerTpmonResponseInProbe

49751

75892

75894

$

2001

1972

53100

104751

53121

102035

A. van Hoorn, U Stuttgart, Germany Architecture Extraction with Kieker and SLAstic August 22, 2014 @ DevOps Performance WG 4 / 22

Trace TerminologyArchitecture Extraction with Kieker

:CRM

getBook(...)

getOffers(...)

getBook(...)

searchBook(...)

:Bookstore :Catalog

Legend:

= trace= call message

= return message= execution with eoi i and ess j

0;0

i;j

1;1

2;1

3;2

Execution order index (eoi) i : i-th started execution in a traceExecution stack size (ess) j : execution started at stack depth j

A. van Hoorn, U Stuttgart, Germany Architecture Extraction with Kieker and SLAstic August 22, 2014 @ DevOps Performance WG 5 / 22

Abstract and Example Monitoring RecordsArchitecture Extraction with Kieker

• Extensible Monitoring Record (Meta-)ModelMonitoring Record

- loggingTimestamp : long

- type (..) : ...- value (..) : ...

OperationExecutionRecord

- operationSignature: String

- sessionId : String- eoi, ess : int- tin, tout : long

- hostname : String

- traceId : long

CPUUtilizationRecord

- hostname: String

- user, system, wait, nice,

- timestamp : long

- cpuID : String

irq, totalUtilization, idle: double

MemSwapUsageRecord

- hostname: String

- swapTotal, swapUsed, swapFree : long

- timestamp : long

- memTotal, memUsed, memFree : long

ResourceUtilizationRecord

- hostname: String

- utilization : double

- timestamp : long

- resourceName : String

- names () : String[]

• Example Monitoring Record instances

operationSignature = "void bookstore.Bookstore. searchBook()"

:OperationExecutionRecord

hostname = "SRV0"

traceId = 887sessionID = "ZU1KG2GF"eoi = 0ess = 0tin = ..3075tout = ..3090

:CPUUtilizationRecord

timestamp = 13771..hostname = "SRV0"cpuID = "2"user = 0.0819

idle = 0.7748

...

A. van Hoorn, U Stuttgart, Germany Architecture Extraction with Kieker and SLAstic August 22, 2014 @ DevOps Performance WG 6 / 22

Full Instrumentation with KiekerArchitecture Extraction with Kieker

Listing 1: META-INF/aop.xml

<!DOCTYPE aspectj PUBLIC "-//AspectJ//DTD//EN" "http://www.aspectj.org←↩/dtd/aspectj_1_5_0.dtd">

<aspectj><weaver options="">

<include within="*"/></weaver><aspects><aspect name="kieker.monitoring.probe.aspectj.operationExecution.←↩

OperationExecutionAspectFull"/></aspects>

</aspectj>

Start the monitored application:$ java -javaagent:lib/kieker-1.9_aspectj.jar BookstoreStarter

A. van Hoorn, U Stuttgart, Germany Architecture Extraction with Kieker and SLAstic August 22, 2014 @ DevOps Performance WG 7 / 22

Example Pipe-and-Filter ConfigurationArchitecture Extraction with Kieker

Kieker.Analysis example pipes-and-filters configuration Performance anomaly detection and visualization Architecture and trace reconstruction/visualization

outputPort<<Reader>>: FS reader

<<Repository>>: System model repository

<<Filter>>: Trace reconstruction filter

traceEvents systemModel

messageTraces

executionTraces

<<Filter>>: Sequence diagram visualization

<<Filter>>: Dependency graph visualization

messageTraces

messageTraces

systemModel

systemModel

SRV0::

@3:..Bookstore

SRV0::

@1:..Catalog

SRV0::

@2:..CRM

SRV1::

@1:..Catalog

searchBook()

getBook(..)

getOffers()

getBook(..)

<<execution container>>SRV0<<deployment component>>@3:..Bookstore <<deployment component>>@2:..CRM

<<deployment component>>@1:..Catalog

<<execution container>>SRV1<<deployment component>>@1:..Catalog

searchBook()

getOffers()

1635

getBook(..)

543

getBook(..)

1092

573

1062

$ 1635

A. van Hoorn, U Stuttgart, Germany Architecture Extraction with Kieker and SLAstic August 22, 2014 @ DevOps Performance WG 8 / 22

Kieker’s System Meta-ModelArchitecture Extraction with Kieker

A. van Hoorn, U Stuttgart, Germany Architecture Extraction with Kieker and SLAstic August 22, 2014 @ DevOps Performance WG 9 / 22

Kieker’s Trace Meta-ModelArchitecture Extraction with Kieker

A. van Hoorn, U Stuttgart, Germany Architecture Extraction with Kieker and SLAstic August 22, 2014 @ DevOps Performance WG 10 / 22

Sequence DiagramsKieker.TraceAnalysis ToolArchitecture Extraction with Kieker

1 Sequence diagrams2 Dynamic call trees3 Hierarchical calling dependency graphs4 System model

@3:..Bookstore @1:..Catalog @2:..CRM

searchBook()

getBook(..)

getOffers()

getBook(..)

(a) Assembly-level view

SRV0::@3:..Bookstore

SRV1::@1:..Catalog

SRV0::@2:..CRM

SRV0::@1:..Catalog

searchBook()

getBook(..)

getOffers()

getBook(..)

(b) Deployment-level view

A. van Hoorn, U Stuttgart, Germany Architecture Extraction with Kieker and SLAstic August 22, 2014 @ DevOps Performance WG 11 / 22

Dynamic Call TreesArchitecture Extraction with Kieker

1 Sequence diagrams2 Dynamic call trees3 Hierarchical calling dependency graphs4 System model

$

SRV0::@3:..Bookstore.searchBook()

1.

SRV1::@1:..Catalog.getBook(..)

2.

SRV0::@2:..CRM.getOffers()

3.

SRV0::@1:..Catalog.getBook(..)

4.

(a) Dynamic call tree (single trace)

$

SRV0::@3:bookstoreTracingBookstore

.searchBook()

1635

SRV1::@1:bookstoreTracingCatalog

.getBook(..)

1092

SRV0::@2:bookstoreTracingCRM

.getOffers()

1635

SRV0::@1:bookstoreTracingCatalog

.getBook(..)

543

SRV1::@1:bookstoreTracingCatalog

.getBook(..)

1062

SRV0::@1:bookstoreTracingCatalog

.getBook(..)

573

(b) Aggregated deployment-level call tree

A. van Hoorn, U Stuttgart, Germany Architecture Extraction with Kieker and SLAstic August 22, 2014 @ DevOps Performance WG 12 / 22

Hierarchical Calling Dependency GraphsArchitecture Extraction with Kieker

1 Sequence diagrams2 Dynamic call trees3 Hierarchical calling dependency graphs4 System model

$<<assembly component>>

@3:..Bookstore1635 <<assembly component>>

@1:..Catalog<<assembly component>>

@2:..CRM

1635

1635

1635

(a) Assembly-level component dependency graph

<<execution container>>SRV0

<<deployment component>>@3:..Bookstore

<<deployment component>>@2:..CRM

<<deployment component>>@1:..Catalog

<<execution container>>SRV1

<<deployment component>>@1:..Catalog

searchBook() getOffers()1635

getBook(..)

543

getBook(..)

1092

573

1062

$1635

(b) Deployment-level operation dependency graph

A. van Hoorn, U Stuttgart, Germany Architecture Extraction with Kieker and SLAstic August 22, 2014 @ DevOps Performance WG 13 / 22

SLAstic Framework OverviewArchitecture Extraction with SLAstic . SLAstic Overview

instrumented, runtime reconfigurable s/w system

...

architecture

technology

SLAstic.MONITORING

SLAstic.CONTROL

Analysis

online adaptation engine

SLAstic model

SLAstic.RECONFIGURATION

rawmonitoringrecords

monitoringevents

reconfigurationplans

reconfigurationactions

instrumentation

initialization

extraction

SLAstic model

A. van Hoorn, U Stuttgart, Germany Architecture Extraction with Kieker and SLAstic August 22, 2014 @ DevOps Performance WG 14 / 22

SLAstic Meta-ModelArchitecture Extraction with SLAstic . SLAstic Overview

System Partition (also used as runtime model)

1 Type repository (e.g., component types, interfaces, connector types, execution container types)

2 Component assembly (e.g., assembly of components via connectors)3 Execution environment (e.g., execution containers and interconnection via links)4 Component deployment (mapping: assembly components → containers)

<<Provides>>

<<ComponentType>>

BookstoreT

<<Interface>>

IBookstore

<<Provides>>

Book searchBook()

<<ComponentType>>

CatalogT

<<Interface>>

ICatalog

Book getBook()

<<Requires>>

<<ConnectorType>>

ConnectorTICatalog<<ConnectorType>>

ConnectorTIBook

<<ExecutionContainerType>>

WebSrvT

<<ExecutionContainerType>>

AppSrvT

Example type repository

A. van Hoorn, U Stuttgart, Germany Architecture Extraction with Kieker and SLAstic August 22, 2014 @ DevOps Performance WG 15 / 22

SLAstic Meta-ModelArchitecture Extraction with SLAstic . SLAstic Overview

System Partition (also used as runtime model)

1 Type repository (e.g., component types, interfaces, connector types, execution container types)2 Component assembly (e.g., assembly of components via connectors)

3 Execution environment (e.g., execution containers and interconnection via links)4 Component deployment (mapping: assembly components → containers)

<<ComponentType>>

BookstoreT

<<AssemblyComponent>>

bookstore

<<AssemblyComponent>>

catalog

<<ComponentType>>

CatalogT

<<AssemblyConnector>>

<<ConnectorType>>

ConnectorTICatalog

Example component assembly

A. van Hoorn, U Stuttgart, Germany Architecture Extraction with Kieker and SLAstic August 22, 2014 @ DevOps Performance WG 15 / 22

SLAstic Meta-ModelArchitecture Extraction with SLAstic . SLAstic Overview

System Partition (also used as runtime model)

1 Type repository (e.g., component types, interfaces, connector types, execution container types)2 Component assembly (e.g., assembly of components via connectors)3 Execution environment (e.g., execution containers and interconnection via links)

4 Component deployment (mapping: assembly components → containers)

<<ExecutionContainer>>

app1:AppSrvT

<<ExecutionContainer>>

app2:AppSrvT

<<ExecutionContainer>>

web1:WebSrvT

<<ExecutionContainer>>

web2:WebSrvT

Example execution environment

A. van Hoorn, U Stuttgart, Germany Architecture Extraction with Kieker and SLAstic August 22, 2014 @ DevOps Performance WG 15 / 22

SLAstic Meta-ModelArchitecture Extraction with SLAstic . SLAstic Overview

System Partition (also used as runtime model)

1 Type repository (e.g., component types, interfaces, connector types, execution container types)2 Component assembly (e.g., assembly of components via connectors)3 Execution environment (e.g., execution containers and interconnection via links)4 Component deployment (mapping: assembly components → containers)

<<ExecutionContainer>>

app1:AppSrvT

<<AssemblyComponent>>

catalog

<<ComponentType>>

CatalogT

<<ExecutionContainer>>

app2:AppSrvT

<<AssemblyComponent>>

catalog

<<ComponentType>>

CatalogT

<<ExecutionContainer>>

web1:WebSrvT

<<AssemblyComponent>>

bookstore

<<ComponentType>>

BookstoreT

<<ExecutionContainer>>

web2:WebSrvT

<<AssemblyComponent>>

bookstore

<<ComponentType>>

BookstoreT

DeploymentComponent

Example component deploymentA. van Hoorn, U Stuttgart, Germany Architecture Extraction with Kieker and SLAstic August 22, 2014 @ DevOps Performance WG 15 / 22

On-Demand Architecture ExtractionArchitecture Extraction with SLAstic . Extraction of SLAstic Models

:CPUUtilizationRecord

timestamp = 13771..hostname = "SRV0"cpuID = "2"user = 0.0819

idle = 0.7748

...

:Resource

:CPUUtilization

timestamp = 13771..user = 0.0819

idle = 0.7748

...

:ExecutionContainer

name = "SRV0" :ExecutionContainerType

name = "SRV0_T"

:ResourceSpecification

name = "cpu2"

:CPUType

name = "CPU_RES_TYPE"clockRateMhz = -1vendor = "<NO-VENDOR>"

resource

resourceSpecification

executionContainer

resource

executionContainerType

resources

resourceType

A. van Hoorn, U Stuttgart, Germany Architecture Extraction with Kieker and SLAstic August 22, 2014 @ DevOps Performance WG 16 / 22

On-Demand Architecture Extraction (cont’d)

Architecture Extraction with SLAstic . Extraction of SLAstic Models

:Signature

name = "searchBook"returnType = "void"paramTypes = <>

operationSignature = "void bookstore.Bookstore. searchBook()"

:OperationExecutionRecord

hostname = "SRV0"

traceId = 887sessionID = "ZU1KG2GF"eoi = 0ess = 0tin = ..3075tout = ..3090

:AssemblyComponent

name = "Bookstore"packageName = "bookstore"

:ComponentType

name = "Bookstore_T"packageName = "bookstore"

:Signature

name = "searchBook"returnType = "void"paramTypes = <>

:DeploymentComponent OperationExecution

traceId = 887sessionID = "ZU1KG2GF"eoi = 0ess = 0tin = ..3075tout = ..3090

:DeploymentComponent :ExecutionContainer

name = "SRV0"

:ExecutionContainerType

name = "SRV0_T"

:Operation

deploymentComponent

executionContainer

assemblyComponent

signature

operation

operations

executionContainerType

componentType

:Interface

name = "IBookstore_T"packageName = "bookstore"

providedInterfacessignatures

• Different component (name) abstraction modes supported• Extraction of usage model not depicted in this talk

A. van Hoorn, U Stuttgart, Germany Architecture Extraction with Kieker and SLAstic August 22, 2014 @ DevOps Performance WG 17 / 22

M2M Transformation from SLAstic to PCMArchitecture Extraction with SLAstic . Extraction of SLAstic Models

slastic2pcm.atl

SLASTIC_SYSTEM

SLASTIC_USAGE

PCM_REPOSITORY

PCM_SYSTEM

PCM_RESOURCEENVIRONMENT

PCM_ALLOCATION

PCM_RESOURCETYPE

~>

Bash script

Eclipse launcher

Java API

.slastic

.slasticusagePCM_USAGE

.resourcetype

.repository

.allocation

.resourceenvironment

.usagemodel

.system

SLAstic instance PCM instanceSLAstic2PCM

• Assumption that PCM models completed in subsequent step• Decoration concept to connect SLAstic and PCM model

A. van Hoorn, U Stuttgart, Germany Architecture Extraction with Kieker and SLAstic August 22, 2014 @ DevOps Performance WG 18 / 22

Transformation Results (Selected Examples)

Architecture Extraction with SLAstic . Extraction of SLAstic Models

Required_ICatalog__T_Bookstore__T.getBook

IntPMF[(1;0.9999999999999999)]

Required_ICRM__T_Bookstore__T.getOffers

Allocation_Assembly_Catalog__T

Catalog__T <Assembly_Catalog__T>

Allocation_Assembly_Catalog__T

Catalog__T <Assembly_Catalog__T>

Allocation_Assembly_CRM__T

CRM__T <Assembly_CRM__T>

Allocation_Assembly_Bookstore__T

Bookstore__T <Assembly_Bookstore__T>

<<SystemCallAction>>

IBookstore__T.searchBook

<<Open Workload>>

Interarrival Time: 1

A. van Hoorn, U Stuttgart, Germany Architecture Extraction with Kieker and SLAstic August 22, 2014 @ DevOps Performance WG 19 / 22

Resources

• Kieker:• http://kieker-monitoring.net

Kieker is distributed as part of SPEC® RG'srepository of peer-reviewed tools for

quantitative system evaluation and analysishttp://research.spec.org/projects/tools.html

• SLAstic• van Hoorn [2014]• Download:http://kieker-monitoring.net/research/projects/slastic/

A. van Hoorn, U Stuttgart, Germany Architecture Extraction with Kieker and SLAstic August 22, 2014 @ DevOps Performance WG 20 / 22

Thanks to All Contributors

Various people contributed to Kieker in the past years.

Tillmann (Till) Bielefeld, Peer Brauer, Philipp Döhring,Jens Ehlers, Nils Ehmke, Florian Fittkau, Thilo Focke,

Sören Frey, Tom Frotscher, Henry Grow,Wilhelm (Willi) Hasselbring, André van Hoorn, Reiner Jung,

Benjamin Kiel, Dennis Kieselhorst, Holger Knoche, Arnd Lange,Marius Löwe, Marco Lübcke, Felix Magedanz, Nina Marwede,Robert von Massow, Jasminka Matevska, Oliver Preikszas,Sönke Reimer, Bettual Richter, Matthias Rohr, Nils Sommer,

Lena Stöver, Jan Waller, Robin Weiß, Björn Weißenfels,Matthias Westphal, Christian Wulf

—Alphabetic list of people who contributed in different form(source code, bug reports, promotion, etc) and intensity

A. van Hoorn, U Stuttgart, Germany Architecture Extraction with Kieker and SLAstic August 22, 2014 @ DevOps Performance WG 21 / 22

Literature

Kieker Project. Kieker 1.9 user guide. http://kieker-monitoring.net/documentation/, Apr. 2014a.

Kieker Project. Kieker web site. http://kieker-monitoring.net/, 2014b.

A. van Hoorn. Model-Driven Online Capacity Management for Component-Based Software Systems. Number 2014/<++NUMBER> in Kiel ComputerScience Series. Department of Computer Science, Kiel University, Kiel, Germany, 2014. Dissertation (under review), Faculty of Engineering, KielUniversity.

A. van Hoorn, M. Rohr, W. Hasselbring, J. Waller, J. Ehlers, S. Frey, and D. Kieselhorst. Continuous monitoring of software services: Design and applicationof the Kieker framework. Technical Report TR-0921, Department of Computer Science, University of Kiel, Germany, Nov. 2009.

A. van Hoorn, J. Waller, and W. Hasselbring. Kieker: A framework for application performance monitoring and dynamic software analysis. In Proceedings ofthe 3rd ACM/SPEC International Conference on Performance Engineering (ICPE ’12), pages 247–248. ACM, Apr. 2012. ISBN 978-1-4503-1202-8.doi: 10.1145/2188286.2188326.

For a comprehensive list of publications, talks, and theses about Kieker, visit:http://kieker-monitoring.net/research/

A. van Hoorn, U Stuttgart, Germany Architecture Extraction with Kieker and SLAstic August 22, 2014 @ DevOps Performance WG 22 / 22