Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-60033

Add flag to use O_SYNC mode during rpc

    XMLWordPrintable

Details

    • 0

    Description

      RPC writes use buffered IO.

      (There are some restrictions with DirectIO (aligned size, aligned buffers, file truncate))

      On slow or bandwidth limited drives, if dirty writeback cannot catchup,  as a throttling mechanism, kernel (balance_dirty_pages) puts the process to sleep. 
      Usually the delay is in order of 100ms but there can be a possibility that the process can get stalled/paused

      https://access.redhat.com/solutions/899013 

      https://elixir.bootlin.com/linux/latest/source/mm/page-writeback.c#L1925

      With sync flag,  we can limit the generation of dirty pages which avoids this possibility as the writes are synchronous. Currently in plasma LSS files are opened using the same flag.

      We already have a rpc config for this ((indexer.plasma.shardCopy.rpc.server.periodicSyncSize:0). From tests with the config, I did not see noticeable difference in perf tests that i have run

       

       

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            saptarshi.sen Saptarshi Sen
            saptarshi.sen Saptarshi Sen
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty