PERFORMANCE TESTING CHEAT SHEET

Quick Reference Guide for Concepts, Metrics, Counters, Architecture, Tools & Best Practices

🎬 Interview Quick-Prep Edition
1 Types of Performance Testing
TypeDescription
Load TestingTests system behavior under expected load
Stress TestingTests beyond normal load to find breaking point
Spike TestingTests with sudden load spikes
Endurance / SoakTests system stability under sustained load for long periods
ScalabilityTests system's ability to handle increased load by scaling
Volume TestingTests with large amounts of data in the database
BaselineEstablishes performance benchmark under known conditions
BreakpointFinds the breaking point where system fails
RecoveryTests system recovery after failures
ConcurrencyTests multiple users performing actions simultaneously
ConfigurationTests with different hardware, software, network configs
CapacityDetermines maximum capacity the system can handle
2 Performance Testing Life Cycle
Phase / ConceptDescription
POC (Proof of Concept)Validating the feasibility of testing tools and approach
NFR GatheringDefining performance goals like response time and throughput
Test PlanDocumenting strategy, scope, resources, and schedule
Test DesignCreating scripts, scenarios, and preparing test data
Environment SetupConfiguring infrastructure to closely mirror production
Test ExecutionRunning the planned scenarios under expected load
Result AnalysisComparing metrics against NFRs and identifying bottlenecks
TuningOptimizing system configuration or code to resolve issues
ReportingSharing findings, metrics, and actionable recommendations
Sign-offFinal approval that performance requirements are met
3 Aggregate Report Metrics
MetricDescription
SamplesTotal number of requests sent to the server during the test
AverageThe average response time of all samples (Total Time / Samples)
MinThe shortest time taken for a request to complete
MaxThe longest time taken for a request to complete
90th Percentile90% of requests took this time or less to respond
95th Percentile95% of requests took this time or less to respond
99th Percentile99% of requests took this time or less to respond
Error %Percentage of requests that failed (Failed / Total * 100)
ThroughputNumber of requests processed per unit of time (e.g. requests/sec)
Received KB/secAmount of data downloaded from the server per second
Sent KB/secAmount of data uploaded to the server per second
4 HTTP Status Codes
CodeMeaningDescription
100ContinueContinue sending request
200OKRequest successful
201CreatedResource created successfully
301MovedResource moved permanently
302FoundResource found temporarily
304Not ModifiedResource not modified (cache)
400Bad RequestInvalid request syntax
401UnauthorizedAuthentication required
403ForbiddenAccess denied
404Not FoundResource not found
500Server ErrorInternal server error
502Bad GatewayInvalid response from upstream
503UnavailableServer temporarily unavailable
504TimeoutGateway 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
BottleneckTypical Causes
CPU UsageHeavy computations, infinite loops, poor algorithms
Memory UsageMemory leaks, huge objects in session, caching issues
Disk I/OExcessive logging, slow storage devices, heavy swapping
Database QueriesMissing indexes, N+1 problems, complex joins
Lock ContentionThreads competing for shared resources, deadlocks
Network LatencyUncompressed large payloads, geographic distance
Inefficient CodeUnoptimized nested loops, excessive object creation
Connection PoolsPool exhaustion, failure to close connections
Third-Party APIsRate limits, timeouts, external service delays
Resource LeaksUnreleased file handles, unclosed DB connections
Garbage CollectionFrequent Full GC pauses, inadequate heap sizing
Thread StarvationUndersized 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
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
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
ComponentRoleKey Concern
Client (Browser)User accesses app via browser/mobilePage load, rendering
CDNCaches static content at edge locationsCache hit ratio, latency
Load BalancerDistributes traffic across serversAlgorithm, health checks
Web ServerHandles HTTP requests, serves static filesConnections, threads
Application ServerExecutes business logic, handles API callsThread pool, memory, GC
Database ServerStores application data, handles queriesQuery time, connections
Cache (Redis/Memcached)In-memory data store for faster readsHit ratio, eviction
Message QueueAsync processing (Kafka, RabbitMQ)Queue depth, lag
Monitoring ServerCollects metrics, logs, traces, alertsDashboard accuracy
11 Typical Server Configuration Example
Server NameRoleOSCPURAMStorageIP Address
LB-01Load BalancerLinux4 vCPU8 GB100 GB SSD10.0.1.10
WEB-01Web ServerLinux4 vCPU8 GB100 GB SSD10.0.1.20
APP-01App ServerLinux8 vCPU16 GB200 GB SSD10.0.1.30
DB-01Database ServerLinux16 vCPU64 GB1 TB NVMe10.0.1.40
MON-01MonitoringLinux4 vCPU8 GB500 GB SSD10.0.1.50
12 Network Components
ProtocolPortDescription
HTTP80Unsecured web traffic
HTTPS443SSL/TLS encrypted traffic
FTP21File transfer protocol
SSH22Secure shell access
DNS53Domain Name System
JDBC3306MySQL database connectivity
WebSocketws/wssBi-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