title: Difference between vm.dirty_ratio and vm.dirty_background_ratio?
body: <p>I'm currently experimenting with the kernel parameters found in <code>/proc/sys/vm</code>, especially <code>dirty_ratio</code> and <code>dirty_background_ratio</code>.</p>
  
  <p>The kernel doc has the following explanations for both:</p>
  
  <blockquote>
    <p>dirty_background_ratio</p>
    
    <p>Contains, as a percentage of total available memory that contains free pages
    and reclaimable pages, the number of pages at which the background kernel
    flusher threads will start writing out dirty data.</p>
  </blockquote>
  
  <p>and</p>
  
  <blockquote>
    <p>dirty_ratio</p>
    
    <p>Contains, as a percentage of total available memory that contains free pages
    and reclaimable pages, the number of pages at which a process which is
    generating disk writes will itself start writing out dirty data.</p>
  </blockquote>
  
  <p>On my linux system <code>dirty_background_ratio</code> is 10 and <code>dirty_ratio</code> is 20. I understand that the difference is, who the dirty data writes. So if my used memory reaches 10% the kernel starts writing back and 20% should never be reached.</p>
  
  <p>My question now is: Has the higher value of <code>dirty_background_ratio</code> and <code>dirty_ratio</code> any meaning or is it just a matter of "what is the lower value and who has it"?</p>