Can database confirm the sequential read is really sequential in SSD
0
votes
1
answer
317
views
In SSD, overwriting a data file means SSD has to first erase it and then write data. This can change the data layout in the SSD for the data file.
MySQL has some policies to optimize random IO, e.g., read-ahead (pre-fetching). The read-ahead policy will pre-read the remaining x pages in an "extent" if prior y pages are read sequentially. From the perspective of MySQL, using consecutive offsets for
pread
can make reads sequential. But I doubt is it true for an SSD. In other words, pread
can only confirm the **logically sequential** but not **physically sequential**?
This points to another important question: does an extent (usually contains 64 pages) in MySQL must represent consecutive space for SSD.
So if I am right, why do databases still make a substantial effort in converting random IO to sequential IO?
Asked by Tim He
(223 rep)
May 6, 2022, 01:04 PM
Last activity: May 6, 2022, 01:28 PM
Last activity: May 6, 2022, 01:28 PM