To Nha Notes | May 13, 2021, 11:33 p.m.
The resources to monitor include:
Hardware: CPU utilization, memory usage, disk IOPS, disk throughput, disk capacity (volume used), network throughput
Software: Virtual memory usage, processes/tasks/threads, file descriptors
Let’s say you’re looking at an existing system currently performing 1,000 requests/s. The busiest resources are the 16 CPUs, which are averaging 40% utilization; you predict that they will become the bottleneck for this workload once they become 100% utilized. The question becomes: What will the requests-per-second rate be at that point?
CPU% per request = total CPU%/requests = 16 × 40%/1,000 = 0.64% CPU per request
max requests/s = 100% × 16 CPUs/CPU% per request = 16*100 / 0.64 = 2,500 requests/s
The prediction is 2,500 requests/s, at which point the CPUs will be 100% busy. This is a rough best-case estimate of capacity, as some other limiting factor may be encountered before the requests reach that rate.