Top Banner
“Load Testing Early and Often” By Donald Doane Presentation to the Rockville MDCFUG
36

“Load Testing Early and Often” By Donald Doane Presentation to the Rockville MDCFUG.

Jan 04, 2016

Download

Documents

Ross Foster
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: “Load Testing Early and Often” By Donald Doane Presentation to the Rockville MDCFUG.

“Load Testing Early and Often”

By Donald Doane

Presentation to theRockville MDCFUG

Page 2: “Load Testing Early and Often” By Donald Doane Presentation to the Rockville MDCFUG.

2

Session Overview

OpenDemand Systems

• Introduction to Load Testing Web Applications

• Testing from Development to Deployment

• Load Testing Over the LAN vs. the Internet

• Creating a Real-World Example in ColdFusion

• Load Testing Best Practices

• Identifying Common Performance Bottlenecks

• ColdFusion Performance Tuning Hints and Tips

• Questions & Answers

Page 3: “Load Testing Early and Often” By Donald Doane Presentation to the Rockville MDCFUG.

3

The ColdFacts

OpenDemand Systems

• Most developers are familiar with the “concept”

of load testing, but very few actually do it!

• Most common reasons for not testing are Time,

Complexity & Cost ($$$ can be very expensive)

• Most sites run into performance problems with

only a few users (you don’t have to be Victoria’s

Secret)

• Most performance problems are discovered too

late in the game to properly address the issues

Page 4: “Load Testing Early and Often” By Donald Doane Presentation to the Rockville MDCFUG.

4

What is a Load Test?

OpenDemand Systems

• Simulates multiple users to measure, define, validate and maintain optimal application performance, scalability and reliability

• Serves as a compass for understanding the limits of any Web-enabled application and, subsequently, for managing its performance and growth

Page 5: “Load Testing Early and Often” By Donald Doane Presentation to the Rockville MDCFUG.

5

Why Load Test from Development to Deployment?

OpenDemand Systems

Identifies problems early on before they become costly to resolve (avoid the pyramid effect) Prevents the “Onion-Peel” syndrome Reduces development cycles Produces better quality, more scalable code Prevents revenue and credibility loss due to poor Web site performance Increases customer satisfaction and retention Enables intelligent planning for future expansion

Page 6: “Load Testing Early and Often” By Donald Doane Presentation to the Rockville MDCFUG.

6

What does it mean for your site to perform or scale well?

OpenDemand Systems

• Delivers page views to users in 8 seconds or less (industry standard)• Performs consistently across multiple page view requests (avoid the wack-o-mole effect)• Response times scale linearly as user load increases as opposed to exponentially

Page 7: “Load Testing Early and Often” By Donald Doane Presentation to the Rockville MDCFUG.

7

Virtual User Simulation

OpenDemand Systems

• One-to-many relationship between user and browser requests• Browser opens multiple concurrent connections to Web server• HTTP Request-Response Thread:

GET / HTTP/1.1Host: www.mysite.com-------------------------------HTTP/1.1 200 OKContent-Length: 327Content-type: text/html

[BODY]

Page 8: “Load Testing Early and Often” By Donald Doane Presentation to the Rockville MDCFUG.

8

OpenDemand Systems

Your Browser

Your Web Site/App

VirtualUsers

VirtualUsers

OpenLoad Appliance

Virtual Users

Page 9: “Load Testing Early and Often” By Donald Doane Presentation to the Rockville MDCFUG.

9

Load Testing over the LAN vs. the Internet

OpenDemand Systems

LAN Testing: Eliminates network variability due to the Internet Saturates system rather than the network

Internet Testing: Uncovers hidden delays due to Internet weather Exercises your pipe, routers, firewalls and load balancers in addition to the system under test Ensures Service Providers are meeting SLAs

Page 10: “Load Testing Early and Often” By Donald Doane Presentation to the Rockville MDCFUG.

10

Load Testing Do’s

OpenDemand Systems

Do test early and do test often Do establish what is and is not acceptable performance for your application Do test from the user’s perspective - it’s the only one that counts Do baseline and compare your findings Do monitor your system while you test Do test whenever there’s a change in your site’s content, code or infrastructure

Page 11: “Load Testing Early and Often” By Donald Doane Presentation to the Rockville MDCFUG.

11

Load Testing Don’ts

OpenDemand Systems

Don’t wait until the last minute to test Don’t depend on your customers to do your testing for you Don’t test under unrealistic conditions Don’t forget that increases in table sizes, disk usage and network traffic will degrade your application’s performance over time Don’t be so quick to throw hardware at the problems you turn up - it doesn’t always help

Page 12: “Load Testing Early and Often” By Donald Doane Presentation to the Rockville MDCFUG.

12

Creating a Real-World Example in ColdFusion

OpenDemand Systems

Customer Case Study: Set up a User Profile Configure a Load Test Scenario Schedule a Load Test Analyze Test Results

Page 13: “Load Testing Early and Often” By Donald Doane Presentation to the Rockville MDCFUG.

13

OpenDemand Systems

Page 14: “Load Testing Early and Often” By Donald Doane Presentation to the Rockville MDCFUG.

14

OpenDemand Systems

Page 15: “Load Testing Early and Often” By Donald Doane Presentation to the Rockville MDCFUG.

15

OpenDemand Systems

Page 16: “Load Testing Early and Often” By Donald Doane Presentation to the Rockville MDCFUG.

16

OpenDemand Systems

Page 17: “Load Testing Early and Often” By Donald Doane Presentation to the Rockville MDCFUG.

17

OpenDemand Systems

Page 18: “Load Testing Early and Often” By Donald Doane Presentation to the Rockville MDCFUG.

18

OpenDemand Systems

Page 19: “Load Testing Early and Often” By Donald Doane Presentation to the Rockville MDCFUG.

19

OpenDemand Systems

Page 20: “Load Testing Early and Often” By Donald Doane Presentation to the Rockville MDCFUG.

20

OpenDemand Systems

Page 21: “Load Testing Early and Often” By Donald Doane Presentation to the Rockville MDCFUG.

21

OpenDemand Systems

Page 22: “Load Testing Early and Often” By Donald Doane Presentation to the Rockville MDCFUG.

22

OpenDemand Systems

Page 23: “Load Testing Early and Often” By Donald Doane Presentation to the Rockville MDCFUG.

23

OpenDemand Systems

Page 24: “Load Testing Early and Often” By Donald Doane Presentation to the Rockville MDCFUG.

24

OpenDemand Systems

Page 25: “Load Testing Early and Often” By Donald Doane Presentation to the Rockville MDCFUG.

25

OpenDemand Systems

Page 26: “Load Testing Early and Often” By Donald Doane Presentation to the Rockville MDCFUG.

26

OpenDemand Systems

Page 27: “Load Testing Early and Often” By Donald Doane Presentation to the Rockville MDCFUG.

27

OpenDemand Systems

Page 28: “Load Testing Early and Often” By Donald Doane Presentation to the Rockville MDCFUG.

28

OpenDemand Systems

Page 29: “Load Testing Early and Often” By Donald Doane Presentation to the Rockville MDCFUG.

29

OpenDemand Systems

Page 30: “Load Testing Early and Often” By Donald Doane Presentation to the Rockville MDCFUG.

30

OpenDemand Systems

Page 31: “Load Testing Early and Often” By Donald Doane Presentation to the Rockville MDCFUG.

31

OpenDemand Systems

Page 32: “Load Testing Early and Often” By Donald Doane Presentation to the Rockville MDCFUG.

32

Identifying Common Performance Bottlenecks

OpenDemand Systems

Over design of Web pages (too many graphics) Bad code (avoid recursive function calls) Web server connection limit too low (IIS is set to 10 by default) Poorly tuned Web application server (play with your Administration Server Settings) Excessive queue lengths (more than one) & wait times (more than a few milliseconds) Memory contention issues (paging in) Heavy disk I/O (high service times) Network latency (packet collisions & lost)

Page 33: “Load Testing Early and Often” By Donald Doane Presentation to the Rockville MDCFUG.

33

Performance Tuning Hints & Tips

OpenDemand Systems

Observe design & coding best practices (Fusebox) Pre-load images before they are needed Validate on the client whenever possible (JavaScript or ActionScript) Strip formatting white space, tabs, carriage returns and line feeds from HTML (speeds up response) Upgrade to CF5 (Up to 5x faster than CF4.5) Tune simultaneous requests per CPU (cfstat) Turn on “Trusted Cache” & increase cache size Restart server at 5-10 unresponsive requests

Page 34: “Load Testing Early and Often” By Donald Doane Presentation to the Rockville MDCFUG.

34

Performance Tuning Hints & Tips Cont’d

OpenDemand Systems

Log slow pages (remember 8-second rule) Enable Debugging (check processing time) Replace frequently referenced Custom Tags with User Defined Functions (less overhead) Bump up your cached query limit (if you can spare the memory) Let ColdFusion work smarter and your Database work harder (write smart SQL - don’t do SELECT *) Use stored procedures for faster execution

Page 35: “Load Testing Early and Often” By Donald Doane Presentation to the Rockville MDCFUG.

35

Test your app for FREE

OpenDemand Systems

Register at http://www.opendemand.com/cf/ Test for up to 5 virtual users for FREE!

Try-out performance tuning tips

Test again and compare results to your baseline

Page 36: “Load Testing Early and Often” By Donald Doane Presentation to the Rockville MDCFUG.

36

OpenDemand Systems

Q&A

[email protected]

http://www.opendemand.com