[BP 7.1.1 MB-52029] - Eventing Service should honor the CPU & Memory limits set in cgroups

Description

As part of addressing in 7.1.1, the services need to respect the value of the GOMAXPROCS env var if specified. FTS does this in a simple way here, though it seems a bit unnecessary as according to https://pkg.go.dev/runtime#GOMAXPROCS, the GOMAXPROCS default is runtime.NumCPU anyway. Query does it in a slightly more complicated fashion here, but it looks like it also works.

On first look at the code, it appears eventing-producer process already honors whatever is set in GOMAXPROCS. The part that's not very clear is how CPU utilisation of eventing-consumer processes (as many as number of deployed functions) can be controlled. It appears, linux cgroup itself should take care of it. But we should analyse if there are any implications. Finally, eventing memory quota should be set as MIN(eventing-quota, cgroup_mem_limit)

Components

Affects versions

Fix versions

Labels

Environment

None

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

None

Release Notes Description

None

Activity

Show:

CB robot October 7, 2022 at 8:53 AM

Build couchbase-server-7.2.0-5000 contains eventing commit ddebd9e with commit message:
: Enforce cgroup memory limit

Sujay Gad June 30, 2022 at 7:16 AM

Closing this ticket as testing for cgroup limits feature has been completed.

CB robot May 31, 2022 at 6:02 AM

Build couchbase-server-7.1.1-3105 contains eventing commit ddebd9e with commit message:
: Enforce cgroup memory limit

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 May 30, 2022 at 4:29 AM
Updated October 7, 2022 at 8:53 AM
Resolved May 31, 2022 at 5:10 AM
Instabug