raft-engine icon indicating copy to clipboard operation
raft-engine copied to clipboard

eliminate read-on-write problem with write buffer padding

Open tabokie opened this issue 2 years ago • 0 comments

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.

tabokie avatar Aug 30 '23 01:08 tabokie