The following table provides a quick comparison to some of the more salient comparison points between the four to five Linux I/O technologies we have seen, namely: the blocking read(2)/write(2) (and the SG-I/O/positioned [p]read[v](2)/[p]write[v](2)), memory mapping, non-blocking (mostly synchronous) DIO, and non-blocking asynchronous AIO:
I/O Type | APIs | Pros | Cons |
Blocking (regular and SG-IO / positioned) |
[p]read[v](2) /[p]write[v](2) | Easy to use | Slow; double-copy of data buffers |
Memory Mapping | mmap(2) | (Relatively) easy to use; fast (in memory I/O); single copy of data (a zero-copy technique); works best when RAM:Storage :: ~ 1:1 | MMU-intensive (high page table overhead, meta-work) when RAM: Storage ... |