SlideShare una empresa de Scribd logo
1 de 33
Software Architecture


Quality Attributes & Tactics (2)
Performance




 Vakgroep Informatietechnologie – IBCN
Quality Attributes Scenarios



                                          Artifact




Source        Stimulus               Environment           Response   Measure




   Vakgroep Informatietechnologie – Onderzoeksgroep IBCN                   p. 2
Quality Attribute Scenarios


A Quality Attribute Scenario describes:

   SOURCE:                    who or what
   STIMULUS:              does something
   ARTIFACT:     to the system or part of it
   ENVIRONMENT:   under certain conditions
   RESPONSE:       how the system reacts
   MEASURE:     how you can measure this


   Vakgroep Informatietechnologie – Onderzoeksgroep IBCN   p. 3
What is Performance ?

            Performance is about timing - not speed.

    Performance refers to responsiveness:
         either the time required to respond to a specific event
          or
         the number of events processed in a given time
          interval.
   Performance vs. Speed
         Faster processors or more bandwidth do not improve
          timeliness; they only minimize the average response
          time for some services.
         Example : real-time systems need predictable
          responsiveness.

    Vakgroep Informatietechnologie – Onderzoeksgroep IBCN           p. 4
Real-Time Systems
   Hard real-time systems:
        required to complete a critical task within a
         guaranteed amount of time
              Example : avionics



   Soft real-time systems:
        requires that critical processes receive priority
         over less fortunate ones
              Example: on-line banking




Vakgroep Informatietechnologie – Onderzoeksgroep IBCN        p. 5
Performance Myths ?
 Itis not possible to do anything about
  performance until you have something to
  measure.
 Performance models are expensive and
  difficult to construct.




Vakgroep Informatietechnologie – Onderzoeksgroep IBCN   p. 6
Performance Myths
 Itis not possible to do anything about
  performance until you have something to
  measure.
 Performance models are expensive and
  difficult to construct.
 Architecture determines performance
  properties.
 Simple models (back of the envelope) can
  identify performance problems.
         Annotated UML Sequence diagrams

Vakgroep Informatietechnologie – Onderzoeksgroep IBCN   p. 7
Modeling Performance - Events
 Performance                    requirements:
       Quantitative requirements defined in terms of
        events and the timing constraint to respond to
        each event.
       An event can be an interrupt, a message, a user
        interaction ...
 Behavior               Pattern:
       The number of event streams, the worst case and
        the steady state arrival rates for each stream.
       An event stream is a single source of events such
        as a hardware interrupt.
       Arrival rates can be periodic, stochastic, bursty or
        sporadic
Vakgroep Informatietechnologie – Onderzoeksgroep IBCN     p. 8
Performance Concerns (1/2)
 Latency             :
       How long does it take to respond to a specific
        event.
       Jitter: is the variation in response time.

 Throughput                   :
         How many events can be responded to over a
          given interval of time ?




Vakgroep Informatietechnologie – Onderzoeksgroep IBCN    p. 9
Performance Concerns (2/2)
 Capacity              :
       How much demand can be placed on the system
        while continuing to meet latency and throughput
        requirements ?
       It is the maximum achievable throughput without
        violating latency requirements.
 Modes            :
       What happens when system capacity is exceeded
        and not all events can be responded to in a timely
        manner ?
       2 common modes: reduced capacity and overload
               Reduced capacity : resource cease to function

Vakgroep Informatietechnologie – Onderzoeksgroep IBCN           p. 10
Performance concerns - overview




Ref: Quality Attributes : Technical Report CMU - CMU/SEI-95-TR-021 Chapter 3 Performance p. 7 – 14 (see Download section)



Vakgroep Informatietechnologie – Onderzoeksgroep IBCN                                                                  p. 11
Performance generic scenario (1/3)

    Source
        The stimuli arrive either from external (possibly multiple) or
        internal sources. In our example, the source of the stimulus
        is a collection of users, a message or an interrupt.

    Stimulus
The stimuli are the event arrivals
        Periodicevents;
        Sporadic events;
        Stochastic events
        Bursty events



    Artifact
The artifact is the system's services or a component

    Vakgroep Informatietechnologie – Onderzoeksgroep IBCN                p. 12
Performance generic scenario (2/3)

   Environment
     The system can be in various operational modes:
          Normal mode
          Overload mode
          Reduced Capacity mode


   Response
     The system must process the arriving events.
     This may cause a change in the system environment or the
     service level.




Vakgroep Informatietechnologie – Onderzoeksgroep IBCN           p. 13
Performance generic scenario (3/3)

   Response measure
     The response measures are the time it takes to process the
     arriving events:
         Latency or a deadline by which the event must be
          processed
         Jitter: the variation in processing time
         Throughput the number of events that can be
          processed within a particular time interval
         Capacity: the maximum achievable throughput without
          violating latency requirements.
         Miss rate, data loss: a characterization of the events
          that cannot be processed



Vakgroep Informatietechnologie – Onderzoeksgroep IBCN              p. 14
Performance QAS

                           Artifact




Source     Stimulus     Environment     Response    Measure
External   Periodic     Normal mode     Change in   Latency
Internal   Sporadic     Overload mode   system      Deadline
                        Reduced         mode        Throughput
events     Stochastic
                        Capacity mode   or          Capacity
           Bursty                       service     Jitter
           events                       level.
                                                    Miss rate


                                                           p. 15
Case: Digital Signage – Public Transport

                                    Performance QAS :

SOURCE              who or what                              A bus subsystem
STIMULUS            does something                           ... sends a msg with its speed &
                                                             location every 15 secs.
ARTIFACT            to the system or part of it              ... to the central system
ENVIRONMENT under certain conditions                         ...during normal operations
RESPONSE            how the system reacts                    The system produces an
                                                             estimated arrival time for all
                                                             relevant displays and sends it out
MEASURE             how you can measure this                 ... within 30 seconds after
                                                             receiveing the message from the
                                                             bus.


     Vakgroep Informatietechnologie – Onderzoeksgroep IBCN                                 p. 16
Role of the Architect


                                                          Resource
     Workload                                             Capacity




Architect’s role: to establish the (minimum) amount
 of hardware that will allow the system to meet its
                performance goals.

  Vakgroep Informatietechnologie – Onderzoeksgroep IBCN              p. 17
Performance Tactics

                              Tactics
                             to Control                 Response generated
    Event
    Arrives                 Performance                 within Time Constraints



         Response Time = S { Working , Waiting}

       Resource                                                       Blocked
       Consumption
                                                                      Time
        CPU, storage, memory ...                          Resource Contention
        Designed entities: buffers,                       Resource Availability
         critical sections.                                Computational dependencies
        Processing sequence

Vakgroep Informatietechnologie – Onderzoeksgroep IBCN                             p. 18
Resource Consumption

   Processing sequence of an event:
        Message generated by one component
        Placed on network and arrives at another component
        The event is then placed in an input-buffer
        The event is transformed in some fashion
             e.g. CORBA marshalling
        The transformed event is then processed by an algorithm
        The result is then placed in an output-buffer
        Finally results are sent


    Each phase contributes to the latency for the event


    Vakgroep Informatietechnologie – Onderzoeksgroep IBCN          p. 19
Resource Consumption
            Bus System                                        Central System




                                                    30 secs




The bus system sends a message with speed & location every 15 seconds
to the central system. The central system produces an estimated arrival time for all relevant
displays and sends it out within 30 seconds after receiving the message from the bus.

     Vakgroep Informatietechnologie – Onderzoeksgroep IBCN                            p. 20
Blocked-Time

   A computation can be blocked because:
        A resource is unavailable (somebody else has it)
        The result of another computation is unavailable
   Contention for resources
        Single streams of events or multiple streams of events
        In general more streams  more contention  greater latency
        This depends on the arbitration mechanism for contention
   Availability of resources
        Resource unavailability (as in a crash and being swapped out)
         contributes to latency.
   Dependency on other computation
        Dataflow – can’t perform operation till the data is there


    Vakgroep Informatietechnologie – Onderzoeksgroep IBCN            p. 21
Performance: (Non -) Architectural Aspects

   The performance of a systems depends on
    both architectural and non-architecture
    aspects.
        Architectural aspects of performance:
             Communication between components
             Partitioning of functionality
             Allocation of resources
        Non-architectural aspects of performance:
             Choice of algorithms
             How these algorithms are coded




    Vakgroep Informatietechnologie – Onderzoeksgroep IBCN      p. 22
Performance Tactics

   Resource Demand
     Time between events (demands)
     How much is consumed per request ?
   Resource Management
     Without control on the demand side, the available
      resources must be managed.
   Resource Arbitration
     Resource contention and conflict resolution
     Scheduling:
              Priority based
              Pre-emption


Vakgroep Informatietechnologie – Onderzoeksgroep IBCN     p. 23
Resource Demand (1/2)

    Increase Computational Efficiency
           Understand algorithms: O(n) versus O(n2)
           Time/Space trade-off.
              Rendering versus stored image
              Compressed vs Uncompressed
              Lookup tables

    Reduce Computational Overhead
           Eliminate Intermediaries
           Modifiability/Performance trade-off.
           Precompute results



Vakgroep Informatietechnologie – Onderzoeksgroep IBCN   p. 24
Resource Demand(2/2)

 Reduce the number of events.
       Manage event rate
            Over engineered systems – slow down event generation
       Control frequency of sampling – process events at the rate
        you can regardless of arrival rate
            Possible loss of data (events)
       Bound execution times
            Place a limit (deadline) on how much computation will be done for an
             event
            This could even be varied based on queue lengths etc.
       Bound queue sizes




  Vakgroep Informatietechnologie – Onderzoeksgroep IBCN                             p. 25
Resource Management
   Concurrency
            Multitasking and threading.
            Load balancing.
   Keep multiple copies of data & computations
            More buffers, more processes
            Client-server: typical TCP concurrent server replicates the server
             process to deal with requests “in parallel”
            Replicas reduce contention: caching
            But add complexity:
                    consistency and synchronisation

   Increase available resources
            Add processors, memory, bandwidth.
            Cost/performance trade-off
        Vakgroep Informatietechnologie – Onderzoeksgroep IBCN             p. 26
Resource Arbitration

   All resources need to be scheduled
            Priority assignment
            Dispatching and pre-emption
            Applies to processor, network, buffers ….
   Scheduling policies :
            FIFO - First Come/First Served (FCFS)
            Fixed-priority: a fixed priority is assigned to each request
             then higher priority requests are processed first
                       Deadline monotonic
                       Rate monotonic (periodic)
            Dynamic Priority scheduling
                       Round robin
                       Earliest deadline first.

        Vakgroep Informatietechnologie – Onderzoeksgroep IBCN           p. 27
Performance Tactics: Summary


                                   Performance

                      Resource                            Resource
                      Demand        Resource              Arbitration
Event             •Increase
                                   Management              •Scheduling
                                                                         Response
                  computational
Arrives           efficiency
                                      •Introduce                         generated
                  •Reduce             concurrency
                  computational                                          within
                                      •Maintain
                  overhead
                                      multiple copies                    Time Constraints
                  •Manage
                                      •Increase
                  Event Rate
                                      available
                  •Control            resources
                  Frequency of
                  Sampling




  Vakgroep Informatietechnologie – Onderzoeksgroep IBCN                               p. 28
Exercise : Personal Mobile Marketing
 Use        Case Description:
       An international retail chain wants to send their
        customers discounts coupons for special offers.
       The information is send via e-mail and is pushed
        to the mobile phone.
       The discount coupons are specific for special
        offers based on the shopping profile of the
        customer.
       The e-mail message contains a marketing text
        prepared by the local retail stores in native
        language. The corporate information about the
        products on offer and the customer data are
        retrieved from the private corporate cloud.

Vakgroep Informatietechnologie – Onderzoeksgroep IBCN   p. 29
HTML2PDF conversion
Private Cloud :
•QR code for the discount
•Special offer product info
•Customer profile




                Local Servers:
                •Marketing text
                •PDF creation
                •Mail & Push


         Vakgroep Informatietechnologie – Onderzoeksgroep IBCN   p. 30
HTML2PDF Performance QAS

                          Artifact
                          Module:
                         HTML2PDF


Source     Stimulus     Environment   Response   Measure
Internal   HTML         Normal mode   PDF file   Latency:
event      To PDF                     Creation   < 1 sec
           Conversion                            Jitter:
                                                 Not specified
           Request




                                                         p. 31
HTML2PDF Measurements




                                       Latency:     average response time: 242 msec.

                                       Jitter:

                                              •     Response time < 0,5 sec : 921 calls

                                              •     Response time > 2 sec : 38 calls      ( 4%)



Vakgroep Informatietechnologie – Onderzoeksgroep IBCN                                             p. 32
Project Example
Project: Design Visualization

                                         Artifact
                                         System



Source       Stimulus               Environment             Response     Response
 User        Adds new               Normal mode               Item is    measure
              piece of                                       placed in      ?
            furniture to                                     the room
             the room



    Vakgroep Informatietechnologie – Onderzoeksgroep IBCN                      p. 33

Más contenido relacionado

Destacado (13)

Transmission impairments
Transmission impairmentsTransmission impairments
Transmission impairments
 
Digital modulation
Digital modulationDigital modulation
Digital modulation
 
Digital to analog conversion
Digital to analog conversionDigital to analog conversion
Digital to analog conversion
 
Modulation techniques
Modulation techniquesModulation techniques
Modulation techniques
 
Multiplexing
MultiplexingMultiplexing
Multiplexing
 
Amplitude shift keying (ask)
Amplitude shift keying (ask)Amplitude shift keying (ask)
Amplitude shift keying (ask)
 
Media Characteristics
Media CharacteristicsMedia Characteristics
Media Characteristics
 
Analog modulation
Analog modulationAnalog modulation
Analog modulation
 
Digital modulation
Digital modulationDigital modulation
Digital modulation
 
Transmission Media
Transmission MediaTransmission Media
Transmission Media
 
Transmission media
Transmission mediaTransmission media
Transmission media
 
Amplitude Modulation ppt
Amplitude Modulation pptAmplitude Modulation ppt
Amplitude Modulation ppt
 
Multiplexing, fdma,tdma,cdma
Multiplexing, fdma,tdma,cdmaMultiplexing, fdma,tdma,cdma
Multiplexing, fdma,tdma,cdma
 

Similar a Sa 005 performance

Sa 007 availability
Sa 007 availabilitySa 007 availability
Sa 007 availability
Frank Gielen
 
Sa 004 quality_attributes
Sa 004 quality_attributesSa 004 quality_attributes
Sa 004 quality_attributes
Frank Gielen
 
FPGA Based Data Processing for Real-time WSN Applications:
FPGA Based Data Processing for Real-time WSN Applications: FPGA Based Data Processing for Real-time WSN Applications:
FPGA Based Data Processing for Real-time WSN Applications:
Ilham Amezzane
 
Remote sensing and control of an irrigation system using a distributed wirele...
Remote sensing and control of an irrigation system using a distributed wirele...Remote sensing and control of an irrigation system using a distributed wirele...
Remote sensing and control of an irrigation system using a distributed wirele...
nithinreddykaithi
 
Application scenarios in streaming oriented embedded-system design
Application scenarios in streaming oriented embedded-system designApplication scenarios in streaming oriented embedded-system design
Application scenarios in streaming oriented embedded-system design
Mr. Chanuwan
 
Making Runtime Data Useful for Incident Diagnosis: An Experience Report
Making Runtime Data Useful for Incident Diagnosis: An Experience ReportMaking Runtime Data Useful for Incident Diagnosis: An Experience Report
Making Runtime Data Useful for Incident Diagnosis: An Experience Report
QAware GmbH
 
Stream Processing with CompletableFuture and Flow in Java 9
Stream Processing with CompletableFuture and Flow in Java 9Stream Processing with CompletableFuture and Flow in Java 9
Stream Processing with CompletableFuture and Flow in Java 9
Trayan Iliev
 
Restate: Event-driven Asynchronous Services, Easy as Synchronous RPC
Restate: Event-driven Asynchronous Services, Easy as Synchronous RPCRestate: Event-driven Asynchronous Services, Easy as Synchronous RPC
Restate: Event-driven Asynchronous Services, Easy as Synchronous RPC
HostedbyConfluent
 

Similar a Sa 005 performance (20)

Pr 005 qa_workshop
Pr 005 qa_workshopPr 005 qa_workshop
Pr 005 qa_workshop
 
Sa 007 availability
Sa 007 availabilitySa 007 availability
Sa 007 availability
 
Sa 006 modifiability
Sa 006 modifiabilitySa 006 modifiability
Sa 006 modifiability
 
Sa 004 quality_attributes
Sa 004 quality_attributesSa 004 quality_attributes
Sa 004 quality_attributes
 
Matthias Vallentin - Towards Interactive Network Forensics and Incident Respo...
Matthias Vallentin - Towards Interactive Network Forensics and Incident Respo...Matthias Vallentin - Towards Interactive Network Forensics and Incident Respo...
Matthias Vallentin - Towards Interactive Network Forensics and Incident Respo...
 
FPGA Based Data Processing for Real-time WSN Applications:
FPGA Based Data Processing for Real-time WSN Applications: FPGA Based Data Processing for Real-time WSN Applications:
FPGA Based Data Processing for Real-time WSN Applications:
 
Debs 2011 tutorial on non functional properties of event processing
Debs 2011 tutorial  on non functional properties of event processingDebs 2011 tutorial  on non functional properties of event processing
Debs 2011 tutorial on non functional properties of event processing
 
jBPM
jBPMjBPM
jBPM
 
Remote sensing and control of an irrigation system using a distributed wirele...
Remote sensing and control of an irrigation system using a distributed wirele...Remote sensing and control of an irrigation system using a distributed wirele...
Remote sensing and control of an irrigation system using a distributed wirele...
 
5
55
5
 
Application scenarios in streaming oriented embedded-system design
Application scenarios in streaming oriented embedded-system designApplication scenarios in streaming oriented embedded-system design
Application scenarios in streaming oriented embedded-system design
 
Intelligent Monitoring
Intelligent MonitoringIntelligent Monitoring
Intelligent Monitoring
 
Gatling workshop lets test17
Gatling workshop lets test17Gatling workshop lets test17
Gatling workshop lets test17
 
Making Runtime Data Useful for Incident Diagnosis: An Experience Report
Making Runtime Data Useful for Incident Diagnosis: An Experience ReportMaking Runtime Data Useful for Incident Diagnosis: An Experience Report
Making Runtime Data Useful for Incident Diagnosis: An Experience Report
 
Stream Processing with CompletableFuture and Flow in Java 9
Stream Processing with CompletableFuture and Flow in Java 9Stream Processing with CompletableFuture and Flow in Java 9
Stream Processing with CompletableFuture and Flow in Java 9
 
Restate: Event-driven Asynchronous Services, Easy as Synchronous RPC
Restate: Event-driven Asynchronous Services, Easy as Synchronous RPCRestate: Event-driven Asynchronous Services, Easy as Synchronous RPC
Restate: Event-driven Asynchronous Services, Easy as Synchronous RPC
 
Proactive ops for container orchestration environments
Proactive ops for container orchestration environmentsProactive ops for container orchestration environments
Proactive ops for container orchestration environments
 
Presentation
PresentationPresentation
Presentation
 
spChains: A Declarative Framework for Data Stream Processing in Pervasive App...
spChains: A Declarative Framework for Data Stream Processing in Pervasive App...spChains: A Declarative Framework for Data Stream Processing in Pervasive App...
spChains: A Declarative Framework for Data Stream Processing in Pervasive App...
 
Embedded Intro India05
Embedded Intro India05Embedded Intro India05
Embedded Intro India05
 

Más de Frank Gielen

KPMG Legal and Tax September 2013
KPMG Legal and Tax September 2013KPMG Legal and Tax September 2013
KPMG Legal and Tax September 2013
Frank Gielen
 
Delaware presentation nov2012
Delaware presentation nov2012Delaware presentation nov2012
Delaware presentation nov2012
Frank Gielen
 
Sa 008 architecture_views
Sa 008 architecture_viewsSa 008 architecture_views
Sa 008 architecture_views
Frank Gielen
 
VC Do's and Don'ts - Jurgen Ingels
VC Do's and Don'ts  - Jurgen Ingels VC Do's and Don'ts  - Jurgen Ingels
VC Do's and Don'ts - Jurgen Ingels
Frank Gielen
 
Debt & Equity - Wouter Haerick
Debt & Equity - Wouter HaerickDebt & Equity - Wouter Haerick
Debt & Equity - Wouter Haerick
Frank Gielen
 

Más de Frank Gielen (20)

I mindsx4howest v2
I mindsx4howest v2I mindsx4howest v2
I mindsx4howest v2
 
I mindsx learning analytics v2
I mindsx learning analytics v2I mindsx learning analytics v2
I mindsx learning analytics v2
 
You have been MOOCed
You have been MOOCedYou have been MOOCed
You have been MOOCed
 
Beyond MOOCs ctd. (2015)
Beyond MOOCs ctd. (2015)Beyond MOOCs ctd. (2015)
Beyond MOOCs ctd. (2015)
 
Beyond MOOCs (2014)
Beyond MOOCs (2014)Beyond MOOCs (2014)
Beyond MOOCs (2014)
 
The Research Canvas
The Research CanvasThe Research Canvas
The Research Canvas
 
Defining the opportunity 2013
Defining the opportunity 2013Defining the opportunity 2013
Defining the opportunity 2013
 
KPMG Legal and Tax September 2013
KPMG Legal and Tax September 2013KPMG Legal and Tax September 2013
KPMG Legal and Tax September 2013
 
Dare 2 Start - Course outline
Dare 2 Start - Course outlineDare 2 Start - Course outline
Dare 2 Start - Course outline
 
Sop test planning
Sop test planningSop test planning
Sop test planning
 
Delaware presentation nov2012
Delaware presentation nov2012Delaware presentation nov2012
Delaware presentation nov2012
 
Pr crc
Pr crcPr crc
Pr crc
 
Sa 009 add
Sa 009 addSa 009 add
Sa 009 add
 
Sa 008 architecture_views
Sa 008 architecture_viewsSa 008 architecture_views
Sa 008 architecture_views
 
The Phonegap Architecture
The Phonegap ArchitectureThe Phonegap Architecture
The Phonegap Architecture
 
VC Do's and Don'ts - Jurgen Ingels
VC Do's and Don'ts  - Jurgen Ingels VC Do's and Don'ts  - Jurgen Ingels
VC Do's and Don'ts - Jurgen Ingels
 
Debt & Equity - Wouter Haerick
Debt & Equity - Wouter HaerickDebt & Equity - Wouter Haerick
Debt & Equity - Wouter Haerick
 
Ws002 use cases
Ws002 use casesWs002 use cases
Ws002 use cases
 
Figure1
Figure1Figure1
Figure1
 
Ws01 sota 2
Ws01 sota 2Ws01 sota 2
Ws01 sota 2
 

Último

CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 

Último (20)

Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 

Sa 005 performance

  • 1. Software Architecture Quality Attributes & Tactics (2) Performance Vakgroep Informatietechnologie – IBCN
  • 2. Quality Attributes Scenarios Artifact Source Stimulus Environment Response Measure Vakgroep Informatietechnologie – Onderzoeksgroep IBCN p. 2
  • 3. Quality Attribute Scenarios A Quality Attribute Scenario describes:  SOURCE: who or what  STIMULUS: does something  ARTIFACT: to the system or part of it  ENVIRONMENT: under certain conditions  RESPONSE: how the system reacts  MEASURE: how you can measure this Vakgroep Informatietechnologie – Onderzoeksgroep IBCN p. 3
  • 4. What is Performance ? Performance is about timing - not speed.  Performance refers to responsiveness:  either the time required to respond to a specific event or  the number of events processed in a given time interval.  Performance vs. Speed  Faster processors or more bandwidth do not improve timeliness; they only minimize the average response time for some services.  Example : real-time systems need predictable responsiveness. Vakgroep Informatietechnologie – Onderzoeksgroep IBCN p. 4
  • 5. Real-Time Systems  Hard real-time systems:  required to complete a critical task within a guaranteed amount of time  Example : avionics  Soft real-time systems:  requires that critical processes receive priority over less fortunate ones  Example: on-line banking Vakgroep Informatietechnologie – Onderzoeksgroep IBCN p. 5
  • 6. Performance Myths ?  Itis not possible to do anything about performance until you have something to measure.  Performance models are expensive and difficult to construct. Vakgroep Informatietechnologie – Onderzoeksgroep IBCN p. 6
  • 7. Performance Myths  Itis not possible to do anything about performance until you have something to measure.  Performance models are expensive and difficult to construct.  Architecture determines performance properties.  Simple models (back of the envelope) can identify performance problems.  Annotated UML Sequence diagrams Vakgroep Informatietechnologie – Onderzoeksgroep IBCN p. 7
  • 8. Modeling Performance - Events  Performance requirements:  Quantitative requirements defined in terms of events and the timing constraint to respond to each event.  An event can be an interrupt, a message, a user interaction ...  Behavior Pattern:  The number of event streams, the worst case and the steady state arrival rates for each stream.  An event stream is a single source of events such as a hardware interrupt.  Arrival rates can be periodic, stochastic, bursty or sporadic Vakgroep Informatietechnologie – Onderzoeksgroep IBCN p. 8
  • 9. Performance Concerns (1/2)  Latency :  How long does it take to respond to a specific event.  Jitter: is the variation in response time.  Throughput :  How many events can be responded to over a given interval of time ? Vakgroep Informatietechnologie – Onderzoeksgroep IBCN p. 9
  • 10. Performance Concerns (2/2)  Capacity :  How much demand can be placed on the system while continuing to meet latency and throughput requirements ?  It is the maximum achievable throughput without violating latency requirements.  Modes :  What happens when system capacity is exceeded and not all events can be responded to in a timely manner ?  2 common modes: reduced capacity and overload  Reduced capacity : resource cease to function Vakgroep Informatietechnologie – Onderzoeksgroep IBCN p. 10
  • 11. Performance concerns - overview Ref: Quality Attributes : Technical Report CMU - CMU/SEI-95-TR-021 Chapter 3 Performance p. 7 – 14 (see Download section) Vakgroep Informatietechnologie – Onderzoeksgroep IBCN p. 11
  • 12. Performance generic scenario (1/3)  Source The stimuli arrive either from external (possibly multiple) or internal sources. In our example, the source of the stimulus is a collection of users, a message or an interrupt.  Stimulus The stimuli are the event arrivals Periodicevents; Sporadic events; Stochastic events Bursty events  Artifact The artifact is the system's services or a component Vakgroep Informatietechnologie – Onderzoeksgroep IBCN p. 12
  • 13. Performance generic scenario (2/3)  Environment The system can be in various operational modes:  Normal mode  Overload mode  Reduced Capacity mode  Response The system must process the arriving events. This may cause a change in the system environment or the service level. Vakgroep Informatietechnologie – Onderzoeksgroep IBCN p. 13
  • 14. Performance generic scenario (3/3)  Response measure The response measures are the time it takes to process the arriving events:  Latency or a deadline by which the event must be processed  Jitter: the variation in processing time  Throughput the number of events that can be processed within a particular time interval  Capacity: the maximum achievable throughput without violating latency requirements.  Miss rate, data loss: a characterization of the events that cannot be processed Vakgroep Informatietechnologie – Onderzoeksgroep IBCN p. 14
  • 15. Performance QAS Artifact Source Stimulus Environment Response Measure External Periodic Normal mode Change in Latency Internal Sporadic Overload mode system Deadline Reduced mode Throughput events Stochastic Capacity mode or Capacity Bursty service Jitter events level. Miss rate p. 15
  • 16. Case: Digital Signage – Public Transport Performance QAS : SOURCE who or what A bus subsystem STIMULUS does something ... sends a msg with its speed & location every 15 secs. ARTIFACT to the system or part of it ... to the central system ENVIRONMENT under certain conditions ...during normal operations RESPONSE how the system reacts The system produces an estimated arrival time for all relevant displays and sends it out MEASURE how you can measure this ... within 30 seconds after receiveing the message from the bus. Vakgroep Informatietechnologie – Onderzoeksgroep IBCN p. 16
  • 17. Role of the Architect Resource Workload Capacity Architect’s role: to establish the (minimum) amount of hardware that will allow the system to meet its performance goals. Vakgroep Informatietechnologie – Onderzoeksgroep IBCN p. 17
  • 18. Performance Tactics Tactics to Control Response generated Event Arrives Performance within Time Constraints Response Time = S { Working , Waiting} Resource Blocked Consumption Time  CPU, storage, memory ...  Resource Contention  Designed entities: buffers,  Resource Availability critical sections.  Computational dependencies  Processing sequence Vakgroep Informatietechnologie – Onderzoeksgroep IBCN p. 18
  • 19. Resource Consumption  Processing sequence of an event:  Message generated by one component  Placed on network and arrives at another component  The event is then placed in an input-buffer  The event is transformed in some fashion  e.g. CORBA marshalling  The transformed event is then processed by an algorithm  The result is then placed in an output-buffer  Finally results are sent Each phase contributes to the latency for the event Vakgroep Informatietechnologie – Onderzoeksgroep IBCN p. 19
  • 20. Resource Consumption Bus System Central System 30 secs The bus system sends a message with speed & location every 15 seconds to the central system. The central system produces an estimated arrival time for all relevant displays and sends it out within 30 seconds after receiving the message from the bus. Vakgroep Informatietechnologie – Onderzoeksgroep IBCN p. 20
  • 21. Blocked-Time  A computation can be blocked because:  A resource is unavailable (somebody else has it)  The result of another computation is unavailable  Contention for resources  Single streams of events or multiple streams of events  In general more streams  more contention  greater latency  This depends on the arbitration mechanism for contention  Availability of resources  Resource unavailability (as in a crash and being swapped out) contributes to latency.  Dependency on other computation  Dataflow – can’t perform operation till the data is there Vakgroep Informatietechnologie – Onderzoeksgroep IBCN p. 21
  • 22. Performance: (Non -) Architectural Aspects  The performance of a systems depends on both architectural and non-architecture aspects.  Architectural aspects of performance:  Communication between components  Partitioning of functionality  Allocation of resources  Non-architectural aspects of performance:  Choice of algorithms  How these algorithms are coded Vakgroep Informatietechnologie – Onderzoeksgroep IBCN p. 22
  • 23. Performance Tactics  Resource Demand  Time between events (demands)  How much is consumed per request ?  Resource Management  Without control on the demand side, the available resources must be managed.  Resource Arbitration  Resource contention and conflict resolution  Scheduling:  Priority based  Pre-emption Vakgroep Informatietechnologie – Onderzoeksgroep IBCN p. 23
  • 24. Resource Demand (1/2)  Increase Computational Efficiency  Understand algorithms: O(n) versus O(n2)  Time/Space trade-off.  Rendering versus stored image  Compressed vs Uncompressed  Lookup tables  Reduce Computational Overhead  Eliminate Intermediaries  Modifiability/Performance trade-off.  Precompute results Vakgroep Informatietechnologie – Onderzoeksgroep IBCN p. 24
  • 25. Resource Demand(2/2)  Reduce the number of events.  Manage event rate  Over engineered systems – slow down event generation  Control frequency of sampling – process events at the rate you can regardless of arrival rate  Possible loss of data (events)  Bound execution times  Place a limit (deadline) on how much computation will be done for an event  This could even be varied based on queue lengths etc.  Bound queue sizes Vakgroep Informatietechnologie – Onderzoeksgroep IBCN p. 25
  • 26. Resource Management  Concurrency  Multitasking and threading.  Load balancing.  Keep multiple copies of data & computations  More buffers, more processes  Client-server: typical TCP concurrent server replicates the server process to deal with requests “in parallel”  Replicas reduce contention: caching  But add complexity:  consistency and synchronisation  Increase available resources  Add processors, memory, bandwidth.  Cost/performance trade-off Vakgroep Informatietechnologie – Onderzoeksgroep IBCN p. 26
  • 27. Resource Arbitration  All resources need to be scheduled  Priority assignment  Dispatching and pre-emption  Applies to processor, network, buffers ….  Scheduling policies :  FIFO - First Come/First Served (FCFS)  Fixed-priority: a fixed priority is assigned to each request then higher priority requests are processed first  Deadline monotonic  Rate monotonic (periodic)  Dynamic Priority scheduling  Round robin  Earliest deadline first. Vakgroep Informatietechnologie – Onderzoeksgroep IBCN p. 27
  • 28. Performance Tactics: Summary Performance Resource Resource Demand Resource Arbitration Event •Increase Management •Scheduling Response computational Arrives efficiency •Introduce generated •Reduce concurrency computational within •Maintain overhead multiple copies Time Constraints •Manage •Increase Event Rate available •Control resources Frequency of Sampling Vakgroep Informatietechnologie – Onderzoeksgroep IBCN p. 28
  • 29. Exercise : Personal Mobile Marketing  Use Case Description:  An international retail chain wants to send their customers discounts coupons for special offers.  The information is send via e-mail and is pushed to the mobile phone.  The discount coupons are specific for special offers based on the shopping profile of the customer.  The e-mail message contains a marketing text prepared by the local retail stores in native language. The corporate information about the products on offer and the customer data are retrieved from the private corporate cloud. Vakgroep Informatietechnologie – Onderzoeksgroep IBCN p. 29
  • 30. HTML2PDF conversion Private Cloud : •QR code for the discount •Special offer product info •Customer profile Local Servers: •Marketing text •PDF creation •Mail & Push Vakgroep Informatietechnologie – Onderzoeksgroep IBCN p. 30
  • 31. HTML2PDF Performance QAS Artifact Module: HTML2PDF Source Stimulus Environment Response Measure Internal HTML Normal mode PDF file Latency: event To PDF Creation < 1 sec Conversion Jitter: Not specified Request p. 31
  • 32. HTML2PDF Measurements Latency: average response time: 242 msec. Jitter: • Response time < 0,5 sec : 921 calls • Response time > 2 sec : 38 calls ( 4%) Vakgroep Informatietechnologie – Onderzoeksgroep IBCN p. 32
  • 33. Project Example Project: Design Visualization Artifact System Source Stimulus Environment Response Response User Adds new Normal mode Item is measure piece of placed in ? furniture to the room the room Vakgroep Informatietechnologie – Onderzoeksgroep IBCN p. 33

Notas del editor

  1. Resource demand: event aggregation: example power supply failure Resource management: locking, sharing, queues remote access to mobile test devices (schedule + re
  2. Algorithm: transcode a video: Bit level/ MPEG Time/Space trade-off: prepare the movies in a number of formats Computational Overhead: Intermediate language representation. Computational overhead: JVM or interpreter
  3. Event rate: example of the power system. (Aurora), logging &amp; alarm management Transcoder: Mobile Page requests from users –external events (load balancing) but device detection: 50% is iPhone Bound execution: Common denominator version of a mobile webpage