-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Labels
area/docdbYugabyteDB core featuresYugabyteDB core featureskind/enhancementThis is an enhancement of an existing featureThis is an enhancement of an existing featurepriority/mediumMedium priority issueMedium priority issue
Description
Jira Link: DB-3158
The biggest contributor to higher tail latency is caused by the following case of starvation -- in case there is a high-degree of contention, waiting transactions may get starved by incoming operations which contend for the same latch. We currently have no mechanism to prevent this, which can lead to high tail-latency in some workloads.
Less critically, our process for determining which waiters can be resumed and subsequently resuming them could be improved in a couple ways:
- We currently iterate over each of the blocker's waiters and separately acquire a write lock on a mutex to remove the waiter from
waiter_status_
before resuming the waiter. We need not re-acquire this write lock for every waiter and can simply acquire it once - We currently resume waiters in the order they arrived, and in serial on a single thread. It might be better to understand which of the waiters will conflict with each other, and then either:
a. Resolve the first-in waiter and all non-conflicting other waiters in parallel
b. Resolve the largest set of non-conflicting waiters in parallel, then the second largest, etc
Metadata
Metadata
Assignees
Labels
area/docdbYugabyteDB core featuresYugabyteDB core featureskind/enhancementThis is an enhancement of an existing featureThis is an enhancement of an existing featurepriority/mediumMedium priority issueMedium priority issue
Type
Projects
Status
Done