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.
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.
|For Gerrit Dashboard: MB-54317|
|182111,2||MB-54317: set JSEngineWorkers to 0 by default||cheshire-cat||goxdcr||Status: MERGED||+2||+1|
|182112,2||MB-54317: prevent CCR replication from created if JSEngine is disabled||cheshire-cat||goxdcr||Status: MERGED||+2||+1|
|182116,2||MB-54317: Increase js evaluator quota||cheshire-cat||goxdcr||Status: MERGED||+2||+1|