Sync_gateway and beam.smp resource utilization

I have CB deployed on Kubernetes for trial, I noticed that sync_gateway and beam.smp are the top CPU consumers on my Kubernetes nodes. It was a default configuration of CB (deployed via helm) and the load is minimum. Are there any recommendations on settings to reduce resource utilization?
xxxxx [12:32 PM]
top - 17:31:50 up 23:12, 1 user, load average: 1.66, 1.75, 1.82
Tasks: 453 total, 2 running, 451 sleeping, 0 stopped, 0 zombie
%Cpu(s): 2.1 us, 3.7 sy, 0.0 ni, 92.9 id, 1.2 wa, 0.0 hi, 0.0 si, 0.0 st
KiB Mem : 65958000 total, 44499732 free, 6490844 used, 14967424 buff/cache
KiB Swap: 0 total, 0 free, 0 used. 57177188 avail Mem

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
104067 test 20 0 2475324 401472 3688 S 30.8 0.6 170:05.68 beam.smp
5415 root 20 0 1857232 32448 6960 S 27.2 0.0 49:52.40 sync_gateway
15113 root 20 0 2781244 200052 42948 S 8.6 0.3 114:41.58 kubelet
6252 root 12 -8 84552 908 776 S 4.6 0.0 75:09.50 audispd

Sync config:
sync-config-import.json

{
“logging”: {
“console”: {
“log_keys”: [""]
}
},
“databases”: {
“test”: {
“server”: “couchbase://couchbase.test.svc.cluster.local”,
“bucket”: “test”,
“username”: “xxx”,
“password”: “xxx”,
“enable_shared_bucket_access”: true,
“num_index_replicas”: 0,
“sync”: “function(doc, oldDoc) {\n // Don’t do anything when deleting\n if (doc._deleted) {\n\treturn;\n }\n\n // The ‘createdBy’ property must match the user creating the document \n // requireUser(doc.createdBy)\n\n channel(doc.createdBy)\n}”,
“users”: {
“GUEST”: {“disabled”: true, “admin_channels”: ["
"]},
“iOS”: {“password”: “x”, “admin_channels”: ["*"]},
“user1@txxxx”: {“password”: “xxxx”, “admin_channels”: [“user1@txxx”]},
“user2@xxx”: {“password”: “xxxx”, “admin_channels”: [“user2@xxxxx”]},
“user3@xxxxx”: {“password”: “xxxx”, “admin_channels”: [“user3@xxxxx”]},
“user4@xxxxx”: {“password”: “xxxx”, “admin_channels”: [“user4@xxxxx”]},
“user5@xxxxx”: {“password”: “xxxx”, “admin_channels”: [“user5@xxxxx”]}
},
“allow_conflicts”: false,
“revs_limit”: 20,
“import_docs”: true
}
},
“adminInterface”: “:4985”
}

sync-config.json

{
“logging”: {
“console”: {
“log_keys”: [""]
}
},
“databases”: {
“xxxxx”: {
“server”: “couchbase://couchbase.xxxxx.svc.cluster.local”,
“bucket”: “xxxxx”,
“username”: “sync_gateway”,
“password”: “xxxxxx”,
“enable_shared_bucket_access”: true,
“num_index_replicas”: 0,
“sync”: “function(doc, oldDoc) {\n // Don’t do anything when deleting\n if (doc._deleted) {\n\treturn;\n }\n\n // The ‘createdBy’ property must match the user creating the document \n // requireUser(doc.createdBy)\n\n channel(doc.createdBy)\n}”,
“users”: {
“GUEST”: {“disabled”: true, “admin_channels”: ["
"]},
“iOS”: {“password”: “xxxxx”, “admin_channels”: ["*"]},
“user1@xxxxx”: {“password”: “xxxx”, “admin_channels”: [“user1@xxxxx”]},
“user2@xxxxx”: {“password”: “xxxx”, “admin_channels”: [“user2@xxxxx”]},
“user3@xxxxx”: {“password”: “xxxx”, “admin_channels”: [“user3@xxxxx”]},
“user4@xxxxx”: {“password”: “xxxx”, “admin_channels”: [“user4@xxxxx”]},
“user5@xxxxx”: {“password”: “xxxx”, “admin_channels”: [“user5@xxxxx”]}
},
“allow_conflicts”: false
}
},
“adminInterface”: “:4985”
}

You can get a CPU profile from Sync Gateway through the Admin API at the following URL: http://sghost:4985/_debug/pprof/profile

If you get one and attach it to this forum post in a zip, I can take a look at it with pprof and give some indication of what SG is doing.

Also, it would be great if you could get a cbcollect_info per the description on working with technical support so we can have a look at the output from cbcollect_info.

If you could, please then let support (if you are a subscriber) or your local team (if you’re evaluating) know where it’s been uploaded to and we can get the right eyes on it. If you don’t have either, feel free to private message me with details.