Вы находитесь на странице: 1из 24

Copyright 2016 Optymyze Pte. Ltd. All Rights Reserved. Confidential Information.

Performance Testing
Fundamentals
Part1 - Methodology

Stefan Popa, Performance Analyst

Copyright 2016 Optymyze Pte. Ltd. All Rights Reserved. Confidential Information.
What is it

Performance measures how fast and efficiently a


software system can complete certain computing
tasks.
Scalability measures the trend of performance
with increasing load.
Performance testing is about testing that a
system accomplishes its designated functions
within given constraints regarding response
time, throughput rate, measurement of resource
utilization, error rate measurement, capacity
testing.
Copyright 2016 Optymyze Pte. Ltd. All Rights Reserved. Confidential Information.
Goals
Access production readiness
Evaluate system against performance criteria
Discover what parts of the application perform poorly
and under what conditions
Finding the source of performance problems
Compare two platforms to compare which performs
better (benchmark)
Compare performance characteristics of a system
configuration
Support system tuning

Copyright 2016 Optymyze Pte. Ltd. All Rights Reserved. Confidential Information.
Why it is so important
Most users click away after 8 seconds of delay
4.4 billion business revenue loss due to poor web
applications performance
Aberdeen found that inadequate performance could
impact revenue up to 9%
Business performance begins to suffer at 5.1 seconds
of delay in response time for web applications and 3.9
for critical applications.
An additional second of waiting on a website has a big
impact on customer satisfaction
https://www.websitemagazine.com/blog/5-reasons-visitors-leave-your-website

https://blog.kissmetrics.com/loading-time

http://www.hobo-web.co.uk/your-website-design-should-load-in-4-seconds/

https://blog.kissmetrics.com/wp-content/uploads/2011/04/loading-time-lrg.jpg

Copyright 2016 Optymyze Pte. Ltd. All Rights Reserved. Confidential Information.
Copyright 2016 Optymyze Pte. Ltd. All Rights Reserved. Confidential Information.
What do we need
Stable build free from all major
functional defects
Performance environment similar to
production environment
Complete understanding and knowledge
of the application from business point of
view
Conduct performance testing before
going live
Copyright 2016 Optymyze Pte. Ltd. All Rights Reserved. Confidential Information.
How
Identify Testing Environment
a replica of production environment

Configure Environment
Setup environment. Metrics, Monitoring and other tools

Identify Performance Acceptance Criteria


identify the response time, throughput, resource utilization, constraints.

Plan and Design Test


Identify user test scenarios based on importance, frequency and impact

Implement Test Design


Scripting of user test scenarios using performance tools

Execute Tests
Analyze, Report and Retest
Analyze the executed tests results, report to stakeholders and retest if the tests were not passed previous
iteration

Copyright 2016 Optymyze Pte. Ltd. All Rights Reserved. Confidential Information.
Identify testing environment
Environment hosting
Dedicated server
Virtualized/VPS (Vmware ESXi, Xen, etc)
Cloud (AWS, Azure, etc)
Layered topology
FrontEnd
Web Server / Load balancer (Apache / NGINX)
Application Server (IIS, JBoss, glassfish, etc)
BackEnd
Application Server (IIS, Jboss, glassfish, etc)
Database (Oracle RDBMS, SQL Server, mysql, etc)
Third party, Payment manager, etc

Copyright 2016 Optymyze Pte. Ltd. All Rights Reserved. Confidential Information.
Configure environment
Clients working infrastructure
Application server tuning
Network issues
Data compression
Memory allocation
Threads/pools
Database server tuning
Best practices or DBA expertise

Copyright 2016 Optymyze Pte. Ltd. All Rights Reserved. Confidential Information.
What are the metrics?
CPU
user
system
wait
hi & si (IRQ)
Memory
used
buffer
cache
swap
I/O
Bytes Write or Read /sec
IOPS degradation (cluster)
Network
RX / TX
http://blog.scoutapp.com/articles/2015/02/24/understanding-linuxs-cpu-stats

Copyright 2016 Optymyze Pte. Ltd. All Rights Reserved. Confidential Information.
System monitoring
Useful to analyze data later in case of failure
Live monitoring during test execution
no interface: dstat, iostat, mpstat, nmon
with GUI: perfmon, grafana, nagios,

Copyright 2016 Optymyze Pte. Ltd. All Rights Reserved. Confidential Information.
System Monitoring - Grafana

Copyright 2016 Optymyze Pte. Ltd. All Rights Reserved. Confidential Information.
Identify Performance
Acceptance Criteria
Response time. For example, the product catalog must be displayed in
less than three seconds.
Throughput. For example, the system must support 25 book orders per
second.
Resource utilization. For example, processor utilization is not more than
75 percent. Other important resources that need to be considered for
setting objectives are memory, disk input/output (I/O), and network I/O.
Consider the following key points when identifying performance criteria:
Business requirements
User expectations
Contractual obligations
Regulatory compliance criteria and industry standards
Service Level Agreements (SLAs)
Resource utilization targets
Copyright 2016 Optymyze Pte. Ltd. All Rights Reserved. Confidential Information.
Plan and Design Tests

Greenfield
Create scenarios based on business-risk
Establish new possible scenarios based on
other existing clients

Migration
Analyze clients previous data (logs/db)
Analyze history of support issues
Discuss with clients Management team
Copyright 2016 Optymyze Pte. Ltd. All Rights Reserved. Confidential Information.
Build test scenarios Implement test
design
Create the actions

Set the goals (expected latencies)


Copyright 2016 Optymyze Pte. Ltd. All Rights Reserved. Confidential Information.
Build test scenarios execution & measure

1st manual execution/measurement


2nd automatic
Validate
3rd increase
Repeat 3

Copyright 2016 Optymyze Pte. Ltd. All Rights Reserved. Confidential Information.
Build test scenarios multiple iterations
Raise limit to clients expected load

Copyright 2016 Optymyze Pte. Ltd. All Rights Reserved. Confidential Information.
Execute Tests - Overview
Warm up
Ramp up / ramp down
Full Load

Copyright 2016 Optymyze Pte. Ltd. All Rights Reserved. Confidential Information.
Analyze & report
Extract test results (manual or plugins)
Interpret test results
Report results*
Development target technical
Management target summary
Release notes very light

https://www.blazemeter.com/blog/what-include-load-test-report-technical-vs-management-reports

Copyright 2016 Optymyze Pte. Ltd. All Rights Reserved. Confidential Information.
Analyze results

Find issues that fail the performance


acceptance criteria agreed above. Ex:
Big load times/ latencies (ex: above 4 sec)
High CPU usage (ex: above 80% user)
Various bottlenecks (even without high CPU
usage or huge latencies, the throughput is
below the negotiated criteria)
Other issues may appear (ex: memory
leaks, process crashes, etc.)
Copyright 2016 Optymyze Pte. Ltd. All Rights Reserved. Confidential Information.
Retest!
New issues may appear

Copyright 2016 Optymyze Pte. Ltd. All Rights Reserved. Confidential Information.
Next week

Elements of statistics (how to


analyze data and not get fooled by it)
Metric analysis
Profiling (further analysis)
System topology
Database analysis
Application profiling

Copyright 2016 Optymyze Pte. Ltd. All Rights Reserved. Confidential Information.
Copyright 2016 Optymyze Pte. Ltd. All Rights Reserved. Confidential Information.

Вам также может понравиться