Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You could play with the tuneables in <code>/proc/sys/vm</code>. For example, increase the value in <code>dirty_writeback_centisecs</code> to make pdflush wake up somewhat less often, increase <code>dirty_expire_centiseconds</code> so data is allowed to stay dirty for longer until it must be written out, and increase <code>dirty_background_ratio</code> to allow more dirty pages to stay in RAM before something must be done.<br> See <a href="http://www.westnet.com/~gsmith/content/linux-pdflush.htm" rel="nofollow">here</a> for a somewhat comprehensive description of what all the values do.</p> <p>Note that this will affect <strong>every</strong> process on your machine, but seeing how you're running a huge database server, chances are that this is no problem since you don't want anything else to run on the same machine anyway.</p> <p>Now of course this delays writes, but it still doesn't fully solve the problem of dirty page writebacks competing with <code>write</code> (though it will likely collapse a few writes if there are many updates).<br> <strong>But:</strong> You <em>can</em> use the <a href="http://man7.org/linux/man-pages/man2/arm_sync_file_range.2.html" rel="nofollow"><code>sync_file_range</code></a> syscall to force beginning write-out of pages in a given range on your "write" file descriptor (<code>SYNC_FILE_RANGE_WRITE</code>). So while the dirty pages will be written back at some unknown time later (and with greater grace periods), you manually kick off writeback on the ones you're interested.<br> This doesn't give any guarantees, but it <em>should</em> just work.</p> <p>Be sure to absolutely positively read the documentation, better read it twice. <code>sync_file_range</code> can very easily corrupt or lose data if you use it wrong. In particular, you must be sure metadata is up-to-date and flushed if you appended to a file, or data that has been "successfully written" will just be "gone" in case of a crash.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload