5 ms·
> Like quite a bit of other Win32 APIs (WriteGather, for example), it looks tailor made for database journaling. Indeed, WriteFileGather and ReadFileScatter a
by rusanu 10y ago
> Like quite a bit of other Win32 APIs (WriteGather, for example), it looks tailor made for database journaling.
Indeed, WriteFileGather and ReadFileScatter are specifically tailored for writing from and reading into the buffer pull. The IO unit is the sequential layout of an extent (8 pages of 8Kb each), but in memory pages are not sequential so they have to be 'scattered' at read and 'gathered' at write.
You also have to keep in mind that the entire IO stack, Windows and SQL Server, was designed in the days of spinning media where sequential vs. random access was ~80x faster. SSD media has very different behavior and I'm not sure the typical 'journaling' IO pattern is capable of driving it to the upper bound of physical speed.
As a side note, I was close some folk that worked on ALOJA http://hadoop.bsc.es/ http://hadoop.bsc.es/ and it was a very interesting discussion I had with them: the default configuration for Java/Hadoop was providing, out of the box, the best IO performance on Linux. Same configuration was a disaster on Windows and basically every parameter had to be 'tuned' to achieve decent performance. This paper has some of their conclusions: https://www.bscmsrc.eu/sites/default/files/bsc-msr_aloja.pdf https://www.bscmsrc.eu/sites/default/files/bsc-msr_aloja.pdf
- loeg 10y agoSSDs also like nice big sequential writes, although it matters less. It's easier on their wear-leveling firmware and erase blocks. And fewer commands back and forth to the drive reduce latency.
- masklinn 10y ago> SSDs also like nice big sequential writes Sure, but the point of the remark is that random IO on spinning rust is absolutely dreadful compared to sequential (on consumer drives it's common to have a difference of 2 orders of magnitude or more), the difference is significantly lower on SSDs and SSDs have a ton of IOPS so random accesses can happen concurrently leading to much lower effective latency.
- loeg 10y agoYou're absolutely correct. Wear leveling can affect total IOPS and drive longevity though, so it's still something to consider for those eking out the best total performance from the drive.