Performance Testing

Performance testing validates that software meets its timeliness requirements under realistic workloads. Unlike functional testing — which checks correctness — performance testing checks whether “correct answers” arrive fast enough to be useful [1].

“Testing for performance is not given the consideration that its importance deserves as part of the application’s entire life cycle.” — Molyneaux (2009) [2]


Testing Maturity Model

Molyneaux defines three maturity levels [2]:

Level Name Approach Defect Escape Rate
1 Firefighting React to production incidents High (unknown)
2 Performance Validation Test before release ~30%
3 Performance Driven Engineer throughout lifecycle ~5%

Moving from level 2 to level 3 — integrating performance awareness from requirements through deployment — reduces production defect escape by .


Six Types of Performance Tests

Each test type serves a distinct purpose [2]:

Type Purpose When to Use
Baseline Single user, empty system — establish comparison point Before any load testing
Load Target concurrency to verify SLA compliance Every release
Stress Overwhelm resources to find the “buckle point” Capacity planning
Soak / Stability Extended duration to reveal memory leaks and slow degradation Before production
Smoke Quick check of changed code only After each build
Isolation Repeated execution of specific transactions Diagnosing known issues

Test Types Mapped to Goals

graph TD
    B["Baseline<br>1 user, empty system"]
    L["Load Test<br>Target concurrency"]
    ST["Stress Test<br>Beyond capacity"]
    SK["Soak Test<br>Extended duration"]
    SM["Smoke Test<br>Changed code only"]
    I["Isolation Test<br>Single transaction"]

    B -->|"establishes"| L
    L -->|"push beyond"| ST
    L -->|"extend time"| SK
    SM -->|"quick gate"| L
    L -->|"diagnose"| I

    style B fill:#4CAF50,color:#fff
    style L fill:#2196F3,color:#fff
    style ST fill:#d32f2f,color:#fff
    style SK fill:#FF9800,color:#fff
    style SM fill:#9C27B0,color:#fff
    style I fill:#607D8B,color:#fff

The Testing Process

Multiple frameworks converge on a structured multi-phase approach:

Liu’s 8-Step Process

[3]

  1. Workload design — Define from customer requirements / SLAs
  2. Script/tool development — Create automated drivers
  3. Hardware selection — 2–4× QA system capacity
  4. Environment setup — Realistic data volumes
  5. Procedure definition — Repeatable (server restart protocols, warm-up)
  6. Baseline establishment — Optimal configuration as yardstick
  7. Bottleneck analysis — Queuing theory + performance counters
  8. Optimization/tuning — Remove identified bottlenecks

Jiang’s 3-Phase Framework

A survey of 147 papers identifies three fundamental phases [4]:

Phase Activities Techniques
Load Design Define workload: realistic vs fault-inducing Markov chains, UML diagrams, genetic algorithms
Execution Drive workload against system HP LoadRunner, JMeter, WebLoad, emulation
Analysis Evaluate recorded behavior Threshold verification, pattern matching, anomaly detection

Execution Phases (Everett)

Each individual test run follows three phases [1]:

  1. Ramp-up to peak — Stagger user sessions; often reveals memory/thread allocation issues
  2. Measurement at peak — Timing under full planned workload
  3. Ramp-down from peak — Verify correct resource release

Many systems fail during ramp-up, not at peak. Resource allocation (memory, threads) is often more taxing than steady-state transaction processing [1].


Workload Design

Key Principles

  • The number of key transactions rarely exceeds 20 [2]
  • Focus on workloads and frequencies, not individual input values [5]
  • Measure active users (open sessions), not concurrent users (simultaneous requests) [1]
  • Add 10% safety margin above go-live concurrency target [2]

The 93% Concentration Rule

Weyuker found that 93% of performance-related project-affecting issues were concentrated in the weakest 30% of systems identified during architecture reviews [5]. This suggests targeted testing guided by early risk assessment is more effective than uniform coverage.

Workload Mixing

Running transactions in isolation can miss critical problems. Mixing transaction groups reveals resource interference — such as memory leaks from one module affecting another’s execution space [1].


KPI Framework

Molyneaux divides performance indicators into two categories [2]:

Category Metrics Focus
Service-oriented Availability, Response Time What users experience
Efficiency-oriented Throughput, Utilization How resources are consumed

Monitoring Layers

Layer Examples Granularity
Generic CPU utilization, memory, disk I/O System-level
Technology-specific Web server, app server, DB metrics Middleware
Application internal Component, method-level timing Code-level

Requirements Format

State requirements as maximum response time, not averages [1]:

Bad Good
“Average response time < 2s” “95th percentile response time < 3s”
“System handles 1000 users” “1000 active users with p99 < 5s”

Diagnostic Workflow

When performance issues are detected, Subraya prescribes a 4-phase diagnostic loop [6]:

  1. Initial diagnosis — Top-level tools (iostat, sar, uptime)
  2. Problem isolation — Categorize: CPU, I/O, Paging, or Network
  3. Deep probing — Specific tools (profilers, filemon, svmon)
  4. Remediation — Targeted fix, then re-test

Monitoring Intervals

Test Duration Sampling Interval
Short tests 20 seconds
Routine monitoring 15 minutes
Tests > 8 hours 300 seconds

Balance detail against log file size and monitoring overhead [6].


Automated Analysis

Performance Signatures (Malik et al.)

Load tests of large-scale systems generate terabytes of data. Malik et al. introduce performance signatures — a minimal set of counters capturing essential system characteristics [7]:

Technique Precision Recall Type
Random Sampling Low Low Unsupervised
K-Means Clustering Medium Medium Unsupervised
PCA 81% 84% Unsupervised
WRAPPER (GA + Logistic Regression) 95% 94% Supervised

The WRAPPER approach reduces thousands of counters to 5–20 (up to 89% reduction) while maintaining 95% precision in detecting deviations [7].


Effort Guidelines

Activity Guideline
Scripting ~0.5 day per transaction [2]
Test execution minimum 5 days [2]
PE investment 1–5% of total project cost [8]
Key transactions Rarely >20 per system [2]

Performance Bug Characteristics

Understanding how performance bugs behave helps design better tests:

Characteristic Value Source
Root cause: wrong workload/API understanding 67% [9]
Bugs in input-dependent loops >75% [9]
Discovered by code reasoning (not profiling) 33–57% [10]
Reports without reproduction steps 54–73% [10]
Reports with measurements (CPU, I/O) 34–36% [11]
Performance regressions vs non-perf (Chrome) 7× more frequent [11]

Profiling finds only 5–10% of performance bugs [10]. Code reasoning — reading and thinking about code — is the primary discovery method. Testing strategies should include code review focused on performance patterns, not just runtime measurement.


References

  1. G. D. Everett and R. McLeod, “Performance Testing,” in Software Testing: Testing Across the Entire Software Development Life Cycle, Wiley, 2007.
  2. I. Molyneaux, The Art of Application Performance Testing, 2nd ed. O’Reilly Media, 2014.
  3. H. H. Liu, Software Performance and Scalability: A Quantitative Approach. Wiley, 2009. doi: 10.1002/9780470465394.
  4. Z. M. Jiang and A. E. Hassan, “A Survey on Load Testing of Large-Scale Software Systems,” IEEE Transactions on Software Engineering, vol. 41, no. 11, pp. 1091–1118, 2015, doi: 10.1109/TSE.2015.2445340.
  5. E. J. Weyuker and F. I. Vokolos, “Experience with Performance Testing of Software Systems: Issues, an Approach, and Case Study,” IEEE Transactions on Software Engineering, vol. 26, no. 12, pp. 1147–1156, 2000, doi: 10.1109/32.888628.
  6. B. M. Subraya, “Introduction to Performance Monitoring and Tuning,” in Integrated Approach to Web Performance Testing, IRM Press, 2006.
  7. H. Malik, H. Hemmati, and A. E. Hassan, “Automatic Detection of Performance Deviations in the Load Testing of Large Scale Systems,” in Proceedings of the 35th International Conference on Software Engineering (ICSE), 2013, pp. 1012–1021. doi: 10.1109/ICSE.2013.6606651.
  8. D. Jewell, “Performance Engineering and Management Method — A Holistic Approach to Performance Engineering,” in Performance Modeling and Engineering, Springer, 2008, pp. 29–55. doi: 10.1007/978-0-387-79361-0_2.
  9. G. Jin, L. Song, X. Shi, J. Scherpelz, and S. Lu, “Understanding and Detecting Real-World Performance Bugs,” in Proceedings of the 33rd ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI), 2012, pp. 77–88. doi: 10.1145/2254064.2254075.
  10. A. Nistor, T. Jiang, and L. Tan, “Discovering, Reporting, and Fixing Performance Bugs,” in Proceedings of the 10th Working Conference on Mining Software Repositories (MSR), 2013, pp. 237–246. doi: 10.1109/MSR.2013.6624035.
  11. S. Zaman, B. Adams, and A. E. Hassan, “A Qualitative Study on Performance Bugs,” in Proceedings of the 9th IEEE Working Conference on Mining Software Repositories (MSR), 2012, pp. 199–208. doi: 10.1109/MSR.2012.6224281.

Disclaimer: AI is used for text summarization, polishing and explaining. Authors have verified all facts and claims. In case of an error, feel free to file an issue.


Table of contents


This site uses Just the Docs, a documentation theme for Jekyll.