1 / 33

Chapter 10 Performance and Reliability

Chapter 10 Performance and Reliability. Objectives. Explain performance, workload, throughput, capacity, response time, and latency Describe a process for tuning a web application and explain strategies for improving performance Explain how text compression is encoded

rupali
Download Presentation

Chapter 10 Performance and Reliability

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Chapter 10Performance and Reliability

  2. Objectives • Explain performance, workload, throughput, capacity, response time, and latency • Describe a process for tuning a web application and explain strategies for improving performance • Explain how text compression is encoded • Explain sources of unreliability and how to improve reliability • Explain several testing strategies

  3. Performance • Performance Measurement: collecting and analyzing data related to how well an application provides its intended service

  4. Performance Measurement Tools • Tools such as JMeter help to determine throughput by simulating one or more users and reporting performance

  5. Throughput and Workload • Throughput: the number of transactions processed per unit of time • e.g., 1000 transactions/minute • Workload: the number of transactions that need to be processed, per unit of time • Ex: A server receives 500 transactions / minute, but is able to process only 80% of that load • workload: 500 transactions / minute • throughput: 400 transactions / minute

  6. Throughput and Workload • Ideally, throughput = workload • When workload exceeds capacity, throughput < workload and transactions are delayed or lost capacity workload Throughput

  7. Response Time and Latency • Response Time: the time required by a server to process one transaction • Latency: the time required to process a request, as perceived by the user • Latency includes network delay as well as response time

  8. Response Time and Latency Network Server User make request transmit request response time latency transmit response receive response

  9. Capacity Planning and Tuning • Capacity Planning: the process of estimating the expected workload of an application, and ensuring that the design has adequate capacity • Tuning: the process of changing the configuration of a server or application to increase capacity

  10. Tuning Process

  11. Tuning: Thread Pool Size • Thread Pool Size: servers reuse threads to handle concurrent requests • More threads => higher capacity, but less memory per thread, increasing response time • Experimentation determines the best size Memory Available Per Thread Capacity for Concurrent Requests Number of Threads

  12. Tuning: Session Time-Out • Sessions are created when clients first contact the server • Sessions expire automatically after the specified time-out period (e.g., 5-30 min) • Longer time-out => more sessions stored on the server, more memory used • Shorter time-out => less convenience for users

  13. Tuning: DNS Reverse Lookup • Web servers may keep a log of incoming transactions, including the source URL of each transaction • This requires translating IP address from an incoming transaction to a URL via reverse DNS lookup • Eliminating the DNS lookup reduces the server workload DNS lookup HTTP transaction

  14. Media and Compression • Most media formats (jpeg, mpeg, mp3, etc.) include compression to reduce the size of media files • Increased media size and quality increase response time and latency • Media should be sized as small as possible given the quality targets of the application

  15. Compression • HTML can also be compressed • Compression is controlled by HTTP headers: • Accept-Encoding: request header specifying which compression encodings the client understands • Content-Encoding: response header specifying which encoding was used

  16. Compression HTTP Request GET /test.html HTTP/1.1 Host: localhost Accept-Encoding: gzip,deflate HTTP/1.x 200 OK … Content-Type: text/html Content-Length: 1088 Date: Fri, 29 Feb 2008 13:15:27 GMT ... uncompressed content (1088 bytes) ... HTTP/1.1 200 OK … Content-Type: text/html Transfer-Encoding: chunked Content-Encoding: gzip Date: Fri, 29 Feb 2008 13:12:31 GMT f5 ... compressed content (245 bytes) ... 0 Uncompressed Response Compressed Response (size indicated in hex, xf5 = 245)

  17. Reliability • Reliability: the ability of a system to meet its performance target over time • the target may be less than 100% availability • Availability: the percentage of time during which a system is available • Outage: the period of time during which a system is not available

  18. Reliability • Example: A system has a performance target of 98% availability over any 24-hour day • Daily availability figures for 5 days: • 99%, 100%, 95%, 98%, 100% • Reliability over 5 days = 4 / 5 = 80%

  19. Sources of Unreliability • External Network • Internal Network • Server Platform • Application Software (including database) • External Agents (on which a dependency exists, e.g., a credit-card processing agent) • Internal Environment (power, air, security)

  20. Points of Failure • Single Point of Failure (SPOF): any system component, the failure of which can cause the entire system to fail • SPOFs can be eliminated through: • standby component (or service): an idle component that can be inserted in place of a failed component • replicated component (or service): one of a set of components that work in parallel so that if one fail, the others continue to share the workload

  21. Built In Redundancy • Redundant components eliminate SPOFs

  22. Reliable Operations • Reliability also depends on • proper operations documentation • well-trained administrative / operations staff • physical security • reliable environment: (electrical power, air coolers, etc.)

  23. Testing • The purpose of software testing is not show that a system works, but rather to find the errors in a system • There are always errors!

  24. Characteristics of Web Applications • Content-intensive: a great deal of information • Multiple, dynamic user configurations (web browsers) • Multiple layers (client, server, application, database) • Dependent on external networks

  25. Testing Approaches • Acceptance Testing • Compatibility / Configuration Testing • Content Testing • Functional Testing • Interface Testing • Performance Testing • Security Testing

  26. Acceptance Testing • Evaluate user satisfaction with the system • Strategies: • Present prototypes during early development • Alpha testing: users test a nearly complete system, in a mock environment • Beta testing: users test a completed system, in a trial environment Web Application

  27. Compatibility/Configuration Testing • Find instances of software incompatibility • especially due to client (web browser) differences and configuration • Strategies: • setup virtual machinesfor different browsers • test multiple versionsof each browser • test plugins (e.g.,)PDF reader IE7 Safari Web Application Firefox Opera IE8

  28. Content Testing • Find errors in web pages, documents, or data that users will see • Strategies: • Automated spell-checking, grammar-checking • Continuous content review by production staff

  29. Functional Testing • Find instances of a component failing to perform in accordance with specifications • Strategies: • Black-box testing: test each specification • White-box testing: test each bit of code • Error injection: force errors in order to test error-handling mechanisms • Use testing tools • Maintain a test suite that can be used repeatedly • Regression testing: test new versions against old versions

  30. Interface Testing • Ensure that users can effectively use the application and that appropriate help and guidance are provided • Strategies: • Check hyperlinks for correct navigation • Check that all help functions are correct and appropriate for the user • Check all error responses • Ask selected users to try the application and record their performance and reactions

  31. Performance Testing • Determine if the application has the capacity to support the expected workload • Strategies: • Establish peak and average capacity expectations • Use performance measurement tools to place the application under the expected loads • Place the application under increasing load until it fails (stress testing), to determine the maximum capacity

  32. Security Testing • Determine if the application is vulnerable to know attacks • Strategies: • Establish a threat model during development • Use common documented attack strategies against the system to search for vulnerabilities

  33. Review • Performance, workload, throughput, capacity, response time, latency • Web application tuning and performance improvement • Compression • Improving reliability • Testing strategies

More Related