XDCR CCR - Prevent unnecessary V8 GC runs

Description

With the V8 upgraded to v10.7.21 , am empty js-evaluator worker (no code loaded and no traffic) takes up around 1.54 MB heap memory.

XDCR CCR for some reason has chosen to set the heap quota as 1.50 MB. Heap Quota dictates how frequently should the js-evaluator's GC run to contain it's memory usage.

However, keeping the heap quota to as low as 1.5 MB is a misconfiguration which causes GC to be triggered unnecessarily on an empty js-evaluator worker. These uneccesary GC runs might eat up precious CPU resources and may impact XDCR's performance.

Solution:

1. Either increase the heap quota to a respectable limit such as 150 MB (an empty jsevaluator's worker will never hit 150 MB).

2. Another option, which the XDCR team is best equipped to make a decision on, is to set number of js-evaluator's workers to 0. No workers, means no V8 isolates, no heap, no GC.

Components

Affects versions

Fix versions

Labels

Environment

None

Link to Log File, atop/blg, CBCollectInfo, Core dump

None

Release Notes Description

None

Activity

Ayush Nayyar November 21, 2022 at 9:13 AM

Sanity tests pass.

Chanabasappa Ghali November 2, 2022 at 5:56 AM

  can you run  basic XDCR sanity test to close this ticket?

CB robot October 31, 2022 at 11:27 PM

Build couchbase-server-7.0.5-7634 contains goxdcr commit 91e59b7 with commit message:
https://couchbasecloud.atlassian.net/browse/MB-54317#icft=MB-54317: set JSEngineWorkers to 0 by default

CB robot October 31, 2022 at 11:27 PM

Build couchbase-server-7.0.5-7634 contains goxdcr commit 4f28172 with commit message:
https://couchbasecloud.atlassian.net/browse/MB-54317#icft=MB-54317: prevent CCR replication from created if JSEngine is disabled

CB robot October 31, 2022 at 11:27 PM

Build couchbase-server-7.0.5-7634 contains goxdcr commit c81ec68 with commit message:
https://couchbasecloud.atlassian.net/browse/MB-54317#icft=MB-54317: Increase js evaluator quota

Fixed
Pinned fields
Click on the next to a field label to start pinning.

Details

Assignee

Reporter

Is this a Regression?

Unknown

Triage

Untriaged

Story Points

Priority

Instabug

Open Instabug

PagerDuty

Sentry

Zendesk Support

Created October 28, 2022 at 10:44 AM
Updated November 21, 2022 at 9:13 AM
Resolved November 1, 2022 at 3:02 AM
Instabug

Flag notifications