Re: slow queries and high % of wait I/O
Posted by:
Rick James
Date: January 20, 2009 01:28AM
To read a _random_ block from disk costs on average at least half a rotation. So, depending on rotational speed (SATA: 7200rpm, SCSI up to 15K, etc), we are looking at (in round numbers) 10ms -- 100 reads/sec. That assumes the desired block was not cached (in controller, MySQL cache, etc). And it assumes an isolated read.
Add RAID to the mix, together with multiple requestors, now you can get more. With 6 drives, you might get closer to 600 reads/sec.
Writes are another matter -- with BBWC, writes are virtually instantaneous (until you saturate that).
Alas, the numbers don't quite add up. Perhaps something else is going on that Jawahar has not mentioned.
SELECT * FROM HISTORY WHERE ... -- If it is 200 rows, it could take more than a second.