I have been trying to access two drives via a sata port multiplier recently and have had poor performance. My Intel AHCI chipset does not support Fis Bast Switching, but I would not expect this to make a big difference for bulk sequentual access, since after reading a few mb from the first drive, then reading a few mb from the second should leave the first drive plenty of time to continue performing readahead into its internal 64 mb buffer cache, so when the system goes back to reading from that drive, it should be cached and return the results fast. I wrote a little performance benchmark to test this theory, and it seems that the drive’s internal readahead does not perform correctly.
I read 16 256k blocks from the drive, slept for 1 second, then read another 16 256k blocks ( all sequential from the initially random starting offset, to make sure the cache begain clean ). These are the results I got:
My test results:
read took 6598 us << intial seek
read took 1157 us
read took 1207 us
read took 1178 us
read took 1187 us
read took 2373 us << odd delay
read took 1172 us
read took 1180 us
read took 1163 us
read took 1171 us
read took 1172 us
read took 1136 us
read took 2373 us
read took 1129 us
read took 1170 us
read took 1171 us
read took 636 us
read took 628 us
read took 625 us
read took 627 us
read took 626 us
read took 626 us
read took 580 us
read took 563 us
read took 6733 us << why is this even longer than the first seek
read took 1237 us << cache is now empty, waiting on actual reads
read took 2326 us << odd delay
read took 1165 us
read took 1169 us
read took 1171 us
read took 1173 us
read took 1169 us
This shows that the drive stops performing readahead after a bit more than 1 MB after the last request, despite the fact that it has 64 mb of cache. Why is it not continuing to perform more readahead than this when it has such a large cache?