Performance Metrics and Performance Engineering

Slides:



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

Cloud Computing COMP 1631, Winter 2011 Yanggang Chen.
INSE - Lectures 19 & 20 SE for Real-Time & SE for Concurrency  Really these are two topics – but rather tangled together.
1 Steve Chenoweth Tuesday, 10/04/11 Week 5, Day 2 Right – Typical tool for reading out error codes logged by your car’s computer, to help analyze its problems.
SEDA: An Architecture for Well-Conditioned, Scalable Internet Services Matt Welsh, David Culler, and Eric Brewer Computer Science Division University of.
1 CSSE 477 – A bit more on Performance Steve Chenoweth Friday, 9/9/11 Week 1, Day 2 Right – Googling for “Performance” gets you everything from Lady Gaga.
1 CSSE 477 – Intro to Performance Steve Chenoweth Friday, 9/2/11 Week 0, Day 2 Right – A close analogy to performance as we mean it – Danica Patrick in.
Client/Server Architectures
By Phani Gowthami Tammineni. Overview This presentation is about the issues in real-time database systems and presents an overview of the state of the.
Prepare by : Ihab shahtout.  Overview  To give an overview of fixed priority schedule  Scheduling and Fixed Priority Scheduling.
Performance Performance is about time and the software system’s ability to meet timing requirements.
1 OPERATING SYSTEMS. 2 CONTENTS 1.What is an Operating System? 2.OS Functions 3.OS Services 4.Structure of OS 5.Evolution of OS.
INTRODUCTION TO WEB HOSTING
Introduction to Operating Systems
OPERATING SYSTEMS CS 3502 Fall 2017
Chapter 1- Introduction
Memory Management.
OPERATING SYSTEMS CS 3502 Fall 2017
Processes and threads.
SEDA: An Architecture for Scalable, Well-Conditioned Internet Services
Process Management Process Concept Why only the global variables?
Operating Systems : Overview
Software Architecture in Practice
Operating System (OS) QUESTIONS AND ANSWERS
Processes and Threads Processes and their scheduling
OPERATING SYSTEMS CS3502 Fall 2017
Advanced QlikView Performance Tuning Techniques
COMPSCI210 Recitation 12 Oct 2012 Vamsi Thummala
GlassFish in the Real World
William Stallings Computer Organization and Architecture
Process Description and Control
The Client/Server Database Environment
Swapping Segmented paging allows us to have non-contiguous allocations
Chapter 25: Architecture and Product Lines
Software Architecture in Practice
Real-time Software Design
Main Memory Management
Introduction to Operating Systems
Advanced Operating Systems
April 30th – Scheduling / parallel
Operating Systems : Overview
CSCI1600: Embedded and Real Time Software
Operating Systems Bina Ramamurthy CSE421 11/27/2018 B.Ramamurthy.
Fault Tolerance Distributed Web-based Systems
Operating Systems : Overview
Operating Systems.
How to improve (decrease) CPI
Operating systems Process scheduling.
Admission Control and Request Scheduling in E-Commerce Web Sites
Process Description and Control
Software models - Software Architecture Design Patterns
CPU SCHEDULING.
Operating Systems : Overview
An Introduction to Software Architecture
Operating Systems : Overview
Operating Systems : Overview
Multiprocessor and Real-Time Scheduling
Multithreaded Programming
EE 472 – Embedded Systems Dr. Shwetak Patel.
Uniprocessor scheduling
Threads vs. Processes Hank Levy 1.
Chapter 2 Processes and Threads 2.1 Processes 2.2 Threads
Virtual Memory: Working Sets
Database System Architectures
CS703 - Advanced Operating Systems
Operating System Overview
CSCI1600: Embedded and Real Time Software
WHAT ARE THE ADVANTAGES AND CHALLENGES OF MICROSOFT SQL SERVER.
CSC Multiprocessor Programming, Spring, 2011
Chapter 13: I/O Systems “The two main jobs of a computer are I/O and [CPU] processing. In many cases, the main job is I/O, and the [CPU] processing is.
Presentation transcript:

Performance Metrics and Performance Engineering Steve Chenoweth, RHIT Picture of New York Philharmonic from http://www.nycgo.com/venues/new-york-philharmonic. Above – They look ready to perform, but why are they sitting in the audience seats?

What is performance? It’s both of: How fast, and Capacity (how many) Usually, a combination of these like, How fast will the system respond, on average, to 10000 simultaneous web users trying to place an order? Image is Russian weightlifter, from http://www.poliquingroup.com/ArticlesMultimedia/Articles/Article/1086/How_Russian_Weightlifters_Train.aspx.

Customers care about performance Some systems are sold by performance! Customers divide the cost by how many users it will handle at some standard rate of user activity, Then they compare that to the competition. Image from http://en.wikipedia.org/wiki/Cell_site. “And, how many simultaneous cell phone calls will yours handle?”

Software performance engineering Starts with asking the target customers the right questions. How fast SHOULD the system respond, on average, to 10000 simultaneous web users trying to place an order? Image from http://www.ivestraining.com/forklift-resource-center/ives-training-group-web-order-system/. X 1000

The key factors all relate Resource consumption generates the responses, up to the capacity. And the response rate degrades as you approach the limit. At 50% capacity, typically things take twice as long. Image from http://www.theserverside.com/news/1363731/Performance-Engineering-a-Practitioners-Approach-to-Performance-Testing.

It’s systematic Goal is to push requirements into design, coding, and testing. Everyone has numbers to worry about. They worry about them early. Contrasts with, “Wait till it hits the test lab, then tune it.”

Here’s how Image from http://blogs.msdn.com/b/jmeier/archive/2008/11/20/patterns-practices-performance-engineering-cheat-sheet.aspx

Main tool – a spreadsheet Typical new system design analysis – For a network management system Note: These are all resource consumption estimates Note: Having everything add up to only 60% allows for some “blocked time”

Performance is another quality attribute And “Software performance engineering” is very similar to “reliability engineering,” already discussed. Use a spreadsheet, Give people “budget” accountabilities, and Put someone in charge.

Start with “scenarios” Document the main “situations” in which performance will be an important consideration to the customer. These are like “use cases” only more general. Due to Len Bass, at the SEI. Image of Bass from http://www.dimap.ufrn.br/sbcars2009/en/notes.html. He looks harmless enough…

Bass’s perf scenarios Source: One of a number of independent sources, possibly from within system Stimulus: Periodic events arrive; sporadic events arrive; stochastic events arrive Artifact: System Environment: Normal mode; overload mode Response: Processes stimuli; changes level of service Response Measure: Latency, deadline, throughput, jitter, miss rate, data loss

Example scenario Source: Users Stimulus: Initiate transactions Artifact: System Environment: Under normal operations Response: Transactions are processed Response Measure: With average latency of two seconds

For an existing development project Find a “very needed” and “doable” performance improvement Whose desired state can be characterized as one of those scenarios! Add “where it is now!”

What do you do next? The design work – Adopt a tactic or two… My descriptions are deceptively brief Each area – like designing high performance into a system – could be your career! What on earth could improve a performance scenario by 100%? Image from http://www.forbes.com/2010/10/18/financial-advisors-fire-clients-markets-brokers_slide.html. It’s only running half as fast as it should!

The tactics for performance Mostly, they have to work like this Tactics to control performance Events arrive Responses generated within time constraints From Bass’s Software Architecture in Practice, 2nd Ed., Fig 5.6. There is now a new and even better 3rd Ed!

Typically… The events arrive, but Some reasons can be ID’ed for their slow processing Two basic contributors to this problem: Resource consumption – the time it takes to do all the processing to create the response Blocked time – it has to wait for something else to go first

Which one’s easier to fix? Blocked time – sounds like it could lead pretty directly to some solution ideas, like: Work queues are building up, so add more resources and distribute the load, or Pick the higher priority things out of the queue, and do them first

Blocked time, cntd In your system, of course, adding resources may or may not be possible! Add disk drives? Add CPU’s? Speed up communication paths? On servers, these are standard solutions: Put every DB table on its own disk drive Stick another blade in the rack, etc.

Resource consumption? You first have to know where it is: If you’re trying to speed up a GUI activity, time the parts, and go after the long ones. If it’s internal, you need some way to “observe” what’s happening, so you can do a similar analysis. Put timings into the various pieces of activity Some parts may be tough to break down, like time spent in the O/S

Bass’s Performance Remedies Try one of these 3 Strategies – look at: Resource demand Resource management Resource arbitration See next slides for details on each 

Resource Demand – example: Server system has “the database” for retail inventory (for CSSE 574’s NextGen POS): Transactions hit it at a high rate, from POS Managers also periodically do huge queries, like, “What toothpaste is selling best West of the Mississippi?” When they do, transactions back up How to fix?

Resource Demand – options: Increase computational efficiency Reduce computational overhead Manage event rate Control frequency of sampling Bound execution times Bound queue sizes

Resource Management – example: You have a “pipe and filter” system to convert some data for later processing: It runs too slowly, because it reads and writes all files on the same disk (on your laptop, say) How to fix? Non-XML data from outside XML data you can process Clean up Convert Picture from http://www.dossier-andreas.net/software_architecture/pipe_and_filter.html.

Resource Management – options: Introduce concurrency How about on your project? Maintain multiple copies of data or computations Increase available resources Image from http://blog.ezyang.com/2011/03/petri-net-concurrency/. Concurrency adds a layer of complexity.

Resource Arbitration – example: In reader / writer scheduling… For a shared resource, like a DB table… Why give priority to the readers? Reader/writer lock image from http://swinbrain.ict.swin.edu.au/wiki/Concurrent_Programming_-_Reader_Writer_Lock. Right - Reader / writer concurrency – almost everyone gives priority to readers – Why?

Resource Arbitration – options: Scheduling policy FIFO Fixed-priority semantic importance deadline monotonic rate monotonic Dynamic priority Static scheduling Image from http://cs.nyu.edu/~gottlieb/courses/2000-01-spring/os/chapters/chapter-3.html. Above - Memory allocation algorithm – more complex than you’d think it needs to be?

What about multi-processing? We started this discussion a couple classes ago. I put link out on schedule page, about multicore. A good opportunity to share experience. To begin with, everyone knows that the thing doesn’t run twice as fast on two processors. Now we’re faced with “more processors” being the performance solution provided by hardware…

Multicore issues From the website intro: Scalability-problem, where number of threads increases beyond the number of available cores. Memory-problem can occur in shared memory architecture when data is accessed simultaneously by multiple cores. I/O bandwidth Inter-core communications, OS scheduling support-Inefficient OS scheduling can severely degrade performance.

Cloud issues From the other website intro: the costing/pricing model, which is still evolving from the traditional supercomputing approach of grants and quotas toward the pay-as-you-go model typical of cloud-based services; the submission model, which is evolving from job queuing and reservations toward VM deployment; the bringing of data in and out of the cloud, which is costly and results in data lock-in; and security, regulatory compliance, and various "-ilities" (performance, availability, business continuity, service-level agreements, and so on). - See more at: http://www.computer.org/portal/web/computingnow/archive/september2012#sthash.oVTGvPk1.dpuf

Customer expectations “The tail at scale” article: Even rare performance hiccups affect a significant fraction of all requests in large-scale distributed systems. Eliminating all sources of latency variability in large-scale systems is impractical, especially in shared environments. Using an approach analogous to fault-tolerant computing, tail-tolerant software techniques form a predictable whole out of less predictable parts.

This is the tail that users see Image from http://lejpt.academicdirect.org/A16/151_166.htm.

Performance Engineering – There’s a book on it Image from http://www.perfeng.com/paperndx.htm.