Copyright 2003 by SPAN Technologies. Performance Assessments of Internet Systems By Kishore G....

21
Copyright 2003 by SPAN Technologies. Performance Assessments of Internet Systems By By Kishore G. Kamath Kishore G. Kamath SPAN Technologies SPAN Technologies Testing solutions for the enterprise Testing solutions for the enterprise www.spantechnologies.com www.spantechnologies.com [email protected] [email protected] 973-575-7235 973-575-7235
  • date post

    19-Dec-2015
  • Category

    Documents

  • view

    212
  • download

    0

Transcript of Copyright 2003 by SPAN Technologies. Performance Assessments of Internet Systems By Kishore G....

Page 1: Copyright 2003 by SPAN Technologies. Performance Assessments of Internet Systems By Kishore G. Kamath SPAN Technologies Testing solutions for the enterprise.

Copyright 2003 by SPAN Technologies.

Performance Assessments of Internet

Systems

Performance Assessments of Internet

Systems

By By

Kishore G. KamathKishore G. Kamath

SPAN TechnologiesSPAN TechnologiesTesting solutions for the enterpriseTesting solutions for the enterprise

www.spantechnologies.comwww.spantechnologies.com

[email protected]@spantechnologies.com

973-575-7235973-575-7235

Page 2: Copyright 2003 by SPAN Technologies. Performance Assessments of Internet Systems By Kishore G. Kamath SPAN Technologies Testing solutions for the enterprise.

Copyright 2003 by SPAN Technologies.

AgendaAgenda

• Why do Internet systems under perform?Why do Internet systems under perform?

• Performance analysis in the corporate worldPerformance analysis in the corporate world

• How do automated tools work?How do automated tools work?

• Simulating user loadSimulating user load

• Assessing computer systemsAssessing computer systems

Page 3: Copyright 2003 by SPAN Technologies. Performance Assessments of Internet Systems By Kishore G. Kamath SPAN Technologies Testing solutions for the enterprise.

Copyright 2003 by SPAN Technologies.

Performance Considerations for Internet ApplicationsPerformance Considerations for Internet Applications

• Why do Internet applications under-perform?Why do Internet applications under-perform?– Application Design/ImplementationApplication Design/Implementation

» In-efficient database queriesIn-efficient database queries» Poorly written codePoorly written code

• IdentificationIdentification– Simulate light user-loadSimulate light user-load– Measure system metrics on Database / App ServerMeasure system metrics on Database / App Server

» CPU Utilization, Disk I/O and Processor Queue CPU Utilization, Disk I/O and Processor Queue LengthLength

DatabaseDatabaseServerServer

App ServerApp ServerWeb ServerWeb Server

Web UsersWeb Users

Page 4: Copyright 2003 by SPAN Technologies. Performance Assessments of Internet Systems By Kishore G. Kamath SPAN Technologies Testing solutions for the enterprise.

Copyright 2003 by SPAN Technologies.

Performance Considerations for Internet ApplicationsPerformance Considerations for Internet Applications

Courtesy Mercury Interactive CorpCourtesy Mercury Interactive Corp

Page 5: Copyright 2003 by SPAN Technologies. Performance Assessments of Internet Systems By Kishore G. Kamath SPAN Technologies Testing solutions for the enterprise.

Copyright 2003 by SPAN Technologies.

Performance Considerations for Internet ApplicationsPerformance Considerations for Internet Applications

• Why do Internet applications under-Why do Internet applications under-perform?perform?– Unbalanced System TopologyUnbalanced System Topology

» Physical design and topology may be Physical design and topology may be in-efficientin-efficient

» App Server components may not be App Server components may not be co-located on same box.co-located on same box.

• IdentificationIdentification– Simulate moderate user-loadSimulate moderate user-load– Measure system metrics on Database / App Measure system metrics on Database / App

ServerServer» CPU Utilization, Disk I/O and Processor CPU Utilization, Disk I/O and Processor

Queue LengthQueue Length

• Measure network metricsMeasure network metrics– CharacteristicsCharacteristics

» High network loadHigh network load» Moderate CPU UtilizationModerate CPU Utilization

Appserver

Databaseserver

Load balancer

WebServer 2

Page 6: Copyright 2003 by SPAN Technologies. Performance Assessments of Internet Systems By Kishore G. Kamath SPAN Technologies Testing solutions for the enterprise.

Copyright 2003 by SPAN Technologies.

Performance Considerations for Internet ApplicationsPerformance Considerations for Internet Applications

• Why do Internet applications under-perform?Why do Internet applications under-perform?– In-adequate Server/Network CapacityIn-adequate Server/Network Capacity

» Server hardware under equipped to handle Server hardware under equipped to handle software demands.software demands.

» Network pipe to the Internet is too small.Network pipe to the Internet is too small.

• IdentificationIdentification– Simulate anticipated user-loadSimulate anticipated user-load– Measure system metrics on Database / App ServerMeasure system metrics on Database / App Server

» CPU Utilization, Disk I/O and Processor Queue CPU Utilization, Disk I/O and Processor Queue LengthLength

– Measure network metricsMeasure network metrics– CharacteristicsCharacteristics

» High network load / High CPU Utilization, Disk I/O High network load / High CPU Utilization, Disk I/O or Processor Queue Length.or Processor Queue Length.

Page 7: Copyright 2003 by SPAN Technologies. Performance Assessments of Internet Systems By Kishore G. Kamath SPAN Technologies Testing solutions for the enterprise.

Copyright 2003 by SPAN Technologies.

Performance Considerations for Internet ApplicationsPerformance Considerations for Internet Applications

Courtesy Mercury Interactive CorpCourtesy Mercury Interactive Corp

Page 8: Copyright 2003 by SPAN Technologies. Performance Assessments of Internet Systems By Kishore G. Kamath SPAN Technologies Testing solutions for the enterprise.

Copyright 2003 by SPAN Technologies.

Performance analysis in the corporate worldPerformance analysis in the corporate world

• Create a Test Region a scale of productionCreate a Test Region a scale of production

• Simulate user activity using an automated performance tool Simulate user activity using an automated performance tool (Mercury Interactive LoadRunner, Compuware QALoad, Empirix (Mercury Interactive LoadRunner, Compuware QALoad, Empirix E-Load or Segue Silk Performer)E-Load or Segue Silk Performer)

• Use automated tools toUse automated tools to– Record user activityRecord user activity– Replay user activity x number of users to simulate.Replay user activity x number of users to simulate.

• Examine system behavior under simulated loadExamine system behavior under simulated load– Review system metricsReview system metrics– Do root-cause analysis.Do root-cause analysis.

Page 9: Copyright 2003 by SPAN Technologies. Performance Assessments of Internet Systems By Kishore G. Kamath SPAN Technologies Testing solutions for the enterprise.

Copyright 2003 by SPAN Technologies.

How do automated tools work?How do automated tools work?

• How recording worksHow recording works– Capture user activity at a protocol levelCapture user activity at a protocol level– Create a proxy server to capture HTTP requests from Create a proxy server to capture HTTP requests from

a browsera browser– Capture HTTP request components including server Capture HTTP request components including server

target requested and name value pairs.target requested and name value pairs.– Store these HTTP requests into a script.Store these HTTP requests into a script.

Record

HTTP Request

1

Appserver Web

server

Script

Databaseserver

Private

Proxy

name = “jane”

password = “courant”

Page 10: Copyright 2003 by SPAN Technologies. Performance Assessments of Internet Systems By Kishore G. Kamath SPAN Technologies Testing solutions for the enterprise.

Copyright 2003 by SPAN Technologies.

How do automated tools work?How do automated tools work?

• How replay and analysis workHow replay and analysis work– Make HTTP requests stored in script.Make HTTP requests stored in script.– Replace pivotal values in name-value pairs with other Replace pivotal values in name-value pairs with other

values.values.» Prevent caching from making results optimistic.Prevent caching from making results optimistic.

Replay

HTTP Request

Appserver Web

server

Script

Databaseserver

Script

Script

name = “jane”

password = “courant”

name = “harry”

password = “edu”

name = “john”

password =NYU”

Page 11: Copyright 2003 by SPAN Technologies. Performance Assessments of Internet Systems By Kishore G. Kamath SPAN Technologies Testing solutions for the enterprise.

Copyright 2003 by SPAN Technologies.

How do automated tools work?How do automated tools work?

• How replay and analysis workHow replay and analysis work– Server cannot tell apart a script replay from a real-user Server cannot tell apart a script replay from a real-user

request.request.– Multiple instances of script execution can simulate Multiple instances of script execution can simulate

multiple users.multiple users.» Instances can simulate increasing, decreasing, Instances can simulate increasing, decreasing,

steady-state or random user load.steady-state or random user load.– HTTP requests and server response and behavior HTTP requests and server response and behavior

metrics can be monitored and collated.metrics can be monitored and collated.– Correlations between requests and behavior can be Correlations between requests and behavior can be

analyzed.analyzed.

Page 12: Copyright 2003 by SPAN Technologies. Performance Assessments of Internet Systems By Kishore G. Kamath SPAN Technologies Testing solutions for the enterprise.

Copyright 2003 by SPAN Technologies.

6

Putting it all Together

Databaseserver

Appservers

Webservers

LR CONTROLLER

LOAD GENERATOR 2

(NY)

LRANALYSIS

LOAD GENERATOR 1

(SF)

1.Control desk.

2.Load Simulator Machine 1 3.Analysis Tool

Load Simulator Machine 2

Performance metrics

LoadRunner Installation: Review

Page 13: Copyright 2003 by SPAN Technologies. Performance Assessments of Internet Systems By Kishore G. Kamath SPAN Technologies Testing solutions for the enterprise.

Copyright 2003 by SPAN Technologies.

Performance analysisPerformance analysis

• Light loadLight load– Load is less than 10% of expected load.Load is less than 10% of expected load.– Review of transaction response times and Review of transaction response times and

server/network metricsserver/network metrics» High response time coupled with high Disk I/O or High response time coupled with high Disk I/O or

CPU Utilization is indicative of bad code/queries.CPU Utilization is indicative of bad code/queries.

Page 14: Copyright 2003 by SPAN Technologies. Performance Assessments of Internet Systems By Kishore G. Kamath SPAN Technologies Testing solutions for the enterprise.

Copyright 2003 by SPAN Technologies.

Performance analysisPerformance analysis

Courtesy Mercury Interactive CorpCourtesy Mercury Interactive Corp

Page 15: Copyright 2003 by SPAN Technologies. Performance Assessments of Internet Systems By Kishore G. Kamath SPAN Technologies Testing solutions for the enterprise.

Copyright 2003 by SPAN Technologies.

Performance analysisPerformance analysis

• Steady state 100% loadSteady state 100% load– Review of server/network metricsReview of server/network metrics

» Increasing trend indicates an issueIncreasing trend indicates an issue» Memory leaks can be determinedMemory leaks can be determined

Courtesy Mercury Interactive CorpCourtesy Mercury Interactive Corp

Page 16: Copyright 2003 by SPAN Technologies. Performance Assessments of Internet Systems By Kishore G. Kamath SPAN Technologies Testing solutions for the enterprise.

Copyright 2003 by SPAN Technologies.

Performance analysisPerformance analysis

• Capacity PlanningCapacity Planning– Increasing load past expected load levelsIncreasing load past expected load levels

» Review of response times and server/network Review of response times and server/network metricsmetrics

• Response time under expected and future Response time under expected and future load.load.

• Server/network utilization under expected Server/network utilization under expected and future loadand future load

Courtesy Mercury Interactive CorpCourtesy Mercury Interactive Corp

Page 17: Copyright 2003 by SPAN Technologies. Performance Assessments of Internet Systems By Kishore G. Kamath SPAN Technologies Testing solutions for the enterprise.

Copyright 2003 by SPAN Technologies.

Performance analysisPerformance analysis

Courtesy Mercury Interactive CorpCourtesy Mercury Interactive Corp

Page 18: Copyright 2003 by SPAN Technologies. Performance Assessments of Internet Systems By Kishore G. Kamath SPAN Technologies Testing solutions for the enterprise.

Copyright 2003 by SPAN Technologies.

Comparative studiesComparative studies

• Run load under 2 different conditionsRun load under 2 different conditions– ExampleExample

» With and without SSL.With and without SSL.» Two different server hardware configurations.Two different server hardware configurations.» Two different configuration settingsTwo different configuration settings

• Compare response times and metrics to study Compare response times and metrics to study impact of changeimpact of change– Used for tuning, benchmarking.Used for tuning, benchmarking.

Page 19: Copyright 2003 by SPAN Technologies. Performance Assessments of Internet Systems By Kishore G. Kamath SPAN Technologies Testing solutions for the enterprise.

Copyright 2003 by SPAN Technologies.

10

Load Balancing Systems Rely on the IP Address of the Client

Virtual users with IP Spoofer

200.37.66.9

144.100.105.88

103.14.255.200

Requests from200.37.66.9go to AppServer 1

Requests from144.100.105.88

go to AppServer 3

Requests from103.14.255.200

go to App Server 2

Load balancing system

Routers

Databases

Application servers

Web server

IP Spoofing

Courtesy Mercury Interactive CorpCourtesy Mercury Interactive Corp

Page 20: Copyright 2003 by SPAN Technologies. Performance Assessments of Internet Systems By Kishore G. Kamath SPAN Technologies Testing solutions for the enterprise.

Copyright 2003 by SPAN Technologies.

IP based load-balancingIP based load-balancing

• Load re-directors will send load from one IP address Load re-directors will send load from one IP address to the same web server.to the same web server.

• Load simulation would need to use different IP Load simulation would need to use different IP addresses to simulate multiple usersaddresses to simulate multiple users

• Load simulator will spoof IP Addresses not in use Load simulator will spoof IP Addresses not in use when making requests to the server.when making requests to the server.– Max of 25-8192 IP addresses per Network card Max of 25-8192 IP addresses per Network card

depending upon OS.depending upon OS.

• Load balancer uses IP address to direct load to Load balancer uses IP address to direct load to appropriate web-server based on hashing algorithmappropriate web-server based on hashing algorithm

• Server host alias file re-points IP addresses back to Server host alias file re-points IP addresses back to the true load simulator IP address.the true load simulator IP address.

Page 21: Copyright 2003 by SPAN Technologies. Performance Assessments of Internet Systems By Kishore G. Kamath SPAN Technologies Testing solutions for the enterprise.

Copyright 2003 by SPAN Technologies.

SummarySummary

• Performance assessments of Internet systems Performance assessments of Internet systems are achieved via simulation.are achieved via simulation.

• Automated tools can create realistic load by Automated tools can create realistic load by simulating HTTP requests while changing data.simulating HTTP requests while changing data.

• Correlation of system metrics with level of load Correlation of system metrics with level of load can identify performance issues and their root can identify performance issues and their root cause.cause.