<span style="font-size: 10pt; font-family: Verdana; color: black;">We have a box that is file server that appears to be having some
I/O issues so I have been reading up on tuning for improved I/O performance.<span style=""> </span>RedHat has an article regarding how to tune
your VM - <a href="http://www.redhat.com/magazine/001nov04/features/vm/#tuning-vm">http://www.redhat.com/magazine/001nov04/features/vm/#tuning-vm</a>
</span>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: Verdana; color: black;">Does anybody have any experience tuning bdflush?<span style=""> </span>The docs I am reading appear to be
contradicting, or atleast they appear that way to me.<span style=""> </span>Basically there are 6 tunable parameters for
bdflush – nfract, ndirty, interval, age_buffer, nfract_sync, & nfract_stop_bdflush.</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: Verdana; color: black;">The docs state their definitions to be</span><br>
<code><b style=""><span style="font-size: 10pt; font-family: Verdana;">nfract</span></b></code><code><span style="font-size: 10pt; font-family: Verdana;"> -</span></code><span style="font-size: 10pt; font-family: Verdana;">
The percentage of dirty pages in
the buffer cache required to activate the </span><code><span style="font-size: 10pt; font-family: Verdana;">bdflush</span></code><span style="font-size: 10pt; font-family: Verdana;"> task</span></p>
<p class="MsoNormal"><code><b style=""><span style="font-size: 10pt; font-family: Verdana;">ndirty</span></b></code><span style="font-size: 10pt; font-family: Verdana;"> <span style=""> </span>- The maximum number of dirty pages in the
buffer cache to write to disk in each </span><code><span style="font-size: 10pt; font-family: Verdana;">bdflush</span></code><span style="font-size: 10pt; font-family: Verdana;"> execution</span></p>
<p class="MsoNormal"><code><b style=""><span style="font-size: 10pt; font-family: Verdana;">interval</span></b></code><b style=""><span style="font-size: 10pt; font-family: Verdana;"> </span></b><span style="font-size: 10pt; font-family: Verdana;">
- The
number of jiffies (10ms periods) to delay between </span><code><span style="font-size: 10pt; font-family: Verdana;">bdflush</span></code><span style="font-size: 10pt; font-family: Verdana;"> iterations</span></p>
<p class="MsoNormal"><code><b style=""><span style="font-size: 10pt; font-family: Verdana;">age_buffer</span></b></code><span style="font-size: 10pt; font-family: Verdana;"> - The time for a normal buffer to
age before it is considered for flushing back to disk</span></p>
<p class="MsoNormal"><code><b style=""><span style="font-size: 10pt; font-family: Verdana;">nfract_sync</span></b></code><span style="font-size: 10pt; font-family: Verdana;"> - The percentage of dirty pages
in the buffer cache required to cause the tasks which are writing pages of
memory to begin writing those pages to disk instead</span></p>
<p class="MsoNormal"><code><b style=""><span style="font-size: 10pt; font-family: Verdana;">nfract_stop_bdflush</span></b></code><span style="font-size: 10pt; font-family: Verdana;"> - The percentage of dirty pages
in buffer cache required to allow </span><code><span style="font-size: 10pt; font-family: Verdana;">bdflush</span></code><span style="font-size: 10pt; font-family: Verdana;"> to return to idle state</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: Verdana; color: black;">It then says</span><br>
<i style=""><span style="font-size: 10pt; font-family: Verdana;">Generally, systems that require
more free memory for application allocation want to set the </span></i><code><i style=""><span style="font-size: 10pt; font-family: Verdana;">bdflush</span></i></code><i style=""><span style="font-size: 10pt; font-family: Verdana;">
values higher (except for the </span></i><code><i style=""><span style="font-size: 10pt; font-family: Verdana;">age_buffer</span></i></code><i style=""><span style="font-size: 10pt; font-family: Verdana;">, which would be moved lower), so
that file data is sent to disk more frequently and in greater volume, thus
freeing up pages of RAM for application use. This, of course, comes at the
expense of CPU cycles because the system processor spends more time moving data
to disk and less time running applications. Conversely, systems which are
required to perform large amounts of I/O would want to do the opposite to these
values, allowing more RAM to be used to cache disk file so that file access is
faster.</span></i><span style="font-size: 10pt; font-family: Verdana;"></span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: Verdana;">To me,
this ^ looks like the opposite of what the definitions for each parameter state.<span style=""> </span>I would think if I want to allow more RAM to
be used for faster disk access than I would want to <b style="">INCREASE</b> all of the parameters ( I am not positive about
nfract_stop_bdflush though).<span style=""> </span>Am I
reading this wrong because to me it looks like it is contradicting itself.<span style=""> </span>For example, if I want to free up RAM why
wouldn't I lower nfract, thus lowering the required amount of dirty pages in
the buffer cache before it writes back to disk?<span style="">
</span>Earlier in the article they have an example that states</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: Verdana;"></span><tt><i style=""><span style="font-family: Verdana;">#bump up the percentage of memory in use to activate bdflush</span></i></tt><tt><i style="">
<span style="font-family: Verdana;"><br>
vm.bdflush="40 500 0 0 500 3000 60 20 0"</span></i></tt><i style=""><span style="font-family: Verdana;"></span></i></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: Verdana; color: black;">If I take that and compare it to the standard RHEL 3 /proc/sys/vm/bdflush
of <br>
50<span style=""> </span>500<span style=""> </span>0<span style="">
</span>0<span style=""> </span>500<span style=""> </span>3000<span style="">
</span>80<span style=""> </span>50<span style=""> </span>0</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: Verdana; color: black;">It would seem to me that this would lower the amount of memory in
use to activate bdflush.<br>
Am I missing something and just completely not understanding this
or is this doc and example incorrect?</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: Verdana; color: black;">Thanks,<br>
Nick</span></p>