Fast Transaction Log: Windows
ayende.com
ayende.com
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/ 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
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.
For instance, metadata reads on the filesystem are much slower on Windows than Linux, so it takes much longer to do the moral equivalent of "find /"
Circa 2003 I would say the Apache Web Server ran about 10x faster on Linux than Solaris, but that a Solaris mail server was 10x faster than the Linux server.
Turns out that Linux and Apache grew up together to optimize performance for the forked process model, but that fsync()-and-friends performance was much worse than Solaris at that time, if you want to meet specifications for reliable delivery.
Thats the theory, if you remove device driver folks, how many really works on the Linux kernel ?
While I don't have time right now to actually go and count the number of distinct people involved, that's a lot of hands that have touched that source file over the years. And this view's only showing the changes that make up the current version of that file-- there are authors not credited there because their code has since been overwritten or edited by someone else.
[1] https://github.com/torvalds/linux/blame/master/block/bio.c
At that point one is comparing apples and oranges.
If it's not performing well for your typical users using typical systems, it's not performing well. Those systems aren't going to change.
Those who engineer the system need to just work around the system specific limitations. Like a virus scanner.
They should be using the following API if they're going to use the system time to measure time differences:
clock_gettime(CLOCK_MONOTONIC, ×pec);
It's a really good clue that a timing function is inappropriate for benchmarking when the man page talks about time zones.
1. http://webcache.googleusercontent.com/search?q=cache%3Ahttps...
2. http://webcache.googleusercontent.com/search?hl=en&q=cache%3...
And that 80% difference is in the buffered case, but that's also the least relevant - you can use user space buffering (which is normal anyhow, on both OS's) to amortize the system call costs.
Buffered:
windows = 0.006 linux = 0.03
80% Win for windows?
But where do those numbers come from?
The time in ms for linux was 522, the time for windows was 410. That's not an 80% win.
where does the "Write cost" number come from?
In general for the other numbers I don't think they are comparing the same things. I don't think it is a coincidence that the two systems had write times of both about 10s and 20s for the different tests. Where linux took 20s and windows took 10s I'd bet that they were comparing different behaviors.
0.006 write cost = 410ms
0.03 write cost = 1966ms
https://en.wikipedia.org/wiki/Common_Log_File_System
https://msdn.microsoft.com/en-us/library/windows/desktop/bb9...