raft-engine
raft-engine copied to clipboard
eliminate read-on-write problem with write buffer padding
read-on-write problem refers to when an unaligned write I/O is issued, an additional read is needed to prefetch the data into page cache. In practice we have only observed this phenomenon when log recycling is enabled.
The situation can be improved by:
- https://github.com/tikv/raft-engine/issues/168
- When write offset is 4K aligned, zero-pad the write buffer into multiple of 4K. This way we can always initialize the page cache without reading.