PERFORMANCE TESTING CHEAT SHEET
Quick Reference Guide for Concepts, Metrics, Counters, Architecture, Tools & Best Practices
🚀 Interview Quick-Prep Edition
1 Types of Performance Testing
| Type | Description |
|---|---|
| Load Testing | Tests system behavior under expected load |
| Stress Testing | Tests beyond normal load to find breaking point |
| Spike Testing | Tests with sudden load spikes |
| Endurance / Soak | Tests system stability under sustained load for long periods |
| Scalability | Tests system's ability to handle increased load by scaling |
| Volume Testing | Tests with large amounts of data in the database |
| Baseline | Establishes performance benchmark under known conditions |
| Breakpoint | Finds the breaking point where system fails |
| Recovery | Tests system recovery after failures |
| Concurrency | Tests multiple users performing actions simultaneously |
| Configuration | Tests with different hardware, software, network configs |
| Capacity | Determines maximum capacity the system can handle |
2 Key Performance Testing Concepts
| Concept | Description |
|---|---|
| Performance | How well a system performs in terms of responsiveness & stability |
| Load | The number of users / transactions in a test |
| Capacity | The maximum load the system can sustain |
| Response Time | Time taken by the system to respond to a request |
| Workload | The amount of work done in a given time |
| Concurrency | Number of users accessing the system simultaneously |
| Resource | Hardware/Software components used by the system |
| Bottleneck | A resource that limits the performance |
| Scalability | Ability of system to scale resources to handle greater load |
| Reliability | System's ability to function without failure |
| Availability | System is operational and accessible |
| Maintainability | Ease of maintaining and fixing performance issues |
3 Important Performance Metrics
| Metric | Formula / Description |
|---|---|
| Response Time | Time taken by system to respond End - Start Time |
| Throughput | Number of requests processed per second Requests / Total Time |
| TPS (Trans/sec) | Transactions completed per second |
| Hits Per Second | Total Hits / Test Duration |
| Error Rate | Failed Requests / Total Requests × 100 |
| Latency | Network delay — TTFB - Server Time |
| CPU Usage | Percentage of CPU used — User CPU + Sys CPU |
| Memory Utilization | Used Memory / Total Memory × 100 |
| Network Bandwidth | Network bandwidth consumed Bytes Sent + Recv / Time |
| Resource Utilization | Usage of resources like disk, CPU, memory under load |
| Concurrent Users | Number of simultaneous active users |
| Percentiles | P90, P95, P99 — response time distribution |
4 Testing Strategies
- ✓ Understand requirements & SLAs
- ✓ Identify performance KPIs/metrics
- ✓ Plan test scenarios
- ✓ Design test scripts
- ✓ Setup test environment
- ✓ Execute tests
- ✓ Monitor & collect metrics
- ✓ Analyze results
- ✓ Identify bottlenecks
- ✓ Tuning & optimization
- ✓ Re-test & validate
5 Performance Testing Process
1Requirement Analysis — Understand system goals, SLAs and performance criteria
2Test Planning — Define scope, strategy, scenarios, schedule & deliverables
3Test Design — Create test cases, scenarios, data & scripts
4Env Setup — Configure test environment matching production
5Test Execution — Execute tests, monitor system behavior
6Result Analysis — Analyze results, identify bottlenecks, patterns
7Tuning & Optimization — Optimize application & infrastructure
8Re-testing — Validate after optimizations
9Reporting — Document results & recommendations
6 HTTP Status Codes Cheat Sheet
| Code | Meaning | Description |
|---|---|---|
| 100 | Continue | Continue sending request |
| 200 | OK | Request successful |
| 201 | Created | Resource created successfully |
| 301 | Moved | Resource moved permanently |
| 302 | Found | Resource found temporarily |
| 304 | Not Modified | Resource not modified (cache) |
| 400 | Bad Request | Invalid request syntax |
| 401 | Unauthorized | Authentication required |
| 403 | Forbidden | Access denied |
| 404 | Not Found | Resource not found |
| 500 | Server Error | Internal server error |
| 502 | Bad Gateway | Invalid response from upstream |
| 503 | Unavailable | Server temporarily unavailable |
| 504 | Timeout | Gateway timeout from upstream |
7 Common Bottlenecks
- CPU Usage — Heavy computations, infinite loops, poor algorithms
- Memory Usage — Memory leaks, huge objects in session, caching issues
- Disk I/O — Excessive logging, slow storage devices, heavy swapping
- Database Queries — Missing indexes, N+1 problems, complex joins
- Lock Contention — Threads competing for shared resources, deadlocks
- Network Latency — Uncompressed large payloads, geographic distance
- Inefficient Code — Unoptimized nested loops, excessive object creation
- Connection Pools — Pool exhaustion, failure to close connections
- Third-Party APIs — Rate limits, timeouts, external service delays
- Resource Leaks — Unreleased file handles, unclosed DB connections
- Garbage Collection — Frequent Full GC pauses, inadequate heap sizing
- Thread Starvation — Undersized thread pools, thread blocking
8 Performance Testing Counters (What to Monitor)
🖥️ A. Hardware Counters
CPU Counters
CPU Utilization (%)Overall CPU load
CPU User Time (%)User mode time
CPU System Time (%)Kernel mode time
CPU Idle TimeIdle percentage
Processor Queue LengthThreads waiting
Context Switches/secThread switches
Interrupts/secHardware interrupts
Disk Counters
Disk I/O (Read/Write)MB/s throughput
Disk Queue LengthPending requests
Free Disk SpaceAvailable storage
Network
Network Bytes/secIn/Out bytes
📱 B. Application (APM) Counters
Active SessionsCurrent active users
Transactions/secBusiness transactions
Avg Response TimeMean response
Hit RateRequests per second
Error Rate (%)Failed requests ratio
ThroughputData transferred/sec
Connection TimeTime to establish conn
Elapsed TimeTotal request time
Thread CountCurrent threads in use
Queue LengthPending requests
GC DurationLength of GC pauses
API Failure CountFailed API calls
🖧 C. Server (Middle Tier) Counters
JVM Heap Usage (MB)Memory utilization
JVM GC CountNumber of GC cycles
JVM Perm/MetaPerm/Metaspace size
Thread CountActive server threads
Thread Pool UsageUtilization of pool
Class Loading CountClasses loaded/unloaded
HTTP SessionsActive HTTP sessions
Connection Pool UsageDB connections in use
Request Queue SizePending requests
Server Response TimeServer processing time
Cache Hit/MissCache memory usage
Disk UsageServer disk utilization
🌐 D. Client (Browser / Mobile) Counters
Page Load TimeFull page load
TTFBTime to First Byte
FCPFirst Contentful Paint
LCPLargest Contentful Paint
FID / INPInput delay metrics
CLSCumulative Layout Shift
DOM Content LoadedDOM ready time
JS Execution TimeScript processing
Network LatencyClient-side latency
Memory Usage (Client)Browser memory
Render TimePaint & render cost
Bundle SizeJS/CSS payload size
9 Application Architecture Overview (Typical)
Users
Browser / Mobile
Internet / DNS
HTTP/HTTPS
Load Balancer
Nginx / HAProxy / F5
Web Server
Apache / IIS / Nginx
App Server
Tomcat / Node / .NET
Database Server
MySQL / Oracle / Postgres
CDN
Cache (Redis)
Message Queue
Monitoring (APM)
— Supporting infrastructure layers
10 Architecture Component Details
| Component | Role | Key Concern |
|---|---|---|
| Client (Browser) | User accesses app via browser/mobile | Page load, rendering |
| CDN | Caches static content at edge locations | Cache hit ratio, latency |
| Load Balancer | Distributes traffic across servers | Algorithm, health checks |
| Web Server | Handles HTTP requests, serves static files | Connections, threads |
| Application Server | Executes business logic, handles API calls | Thread pool, memory, GC |
| Database Server | Stores application data, handles queries | Query time, connections |
| Cache (Redis/Memcached) | In-memory data store for faster reads | Hit ratio, eviction |
| Message Queue | Async processing (Kafka, RabbitMQ) | Queue depth, lag |
| Monitoring Server | Collects metrics, logs, traces, alerts | Dashboard accuracy |
11 Typical Server Configuration Example
| Server Name | Role | OS | CPU | RAM | Storage | IP Address |
|---|---|---|---|---|---|---|
| LB-01 | Load Balancer | Linux | 4 vCPU | 8 GB | 100 GB SSD | 10.0.1.10 |
| WEB-01 | Web Server | Linux | 4 vCPU | 8 GB | 100 GB SSD | 10.0.1.20 |
| APP-01 | App Server | Linux | 8 vCPU | 16 GB | 200 GB SSD | 10.0.1.30 |
| DB-01 | Database Server | Linux | 16 vCPU | 64 GB | 1 TB NVMe | 10.0.1.40 |
| MON-01 | Monitoring | Linux | 4 vCPU | 8 GB | 500 GB SSD | 10.0.1.50 |
12 Network Components
| Protocol | Port | Description |
|---|---|---|
| HTTP | 80 | Unsecured web traffic |
| HTTPS | 443 | SSL/TLS encrypted traffic |
| FTP | 21 | File transfer protocol |
| SSH | 22 | Secure shell access |
| DNS | 53 | Domain Name System |
| JDBC | 3306 | MySQL database connectivity |
| WebSocket | ws/wss | Bi-directional communication |
12b Data Flow Steps
1 User sends request from browser / mobile app
2 DNS resolves domain → IP address
3 Load Balancer distributes request to web server
4 Web Server forwards dynamic requests to App Server
5 App Server processes business logic
6 App Server queries Database / Cache
7 Response sent back through the chain
8 Browser renders the response to user
13 SQL Performance Tips
- Use proper indexing on frequently queried columns
- Avoid SELECT * — select only needed columns
- Use EXPLAIN to analyze query execution plans
- Optimize queries — avoid complex joins
- Use pagination for large datasets
- Avoid N+1 query problems
- Use stored procedures where possible
- Keep DB statistics updated
- Avoid correlated subqueries
- Use connection pooling
14 JVM Tuning Quick Tips
- Set proper heap size -Xms / -Xmx
- Use appropriate GC algorithm (G1GC, ZGC, Shenandoah)
- Monitor GC logs — -Xlog:gc*
- Tune thread pool size for workload
- Use JFR (Java Flight Recorder) for profiling
- Avoid memory leaks — use profiler tools
- Set Metaspace — -XX:MaxMetaspaceSize
- Use thread dumps for deadlock analysis
- Enable heap dumps on OOM — -XX:+HeapDumpOnOutOfMemoryError
- Use JVM arguments wisely
15 Performance Test Report Should Include
- Test Summary & Objectives
- Test Environment Details
- Test Scenarios & Workload
- Test Results & Metrics
- Response Time Analysis
- Throughput Analysis
- Error Analysis
- Resource Utilization
- Bottleneck Identification
- Recommendations & Graphs
16 Interview Quick-Fire Q&A
Q1.What is Performance Testing? — Testing to ensure system meets performance criteria under load.
Q2.Load vs Stress Testing? — Load = expected load; Stress = beyond limits.
Q3.What is Throughput? — Number of transactions processed per unit time.
Q4.What is Latency? — Time delay between request sent and response received.
Q5.What is a Bottleneck? — A component limiting overall system performance.
Q6.What is Think Time? — Time user waits between actions (simulated delay).
Q7.What are SLAs? — Service Level Agreements defining performance targets.
Q8.Concurrency vs Throughput? — Concurrency = users at same time; Throughput = processed requests.
Q9.What is Ramp-up? — Gradually increasing load to find stability and capacity.
Q10.What is a Steady State? — Period of constant load during a test.
Q11.What is Soak Testing? — Running tests for extended duration to find memory leaks.
Q12.What are Percentiles? — P90/P95/P99 response time — most users' experience.
Q13.Why P99 > Average? — P99 captures tail latency that averages hide.
Q14.What is Correlation? — Capturing dynamic values from server responses for reuse.
Q15.What is Parameterization? — Using dynamic data to simulate realistic test scenarios.
Q16.How to identify bottleneck? — Monitor CPU, Memory, Disk, Network, DB queries, Threads.
Q17.What is a VUser? — Virtual User — a simulated user in a performance test.
Q18.What is Baseline Testing? — Establishing a reference performance benchmark.
Q19.What is Little's Law? — N = λ × W (Users = Throughput × Response Time)
Q20.What is APM? — Application Performance Monitoring (Dynatrace, New Relic, AppDynamics).
17 Popular Performance Testing Tools