<p>You may have noticed that in the &#8220;vmstat -s&#8221; output there are several counters related to I/O.<br />
</p>
<pre><code>...
            344270755 start I/Os
             16755196 iodones
...</code></pre>
<p>Here&#8217;s what the man page has to say about these counters:<br />
</p>
<pre><code>start I/Os
                   Incremented for each read or write I/O request initiated by
                   VMM. This count should equal the sum of page-ins and page-outs.

iodones
                   Incremented at the completion of each VMM I/O request.</code></pre>
<p>There&#8217;s something fishy going on here. The system started roughly 34 times more I/Os than it completed.  So, what gives? I had a discussion about this once in which the admin explained that I/Os get started, but not completed. The thinking goes that the I/Os get put into a queue, and if the I/O isn&#8217;t filled quickly enough it times out and retries. Sort of like a TCP retransmit for disk I/Os.<br />
<br />
But, if that happened, you would think that there would be an error in the errpt, or errors logged in the device subsystem.  At least you would see unreasonable I/O service times. And I never see anything like that.<br />
<br />
What&#8217;s seems to be going on is that the I/O&#8217;s get dispatched to the VMM, and if they are sequential they are coalesced into 1 I/O and serviced by 1 system call.  When the system detects sequential I/O, the next I/O reads in 2 * j2_minPageReadAhead file pages, the next one after that reads in 4 * j2_minPageReadAhead file pages, and so on until it reaches j2_maxPageReadAhead.  Each set of I/Os is serviced by 1 system call, even though it pulls in multiple pages. And that is way better for performance.<br />
<br />
So the ratio of start I/Os to iodones is really an indicator of how much sequential I/O the system is doing.  And, if the system has lots of sequential I/O, it can be an indicator used to tune JFS2 read-ahead.<br />
<br />
And remember, the difference between minfree and maxfree should be at least equal to j2_maxPageReadAhead. So if you make changes, adjust minfree and maxfree accordingly.</p>
{"id":598,"date":"2010-12-20T21:59:59","date_gmt":"2010-12-21T01:59:59","guid":{"rendered":"http:\/\/patrickv.info\/wordpress\/?p=598"},"modified":"2010-12-20T21:59:59","modified_gmt":"2010-12-21T01:59:59","slug":"where-do-my-ios-go","status":"publish","type":"post","link":"https:\/\/rootuser.ninja\/index.php\/2010\/12\/20\/where-do-my-ios-go\/","title":{"rendered":"Where do my I\/Os go?!?"},"content":{"rendered":"<p>You may have noticed that in the &#8220;vmstat -s&#8221; output there are several counters related to I\/O.<br \/>\n<\/p>\n<pre><code>...\n            344270755 start I\/Os\n             16755196 iodones\n...<\/code><\/pre>\n<p>Here&#8217;s what the man page has to say about these counters:<br \/>\n<\/p>\n<pre><code>start I\/Os\n                   Incremented for each read or write I\/O request initiated by\n                   VMM. This count should equal the sum of page-ins and page-outs.\n\niodones\n                   Incremented at the completion of each VMM I\/O request.<\/code><\/pre>\n<p>There&#8217;s something fishy going on here. The system started roughly 34 times more I\/Os than it completed.  So, what gives? I had a discussion about this once in which the admin explained that I\/Os get started, but not completed. The thinking goes that the I\/Os get put into a queue, and if the I\/O isn&#8217;t filled quickly enough it times out and retries. Sort of like a TCP retransmit for disk I\/Os.<br \/>\n<br \/>\nBut, if that happened, you would think that there would be an error in the errpt, or errors logged in the device subsystem.  At least you would see unreasonable I\/O service times. And I never see anything like that.<br \/>\n<br \/>\nWhat&#8217;s seems to be going on is that the I\/O&#8217;s get dispatched to the VMM, and if they are sequential they are coalesced into 1 I\/O and serviced by 1 system call.  When the system detects sequential I\/O, the next I\/O reads in 2 * j2_minPageReadAhead file pages, the next one after that reads in 4 * j2_minPageReadAhead file pages, and so on until it reaches j2_maxPageReadAhead.  Each set of I\/Os is serviced by 1 system call, even though it pulls in multiple pages. And that is way better for performance.<br \/>\n<br \/>\nSo the ratio of start I\/Os to iodones is really an indicator of how much sequential I\/O the system is doing.  And, if the system has lots of sequential I\/O, it can be an indicator used to tune JFS2 read-ahead.<br \/>\n<br \/>\nAnd remember, the difference between minfree and maxfree should be at least equal to j2_maxPageReadAhead. So if you make changes, adjust minfree and maxfree accordingly.<\/p>\n","protected":false},"excerpt":{"rendered":null,"protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2,1],"tags":[],"class_list":["post-598","post","type-post","status-publish","format-standard","hentry","category-aix-notes","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/rootuser.ninja\/index.php\/wp-json\/wp\/v2\/posts\/598","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/rootuser.ninja\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/rootuser.ninja\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/rootuser.ninja\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/rootuser.ninja\/index.php\/wp-json\/wp\/v2\/comments?post=598"}],"version-history":[{"count":0,"href":"https:\/\/rootuser.ninja\/index.php\/wp-json\/wp\/v2\/posts\/598\/revisions"}],"wp:attachment":[{"href":"https:\/\/rootuser.ninja\/index.php\/wp-json\/wp\/v2\/media?parent=598"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rootuser.ninja\/index.php\/wp-json\/wp\/v2\/categories?post=598"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rootuser.ninja\/index.php\/wp-json\/wp\/v2\/tags?post=598"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}