tag:blogger.com,1999:blog-3043493300793589377.post1401627806265257273..comments2024-03-21T22:39:18.222-07:00Comments on Yoshinori Matsunobu's blog: Mastering the Art of Indexing - slides availableYoshinori Matsunobuhttp://www.blogger.com/profile/14180479977952026421noreply@blogger.comBlogger4125tag:blogger.com,1999:blog-3043493300793589377.post-77494140412910593642010-06-04T23:18:43.027-07:002010-06-04T23:18:43.027-07:00Excellent posts.Excellent posts.jametonghttp://www.google.com/profiles/jametongnoreply@blogger.comtag:blogger.com,1999:blog-3043493300793589377.post-12564301031717840632009-04-28T18:42:00.000-07:002009-04-28T18:42:00.000-07:00Hi Peter,
My understanding is as follows.
I/O re...Hi Peter,<br /><br />My understanding is as follows.<br /><br />I/O requests are handled by the following order:<br />syscalls(write/pwrite) <br /> -> I/O scheduler<br /> -> Device Driver/Disks(Command Queuing)<br /><br />I/O scheduler sorts incoming i/o requests by logical block addresses, <br />then sending them to a device driver. <br />I/O scheduler does not depend on storage devices so <br />is helpful for some parts (i.e. minimizing disk seek overheads), <br />not helpful for other parts (i.e. minimizing disk rotation overheads)<br /><br />TCQ(and NCQ) can handle very limited number (normally 32-64) of i/o requests<br />but highly optimized for storage devices.<br />TCQ can minimize not only disk seeks but also disk rotation overhead. <br /><br /><br />Based on the above, sorting almost all requests on I/O sheculer then <br />sending them to TCQ would be nice.<br /><br />Suppose 100,000 random read i/o requests come.<br />When i/o scheduler queue size is 128 (default in many cases), <br />TCQ gets i/o requests by almost random order, <br />so pretty high disk seek overhead happens <br />for each (handling 32-64 i/o requests) action.<br /><br />When i/o scheduler queue size is 100,000, <br />TCQ gets all i/o requests by sorted order, so <br />seek overhead can be much smaller.<br /><br /><br />This explains my benchmarking results.<br /><br />I/O scheduler queue size settings would not be helpful for InnoDB because <br />InnoDB internally does sorts i/o requests by storage order.<br />MyISAM does nothing (highly depending on OS) so this helps.Yoshinori Matsunobuhttps://www.blogger.com/profile/14180479977952026421noreply@blogger.comtag:blogger.com,1999:blog-3043493300793589377.post-88445521706603102592009-04-27T00:34:00.000-07:002009-04-27T00:34:00.000-07:00Yoshinori,
Very nice prepared slides. Good work. ...Yoshinori,<br /><br />Very nice prepared slides. Good work. Regarding queue size Baron mentions I'm very surprised by results - the drive itself normally can't have TCQ more than few commands (and not everyone can support it) - could something else be effect here ?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-3043493300793589377.post-70745494984886067682009-04-25T12:52:00.000-07:002009-04-25T12:52:00.000-07:00Thanks. I missed your presentation. I did not kn...Thanks. I missed your presentation. I did not know about the I/O scheduler queue size. Very useful.<br /><br />BaronBaronhttps://www.blogger.com/profile/01621441847303652718noreply@blogger.com