Skip to content

Commit

Permalink
MB-46474: Remove DCP stats from snapshot stats
Browse files Browse the repository at this point in the history
The DCP stats group contains details about every DCP connection and
stream currrently open. This can easily reach 100,000s of elemnts for
even modest workloads), and consequently the amount of memory required
to serialise them can be of the order of 100MB+.

This can be a significant jump in mem_used, particulary for buckets
with a small memory quota; which can result in mem_used exceeding the
high watermark and many items being evicted.

Given I can't recall an occasion when the dcp content in stats.json
has actually been used to debug anything; and we have essentially
equivilent information in stats.log recorded by cbcollect_info; simply
nix the DCP stats from those which are snapshotted and persisted.

Change-Id: Idc3adac922daed501b6e44067fb738bb95cb33e8
Reviewed-on: http://review.couchbase.org/c/kv_engine/+/157437
Tested-by: Build Bot <build@couchbase.com>
Reviewed-by: Paolo Cocchi <paolo.cocchi@couchbase.com>
  • Loading branch information
daverigby committed Jul 23, 2021
1 parent 7de5251 commit 866be8c
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions engines/ep/src/kv_bucket.cc
Expand Up @@ -1190,8 +1190,6 @@ void KVBucket::snapshotStats(bool shuttingDown) {
bool rv = engine.getStats(&snap, {}, {}, snapshot_add_stat) ==
cb::engine_errc::success;

engine.doDcpStatsInner(&snap, snapshot_add_stat, {});

nlohmann::json snapshotStats(snap.smap);
if (rv && shuttingDown) {
snapshotStats["ep_force_shutdown"] =
Expand Down

0 comments on commit 866be8c

Please sign in to comment.