Details
-
Improvement
-
Resolution: Fixed
-
Major
-
Cheshire-Cat
-
KV Sprint 2020-July, KV Sprint 2020-Oct
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
- blocks
-
MB-39815 Avoid busy-polling for SyncWrite timeout checking
- Closed
- causes
-
MB-43015 Observing 50% drop xdcr throughput in 7.0.0-3870 build
- Closed
- depends on
-
MB-42027 Data race on ThreadLocal<EventuallyPersistentEngine*> when using FollyExecutorPool
- Resolved
-
MB-41805 False positive TSan race under FollyExecutorPool due to mixed GCC / Clang built libraries
- Closed
-
MB-41844 Data race in FollyExecutorPool::doTaskQStat
- Closed
-
MB-41896 ThreadSanitizer CHECK failed: sanitizer_deadlock_detector1.cc:166 "((!dd.isHeld(<->dd, m->id))) != (0)" (0x0, 0x0)
- Closed
-
MB-42029 Data race during EventuallyPersistentEngine dtor with FollyExecutorPool
- Closed
-
MB-42204 FollyExecutorPool: Intermittent hang during unregisterTaskable() + concurrent schedule()
- Closed
- relates to
-
MB-43156 FollyExecutorPool does not update wakeTime when wake() called
- Closed
-
MB-32204 Investigate safer GlobalTask scheduling API
- Open
-
MB-26832 Bring the many 'copied' task trigger mechanisms into the task API
- Resolved
-
MB-26831 ActiveStreamCheckpointProcessorTask::run wakeUp logic could be simplified
- Closed
-
MB-36610 Investigate using eventfd() for inter-thread notification
- Closed
-
MB-38426 Reduce SyncWrite latency
- Closed
-
MB-43240 Unify memcached and ep-engine thread pools
- Closed