Sequential disk read
disk_read_sequential · compared across machine types · 11 Series on 8 machine types · AWS us-east-2
CPU
Disk
Order
| Compare | Machine | Variant | P50 | P99 | Rate | Unit cost | Runs |
|---|---|---|---|---|---|---|---|
| i4i.2xlarge | 7.134 µs | — | 1.148 GB/s | $0.597 /GB/s·h | 89 | ||
| i4g.2xlarge | 7.761 µs | — | 1.056 GB/s | $0.585 /GB/s·h | 4 | ||
| m6id.2xlarge | 12.98 µs | — | 631.0 MB/s | $0.752 /GB/s·h | 1 |
Compared:m6id.2xlargei4g.2xlargei4i.2xlarge
Run-to-run spread
time per 8 KiB pread across counted RunsOver time
newest counted Runs, time per 8 KiB pread(one request each to the data API)
What this measures
Reading a file front to back the way a program does, on one thread: buffered preads of request_bytes with the kernel's stock readahead, the kernel asked first to drop each sample's region from the page cache. It is a cold read when the eviction worked, which each Run records, where it can count them, as each sample's resident pages.
What it does not measure
- A sample is not known to be cold.
- On both disks seen, the device's read requests over the measuring averaged about 128 KiB (its read sectors over its reads, other I/O included), against 8 KiB calls; the figure is built from means over the calls, not from the latency of one device request.
- In the Runs examined readahead kept one or two requests in flight (see "Findings"), so it is not the disk's throughput at a deep queue; reads kept in flight at depth are
disk_read_io_uring's.
Code & config
Benchmark docsSeries JSONi4i.2xlarge · instance store
71__attribute__((noinline))72static uint64_t read_next(void *arg) {73 ctx_t *c = (ctx_t *)arg;74 ssize_t n = pread(c->fd, c->buf, c->request, (off_t)c->offset);75 if (__builtin_expect((uint64_t)n != c->request, 0)) {76 if (n < 0) lm_die("pread of %" PRIu64 " bytes at %" PRIu64 ": %s", c->request, c->offset, strerror(errno));77 lm_die("pread of %" PRIu64 " bytes at %" PRIu64 " returned %zd", c->request, c->offset, n);78 }79 c->sum += c->buf[0];80 c->offset += c->request;81 c->reads++;82 return c->sum;83}// …153 lm_measure_fixed(read_next, make_cold, &c, per_sample / request, WARMUP_SAMPLES);
Configuration
- benchmarkdisk_read_sequential
- buildstatic
- instancei4i.2xlarge
- regionus-east-2
- azuse2-az3
- params.bytes_per_sample2147483648
- params.dir/mnt/lm/instance-store
- params.diskinstance_store
- params.request_bytes8192
- params.span_bytes34359738368