7 Performance Testing
7 Performance Testing
Performance Testing
Agenda
1. 1.Performance PerformanceTest TestPlanning Planning 2. 2.Performance PerformanceTest Test Execution Execution 3. 3.Performance PerformanceAnal Anal sis! sis!Tuning Tuning
Scalability refers to the ability to handle additional workload, without Throughput is the number or re"uests that can be served by your
application per unit time#
adversely affecting performance, by adding resources such as P!, memory and storage capacity
P!,
Server )atency *
is the time the server takes to complete the e+ecution of a re"uest# Server latency does not include network latency ,additional time that it takes for a re"uest and a response to cross a network#-
#ntroduction
.hen designing an application that will be accessed over the &nternet, development teams must keep in mind that hundreds of thousands of users could concurrently access the application# This concurrent user load could%
place tremendous stress upon a system ,resource usage-, cause une+pected delays, and result in a poor user e+perience#
/owever, if the application has been ade"uately tested and tuned for optimal performance under stress, managers and software developers will be confident that their code will perform at optimal levels and have the necessary data to plan site capacity needs#
7+amples of poor planning are e*commerce .eb applications that can<t handle the peak holiday shopping rush# $esult is lost sales, and bad press as well#
Performance o*+ecti(es
Performance objectives are usually specified in terms of the following%
1. 0es$onse time# $esponse time is the amount of time that it takes for a server to respond to a re"uest# 1. T&roug&$ut# Throughput is the number of re"uests that can be served by your application per unit time# Throughput is fre"uently measured as re"uests or logical transactions per second# 1. )or"load# .orkload includes the total number of users and concurrent acti#e users, data volumes, and transaction volumes 1. 0esource utili1ation# $esource utilization is the measure of how much server and network resources are consumed by your application# $esources include P!, memory, disk &'(, and network &'(# 0# ?uture performance growth re"uirements
Software 5ogic
1epending on !ser Dandwidth ,EFk, 03Gk, 3EFk, etc-, /ardware , P!, $82, /11 space-
all things being e%ual, a 70$kilobyte page will obviously load faster on a &'($kbps )*+ connection than on a &, ,$kbps modem connection -he response time acceptability for your &, ,$kbps modem might be 1' seconds, while the &'($kbps )*+ connection might be significantly less, at ' seconds
Predicted Connection Speeds User Line Speed Latenc# Worst Connection 28.8-kbps modem !$$$ mi%%iseconds Average Connection 256-kbps SL !$$ mi%%iseconds Best Connection !.5-mbps "! 5$ mi%%iseconds
0#H second
is the limit for the user<s flow of thought to stay uninterrupted, even though the user will notice the delay# 9ormally, no special feedback is necessary during delays of more than H#0 but less than 0#H second, but the user does lose the feeling of operating directly on the data#
0H seconds
is the limit for keeping user attention focused on the screen dialogue# ?or longer delays, users will want to perform other tasks while waiting for the computer to finish, so they should be given feedback indicating when the computer is likely to be done# ?eedback during the delay is especially important if the response time is likely to be highly variable, since users will then not know what to e+pect#
Anal sis of an *ottlenec"s in the environment should be provided% A$$lication :etwor" Anal sis Network Latency the time it takes for a data packet to move across a network connection# Network roundtrips each image, style sheet, or other page element defined in the response to your re"uest ,from the .eb server- is counted as a separate network round trip# 8dditional round trips are involved in the setup of each connection to the .eb server Data transferred kilobits per second and kilobytes of data transferred Ser(er 0esource Usage Anal sis Memory usage CPU usage HDD space -ode Performance Anal sis Shows you where your application e+ecution time or memory is being utilized ,in which class or methodS;5 <ata*ase Anal sis Poorly written "ueries