Skip to content

Commit c9c5c21

Browse files
committed
MB-34955: Reduce size of ADM's CompletedQueue
The internal folly::USPSCQueue defaults to create a single segment, the segment holds 256 entries (256 SyncWrites) This default setting impacts the bucket overhead, for a single node an empty bucket (i.e. 1024 vbuckets) the introduction of the folly::USPSCQueue increased mem_used by 24MB, that increase was first seen from 6.5.0-3621 (22MB) to 6.5.0-3622 (46MB). This commit sets the initial size of the queue to store 32 entries per segment, bringing the bucket mem_used down to approx 23MB Change-Id: I08a0be01db0d94d6efcbb7f2e449e269b12ed440 Reviewed-on: http://review.couchbase.org/113375 Reviewed-by: Dave Rigby <[email protected]> Tested-by: Build Bot <[email protected]>
1 parent 443ff63 commit c9c5c21

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

engines/ep/src/durability/active_durability_monitor.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -445,8 +445,8 @@ class ActiveDurabilityMonitor::ResolvedQueue {
445445

446446
private:
447447
// Unbounded, Single-producer, single-consumer Queue of SyncWrite objects,
448-
// non-blocking variant.
449-
using Queue = folly::USPSCQueue<DurabilityMonitor::SyncWrite, false>;
448+
// non-blocking variant. Initially holds 2^5 (32) SyncWrites
449+
using Queue = folly::USPSCQueue<DurabilityMonitor::SyncWrite, false, 5>;
450450
Queue queue;
451451
// Track the highest Enqueued Seqno to enforce enqueue ordering.
452452
Monotonic<int64_t> highEnqueuedSeqno = {0};

0 commit comments

Comments
 (0)