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 Performance Testing Life Cycle
| Phase / Concept | Description |
|---|---|
| POC (Proof of Concept) | Validating the feasibility of testing tools and approach |
| NFR Gathering | Defining performance goals like response time and throughput |
| Test Plan | Documenting strategy, scope, resources, and schedule |
| Test Design | Creating scripts, scenarios, and preparing test data |
| Environment Setup | Configuring infrastructure to closely mirror production |
| Test Execution | Running the planned scenarios under expected load |
| Result Analysis | Comparing metrics against NFRs and identifying bottlenecks |
| Tuning | Optimizing system configuration or code to resolve issues |
| Reporting | Sharing findings, metrics, and actionable recommendations |
| Sign-off | Final approval that performance requirements are met |
3 Aggregate Report Metrics
| Metric | Description |
|---|---|
| Samples | Total number of requests sent to the server during the test |
| Average | The average response time of all samples (Total Time / Samples) |
| Min | The shortest time taken for a request to complete |
| Max | The longest time taken for a request to complete |
| 90th Percentile | 90% of requests took this time or less to respond |
| 95th Percentile | 95% of requests took this time or less to respond |
| 99th Percentile | 99% of requests took this time or less to respond |
| Error % | Percentage of requests that failed (Failed / Total * 100) |
| Throughput | Number of requests processed per unit of time (e.g. requests/sec) |
| Received KB/sec | Amount of data downloaded from the server per second |
| Sent KB/sec | Amount of data uploaded to the server per second |
4 HTTP Status Codes
| 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 |
5 Scripting Challenges
1Dynamic Correlation — Extracting complex, nested tokens (CSRF, session IDs) from responses for subsequent requests.
2Asynchronous Calls — Simulating AJAX, WebSockets, or polling where response order and timing are not guaranteed.
3Authentication Flows — Scripting complex OAuth, SSO redirects, or temporary token refreshes during a test.
4Data Parameterization — Managing unique, non-colliding test data for thousands of VUsers without data exhaustion.
5Client-Side Encryption — Replicating browser-based JS encryption or hashing of payloads before transmission.
6File Uploads/Downloads — Handling dynamic file boundaries and correct MIME types for multipart form data.
7Bot Protections & WAFs — Bypassing CAPTCHAs or Cloudflare/Akamai bot managers in a lower test environment.
8Single Page Apps (SPA) — Replicating the barrage of parallel API calls triggered by a single user click.
6 Common Bottlenecks
| Bottleneck | Typical Causes |
|---|---|
| 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 |
7 Key Calculations
Pacing
Controls the delay between iterations to hit a target rate.
Pacing = (Duration ÷ Iterations) - (RT + TT)
= (3600 ÷ 100) - (3 + 2)
= 36 - 5
= 31 sec
Controls the delay between iterations to hit a target rate.
Pacing = (Duration ÷ Iterations) - (RT + TT)
= (3600 ÷ 100) - (3 + 2)
= 36 - 5
= 31 sec
Concurrent Users (Little's Law)
Active users needed to generate a specific load.
Users = TPS × (RT + TT + Pacing)
= 10 × (2 + 3 + 0)
= 10 × 5
= 50 Users
Active users needed to generate a specific load.
Users = TPS × (RT + TT + Pacing)
= 10 × (2 + 3 + 0)
= 10 × 5
= 50 Users
8 Performance Testing Counters (What to Monitor)
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
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
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
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
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
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