Performance, quota and cost investigation
Measure the distribution and denominator
Latency is time per operation; throughput is completed operations per time. Saturation describes pressure on finite resources. The invented ordered trace contains 100 samples: 90 at 20 ms, five at 100 ms and five at 1000 ms. With the nearest-rank definition, index ceil(p*n/100) gives p50=20, p95=100 and p99=1000 ms; the mean is 73 ms. The local calculation is not a CloudWatch algorithm guarantee. Report sample count, time window, success/error population, offered load and units. Do not average per-instance percentiles to obtain a global percentile. For 100 successful operations over 10 seconds, throughput is 10/s. Keep failed requests and timeout counts visible separately.
Find the limiting resource
Compare offered load with throughput, queue age, CPU, memory, connection pools, storage IOPS and throughput, network bytes and cache hit ratio. High I/O latency can exist while CPU is low. For DynamoDB inspect ThrottlingReason and resource ARN, table versus index, read versus write, and provisioned, partition, on-demand maximum or account limit. A hot key may need access-pattern redesign rather than a blanket quota increase. Lambda asynchronous retries and event source mappings can repeat events; compare age, throttles and failed deliveries and verify deduplication. Use bounded backoff, dead-letter or failure destinations as appropriate and never blindly replay an entire queue. Check adjustable service quotas separately from actual available capacity; a quota increase is not a budget cap.
Explain a cost change with usage evidence
Use a fictional cost export in cents: compute moves from 5000 to 5500, logs from 1000 to 4000, and transfer from 2000 to 2500. Total increases from 8000 to 12000; logs explain 3000 of the 4000 increase (75%). Group the same period and cost basis by account, Region, service and usage type; compare usage quantity and rate. Check a verbose log release, retries, retention and data transfer before changing anything. Billing and Cost Explorer can differ in treatment of refunds and amortization; data can arrive later than 24 hours. An alarm is not a real-time hard cap. Preserve required audit logs and use an approved retention policy rather than deleting evidence.
Run a controlled investigation
Change one variable at a time in a reproducible workload with defined rate, duration, dataset and concurrency. Compare latency distribution, success rate, resource pressure and cost per successful operation with baseline. A faster mean is not a win if p99 or error rate regresses. The lab analyzes invented traces and a fictional cost export, rejects unknown diagnostic facts, and requires owner approval, bounded scope, rollback and positive/negative verification before marking a proposed repair ready for review. Run python test_diagnostics.py locally; no actual benchmark, network probe, IAM evaluation, quota request or repair is performed.
Check Your Understanding
Solidify your learning with the interactive assessment directly below this lesson.
Concept Quiz & Questions
Performance, quota and cost investigation — knowledge check
Reason about evidence-based diagnostics and safe repair.
What is nearest-rank p99 in the sample?
What is throughput for 100 completions in 10 seconds?
Which DynamoDB evidence helps distinguish throttling causes?
What share of the modeled increase comes from logs?
When should a proposed repair be marked ready for review?