You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
MB-56673: Reduce dcp_{backfill,scan}_byte_limit defaults for serverless
At present serverless and on-prem profiles use the same default values
for dcp_backfill_byte_limit and dcp_scan_byte_limit. However when
running on serverless profiles we typically have much lower bucket
quotas (e.g. 256MB), and hence allowing each DCP connection to
backfill up to 20MB means backfill memory can quickly grow and reach
the current threshold of backfill_mem_threshold - 96% of bucket quota;
which is above the frontend mutation tmpOOM threshold (of 93%). Indeed
in one test this lead to hardOOM errors being returned as memory
spiked above bucket quota.
While a more robust solution for DCP memory usage is being developed
(see MB-46740), as a short-term tactical fix this patch reduces the
defaults for serverless:
* dcp_backfill_byte_limit is reduced from 20MB to 512kB.
* dcp_scan_byte_limit is reduced from 4MB to 128kB.
The updated default values for dcp_backfill_byte_limit on serverless
is based on emperical evidence - we have seen DCP consumers (such as
GSI) consume 160 MB of a 256 MB bucket when 2 GSI nodes are
configured. Assuming up to 12 GSI nodes in a serverless cluster, that
means GSI would create up to 48 connections. If we want to keep DCP
memory below 10%, that means less than ~25MB of memory total across
the 48 connections, which is approximately 0.5MB. dcp_scan_byte_limit
is then set to a similar ratio of byte_limit as it was before (1/4).
Change-Id: I1c8fdd14f6106af1ccc69e147fe2eb04be351219
Reviewed-on: https://review.couchbase.org/c/kv_engine/+/190290
Tested-by: Build Bot <[email protected]>
Reviewed-by: Paolo Cocchi <[email protected]>
0 commit comments