Presentation is loading. Please wait.

Presentation is loading. Please wait.

Vakgroep Informatietechnologie – IBCN Software Architecture Prof.Dr.ir. F. Gielen Quality Attributes & Tactics (2) Performance.

Similar presentations


Presentation on theme: "Vakgroep Informatietechnologie – IBCN Software Architecture Prof.Dr.ir. F. Gielen Quality Attributes & Tactics (2) Performance."— Presentation transcript:

1 Vakgroep Informatietechnologie – IBCN Software Architecture Prof.Dr.ir. F. Gielen Quality Attributes & Tactics (2) Performance

2 Vakgroep Informatietechnologie – Onderzoeksgroep IBCN p. 2 Performance How long does it take the system to respond to an event ? Interrupts, messages, user requests The complexity is dictated by: number of events arrival patterns response patterns Arrival patterns: periodic or stochastic sporadic or bursty Performance is about timing.

3 Vakgroep Informatietechnologie – Onderzoeksgroep IBCN p. 3 Performance Generic Scenario

4 Vakgroep Informatietechnologie – Onderzoeksgroep IBCN p. 4 Performance scenario generation Source of stimulus: The stimuli arrive either from external (possibly multiple) or internal sources. In our example, the source of the stimulus is a collection of users. Stimulus: The stimuli are the event arrivals Periodic events; Sporadic events; Stochastic events Artifact: The artifact is always the system's services

5 Vakgroep Informatietechnologie – Onderzoeksgroep IBCN p. 5 Performance scenario generation (2/2) Environment: The system can be in various operational modes, Normal mode Overload mode Response. The system must process the arriving events. This may cause a change in the system environment.

6 Vakgroep Informatietechnologie – Onderzoeksgroep IBCN p. 6 Performance scenario generation (ctd.) 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 Miss rate, data loss: a characterization of the events that cannot be processed

7 Vakgroep Informatietechnologie – Onderzoeksgroep IBCN p. 7 Performance Tactics Tactics to Control Performance Event Arrives Response generated within Time Constraints Response Time =  { Working, Waiting} Resource Contention Resource Availability Computational dependencies Resource Consumption Blocked Time CPU, storage, memory... Designed entities: buffers, critical sections. Processing sequence

8 Vakgroep Informatietechnologie – Onderzoeksgroep IBCN p. 8 Dispatch Latency

9 Vakgroep Informatietechnologie – Onderzoeksgroep IBCN p. 9 Resource Consumption: C-S Communication Remote Procedure Calls Remote procedure call (RPC) abstracts procedure calls between processes on networked systems. Stubs – client-side proxy for the actual procedure on the server. The client-side stub locates the server and marshalls the parameters. The server-side stub receives this message, unpacks the marshalled parameters, and peforms the procedure on the server.

10 Vakgroep Informatietechnologie – Onderzoeksgroep IBCN p. 10 Execution of RPC

11 Vakgroep Informatietechnologie – Onderzoeksgroep IBCN p. 11 Remote Method Invocation RMI Remote Method Invocation (RMI) is a Java mechanism similar to RPCs. RMI allows a Java program on one machine to invoke a method on a remote object.

12 Vakgroep Informatietechnologie – Onderzoeksgroep IBCN p. 12 Marshalling Parameters

13 Vakgroep Informatietechnologie – Onderzoeksgroep IBCN p. 13 Resource Consumption : Processing Sequence 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

14 Vakgroep Informatietechnologie – Onderzoeksgroep IBCN p. 14 Blocked-Time A computation can be blocked because: A resource is unavailable (somebody else has it) The result of a 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

15 Vakgroep Informatietechnologie – Onderzoeksgroep IBCN p. 15 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

16 Vakgroep Informatietechnologie – Onderzoeksgroep IBCN p. 16 Prestaties sorteeralgorithmes:

17 Vakgroep Informatietechnologie – Onderzoeksgroep IBCN p. 17 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

18 Vakgroep Informatietechnologie – Onderzoeksgroep IBCN p. 18 Resource Demand Increase Computational Efficiency  Algorithms  Time/Space trade-off. Reduce Computational Overhead  Eliminate Intermediaries  Modifiability/Performance trade-off. Reduce the number of events

19 Vakgroep Informatietechnologie – Onderzoeksgroep IBCN p. 19 Reduce events example: optical internet switch Service Layer Intelligent Optical Layer ADM Metro Network

20 Vakgroep Informatietechnologie – Onderzoeksgroep IBCN p. 20 Internet switch - optical

21 Vakgroep Informatietechnologie – Onderzoeksgroep IBCN p. 21 System Architecture - hardware TR SCM (primary) Ethernet XP XP SCM (primary) MCM (primary) Alarm Bus Master Controller Ethernet Hub LVDS HDLC & Transport for CORBA Ethernet XP SCM (primary) Ethernet CORBA and Socket Comms LVDS HDLC & Transport for CORBA LVDS CORBA and Raw HDLC Secondary Controller 18 Xcvrs.................. Transceiver Group Primary HDLC Secondary HDLC............ Every board has at least 1 processor: PPC Everything fully redundant.

22 Vakgroep Informatietechnologie – Onderzoeksgroep IBCN p. 22 Architectural View: Process Deployment View FMS Manager HIS::Alarm Handler Master Controller FMS Agent UPI FMS Manager HIS::Alarm Handler FMS Agent HIS::Alarm Handler Transceiver Alarm Monitoring SecondaryController

23 Vakgroep Informatietechnologie – Onderzoeksgroep IBCN p. 23 Reducing Latency by Managing Resource Demand 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

24 Vakgroep Informatietechnologie – Onderzoeksgroep IBCN p. 24 Resource Management Concurrency  Multitasking and threading.  Load balancing. Maintain multiple copies of data and 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  …adds complexity: consistency and synchronisation Increase available resources  Add processors, memory, bandwidth.  Cost/performance trade-off  Google architecture

25 Vakgroep Informatietechnologie – Onderzoeksgroep IBCN p. 25 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.

26 Vakgroep Informatietechnologie – Onderzoeksgroep IBCN p. 26 Java Thread Scheduling JVM Uses a Preemptive, Priority-Based Scheduling Algorithm FIFO Queue is Used if There Are Multiple Threads With the Same Priority

27 Vakgroep Informatietechnologie – Onderzoeksgroep IBCN p. 27 Java Thread Scheduling (cont) JVM Schedules a Thread to Run When: 1. The Currently Running Thread Exits the Runnable State 2. A Higher Priority Thread Enters the Runnable State * Note – the JVM Does Not Specify Whether Threads are Time-Sliced or Not

28 Vakgroep Informatietechnologie – Onderzoeksgroep IBCN p. 28 Time-Slicing Since the JVM Doesn’t Ensure Time-Slicing, the yield() Method may Be Used: while (true) { // perform CPU-intensive task... Thread.yield(); } This Yields Control to Another Thread of Equal Priority

29 Vakgroep Informatietechnologie – Onderzoeksgroep IBCN p. 29 Real-Time Scheduling Hard real-time systems: required to complete a critical task within a guaranteed amount of time Soft real-time computing – requires that critical processes receive priority over less fortunate ones

30 Vakgroep Informatietechnologie – Onderzoeksgroep IBCN p. 30 Performance Tactics: summary Performance Resource Demand Resource Management Resource Arbitration Response generated within Time Constraints Event Arrives Increase computational efficiency Reduce computational overhead Manage Event Rate Control Frequency of Sampling Introduce concurrency Maintain multiple copies Increase available resources Scheduling policies


Download ppt "Vakgroep Informatietechnologie – IBCN Software Architecture Prof.Dr.ir. F. Gielen Quality Attributes & Tactics (2) Performance."

Similar presentations


Ads by Google