Performance Engineering · Cluster
I/O Performance
Syscall cost, buffering, and devices.
- 01 Where a read() Syscall Spends Time Before It Reaches the Data The fixed work the kernel performs on every read, why cost per byte collapses as buffers shrink, and which interfaces amortise the transition.
- 02 What write() Actually Does Before Data Leaves the Process How a buffered write lands in the page cache as dirty pages, when the kernel begins writing them back, and why the call returning does not mean the bytes are on the device.
- 03 Readahead Policy and the Read Sizes the Page Cache Actually Sees How the kernel detects sequential access, how far ahead it reads, and why a reader that is fed by readahead measures the cache rather than the storage device.
- 04 What fsync Guarantees and What It Costs on Real Devices The ordering and durability contracts of fsync, fdatasync, and sync_file_range, how a device cache flush turns them into round trips, and where the guarantee quietly ends.
- 05 Alignment, O_DIRECT, and the Cost of Bypassing the Page Cache The alignment and size rules a direct I/O request must satisfy, which part of the page-cache path disappears and which remains, and the cases where the bypass loses rather than wins.
- 06 Zero-Copy Paths: What sendfile, splice, and mmap Remove Which memory copies each zero-copy interface eliminates, which ones remain, and the page-cache, alignment, and lifetime constraints that decide whether the saving is real.
- 07 Writeback Scheduling and Merging at the Block Layer How adjacent and overlapping requests become larger ones, what an elevator does with a mixed read and write stream, and why device queue depth changes the picture more than the scheduler name.
- 08 io_uring Submission and Completion Ring Mechanics The shared-memory rings that carry requests into the kernel and results back out, how batching and polling remove syscalls, and where the cost model replaces transition overhead with memory ordering.
- 09 Write Amplification and Garbage Collection in Flash Translation Layers Why a flash device rewrites more bytes than it is given, how the mapping granularity decides the multiplier, and which access patterns turn a modest write rate into sustained internal copying.
- 10 Throttling I/O with cgroup Controllers and What the Limits Share How the I/O controller accounts and limits bandwidth and IOPS per group, why a throttle applies to a queue rather than to a process, and how the limits interact with the page cache and with each other.