All articles
Performance & memoryEngineering record

How Disk Bottlenecks Limit High-Concurrency Systems

CPU-driven horizontal scaling is a mature and common capacity-management mechanism for online SaaS systems, with native support in Kubernetes HPA and autoscaling services from AWS, Google Cloud, and Azure. The model assumes that rising concurrency translates into higher CPU load. But in an I/O-bound workload, that assumption no longer holds: QPS can plateau and tail latency can rise while CPU utilization remains below the threshold, preventing a CPU-only policy from scaling out in time. This article examines two such cases.

Case 1: Storage saturation hid the scaling signal

In one search load test, increasing concurrency raised latency without improving QPS. CPU utilization stayed around 30%.

Node I/O metrics showed sustained high read IOPS, read bandwidth, and queue depth:

Disk IOPS, throughput, and outstanding I/OView full-size image

During the throughput plateau, the software RAID device md0 sustained roughly 300K read IOPS and 1.2 GB/s, with an average queue length around 90. Each of the two data NVMe devices handled about 150K IOPS and 600 MB/s. Read throughput had plateaued while requests continued to queue.

Further inspection found that the instance had per-Pod I/O throttling enabled, as shown below.

Pod I/O limit configurationView full-size image

Here, rbps=1.5 and riops=1.5 set the read-bandwidth and read-IOPS limits to 1.5 times their respective base quotas.

Two changes followed: moving to AWS I8g storage-optimized hosts and removing the per-Pod I/O limit.

I8g provides local NVMe storage using third-generation AWS Nitro SSDs. A public-specification comparison illustrates the storage difference: at the same 32 vCPUs and 256 GiB of memory, the storage-optimized option provides more local drives and higher aggregate read IOPS. AWS I8g

Instance type Local NVMe SSDs Aggregate random-read IOPS¹
r8gd.8xlarge 1 × 1900 GB 536,666
i8g.8xlarge 2 × 3750 GB 1,200,000

¹ AWS specifications for 4 KiB blocks, 100% random reads, at queue-depth saturation.

With further increases in load-test concurrency, operators reported CPU utilization of about 80%, QPS approaching 12K, and search latency around 30 ms. CPU became the next bottleneck.

Successful-request rates after the changesView full-size image

At the highlighted sample, the successful-request rates were 9.50K QPS for Search and 1.86K QPS for HybridSearch, totaling approximately 11.36K QPS.

Case 2: Oversized read-ahead amplified random reads

In another case, the search service showed degraded performance. Node read bandwidth was saturated, while CPU utilization stayed below the scale-out threshold. The node's I/O metrics before tuning are shown below.

Node IOPS and read bandwidth with read-ahead set to 2048 KiBView full-size image

Read bandwidth on md0 held near 8.5 GB/s. Read IOPS peaked at 311K and then declined, but bandwidth remained high.

Dividing read bandwidth by IOPS gives the average block-I/O size. Its increase shifted attention toward read granularity. Returning output_fields also required mmap-backed reads, prompting engineers to check whether read-ahead was amplifying the amount of data read.

Inspecting /sys/block/md0/queue/read_ahead_kb revealed a read-ahead setting of 2048 KiB on md0.

Read-ahead brings data into the page cache before the application requests it. In random-access workloads, prefetched data that goes unused consumes extra bandwidth and cache space needed by hot pages. Linux readahead

Read-ahead on md0 was reduced to 128 KiB, matching the underlying SSDs. Operators observed lower read pressure on that node after the change, and the setting was then rolled out to its peers.

Read-ahead should match the access pattern: sequential scans can benefit from a larger window, while random search calls for keeping unused prefetches in check.

For metric definitions and dashboard interpretation, see Diagnosing Disk I/O Bottlenecks with Node Exporter.

Engineering takeaways

  • Capacity planning must cover CPU, storage, network, and request fanout, not just core count.
  • Autoscaling should incorporate queueing, tail latency, and I/O pressure instead of relying on CPU alone.
  • Read-ahead, RAID layout, and instance-storage topology must be tuned against the real workload.

— MrPresent-Han

Reference materials are not public; their titles are shown without links.