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 Key Performance Testing Concepts
ConceptDescription
PerformanceHow well a system performs in terms of responsiveness & stability
LoadThe number of users / transactions in a test
CapacityThe maximum load the system can sustain
Response TimeTime taken by the system to respond to a request
WorkloadThe amount of work done in a given time
ConcurrencyNumber of users accessing the system simultaneously
ResourceHardware/Software components used by the system
BottleneckA resource that limits the performance
ScalabilityAbility of system to scale resources to handle greater load
ReliabilitySystem's ability to function without failure
AvailabilitySystem is operational and accessible
MaintainabilityEase of maintaining and fixing performance issues
3 Important Performance Metrics
MetricFormula / Description
Response TimeTime taken by system to respond End - Start Time
ThroughputNumber of requests processed per second Requests / Total Time
TPS (Trans/sec)Transactions completed per second
Hits Per SecondTotal Hits / Test Duration
Error RateFailed Requests / Total Requests × 100
LatencyNetwork delay — TTFB - Server Time
CPU UsagePercentage of CPU used — User CPU + Sys CPU
Memory UtilizationUsed Memory / Total Memory × 100
Network BandwidthNetwork bandwidth consumed Bytes Sent + Recv / Time
Resource UtilizationUsage of resources like disk, CPU, memory under load
Concurrent UsersNumber of simultaneous active users
PercentilesP90, 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
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
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
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
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
Apache JMeter
LoadRunner
Gatling
k6
NeoLoad
Locust
BlazeMeter
Grafana
Prometheus
New Relic
Datadog
Dynatrace