To perform chunking, the system must decide on the chunk size. Semi-preemptible IO chooses the minimum chunk size for which the disk throughput is optimal and the CPU overhead acceptable. Surprisingly, large chunk sizes can also suffer from throughput degradation due to the sub-optimal implementation of disk firmware (Section 3.4). Consequently, Semi-preemptible IO may achieve even better disk throughput than the traditional method where an IO request is serviced using a single disk command.
In order to perform chunking efficiently, Semi-preemptible IO relies on the existence of a read cache and a write buffer on the disk. It uses disk profiling to find the optimal chunk size. We now present the chunking for read and write IO requests separately.