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

Migrate to Facebook Folly executors for CPU & IO background tasks

    XMLWordPrintable

Details

    Description

      Investigate the feasibility of migrating from our own executor to Folly::ThreadPoolExecutor (CPU and IO) instead.

      Notes:

      What:
      1. Add a folly::IOThreadPoolExecutor + HHWheelTimer (does it already have one by default?) for scheduled tasks
      2. Add micro-benchmark to test basic functionality
      2a. Simple ping-pong (schedule then execute) latency for single task
      2b. Expand to larger number of outstanding scheduled events (10,000s - see MB-39815 which requires up to 1024 tasks per Bucket).

      2. Add stats similar to current scheduler / runtime stats - maybe viaTaskStatsCallback? Should give us functionally same as current ExecutorPool (NonIO?)
      3. Migrate Tasks over - ideally allowing to run on either thread pools (at least compile-time, preferably runtime at startup; ideally on-the-fly but maybe not feasible).
      3a) DurabilityTimeoutTask is good first candidate - already a problem - see MB-39815.

      Attachments

        Issue Links

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

          Activity

            People

              drigby Dave Rigby (Inactive)
              trond Trond Norbye
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty