Random disk read, idle
disk_read_latency · compared across machine types · 14 Series on 8 machine types · AWS us-east-2
CPU
Disk
Order
| Compare | Machine | Variant | P50 | P99 | Rate | Unit cost | Runs |
|---|---|---|---|---|---|---|---|
| m6id.2xlarge | 87.55 µs | 100.9 µs | 93.20 MB/s | $0.417 /10k IOPS·h | 1 | ||
| i4g.2xlarge | 119.3 µs | 144.4 µs | 68.49 MB/s | $0.737 /10k IOPS·h | 4 | ||
| i4i.2xlarge | 119.3 µs | 142.3 µs | 68.37 MB/s | $0.839 /10k IOPS·h | 5 |
Compared:m6id.2xlargei4g.2xlargei4i.2xlarge
Tail: P50 → P99.9
per operation, log scaleLatency histograms
pooled across counted Runs, each to its own peak
(one request each to the data API)
Over time
newest counted Runs, each Run's P50(one request each to the data API)
What this measures
The time of one O_DIRECT random read from a disk, one read outstanding at a time, with every read timed on its own: each counted sample is exactly one read, so a Run gives the spread of single-read latencies (its op_histogram) as well as their median.
What it does not measure
- Throughput at depth: one read is outstanding at a time.
disk_read_io_uringkeeps many. - A tail beyond the counted samples: a Run of
LM_SAMPLESsamples timesLM_SAMPLESreads, so its 99.9th percentile means something only whenLM_SAMPLESis in the thousands. - Each sample's time includes the two clock reads at its edges (
clock_read_nsinstarted, about 20 ns), and thewriteof the previous sample's two events precedes it.
Code & config
Benchmark docsSeries JSONi4i.2xlarge · instance store
57__attribute__((noinline))58static uint64_t read_next(void *arg) {59 ctx_t *c = (ctx_t *)arg;60 uint64_t offset = (uint64_t)c->order[c->next] * c->request;61 ssize_t n = pread(c->fd, c->buf, c->request, (off_t)offset);// …66 c->sum += c->buf[0];67 c->reads++;68 if (++c->next == c->blocks) {69 c->next = 0;70 c->passes++;71 }72 return c->sum;73}// …137 lm_hist_measure(read_next, &c, WARMUP_READS, QUICK_SAMPLES, &g_latency);
Configuration
- benchmarkdisk_read_latency
- buildstatic
- instancei4i.2xlarge
- regionus-east-2
- azuse2-az3
- params.dir/mnt/lm/instance-store
- params.diskinstance_store
- params.request_bytes8192
- params.span_bytes34359738368