chapter 10 performance and reliability
Download
Skip this Video
Download Presentation
Chapter 10 Performance and Reliability

Loading in 2 Seconds...

play fullscreen
1 / 33

Chapter 10 Performance and Reliability - PowerPoint PPT Presentation


  • 89 Views
  • Uploaded on

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

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'Chapter 10 Performance and Reliability' - rupali


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.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
objectives
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
performance
Performance
  • Performance Measurement: collecting and analyzing data related to how well an application provides its intended service
performance measurement tools
Performance Measurement Tools
  • Tools such as JMeter help to determine throughput by simulating one or more users and reporting performance
throughput and workload
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
throughput and workload6
Throughput and Workload
  • Ideally, throughput = workload
  • When workload exceeds capacity, throughput < workload and transactions are delayed or lost

capacity

workload

Throughput

response time and latency
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
response time and latency8
Response Time and Latency

Network

Server

User

make request

transmit request

response time

latency

transmit response

receive response

capacity planning and tuning
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
tuning thread pool size
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

tuning session time out
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
tuning dns reverse lookup
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

media and compression
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
compression
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
compression16
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)

reliability
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
reliability18
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%
sources of unreliability
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)
points of failure
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
built in redundancy
Built In Redundancy
  • Redundant components eliminate SPOFs
reliable operations
Reliable Operations
  • Reliability also depends on
    • proper operations documentation
    • well-trained administrative / operations staff
    • physical security
    • reliable environment: (electrical power, air coolers, etc.)
testing
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!
characteristics of web applications
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
testing approaches
Testing Approaches
  • Acceptance Testing
  • Compatibility / Configuration Testing
  • Content Testing
  • Functional Testing
  • Interface Testing
  • Performance Testing
  • Security Testing
acceptance testing
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

compatibility configuration testing
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

content testing
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
functional testing
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
interface testing
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
performance testing
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
security testing
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
review
Review
  • Performance, workload, throughput, capacity, response time, latency
  • Web application tuning and performance improvement
  • Compression
  • Improving reliability
  • Testing strategies
ad