SyncGateway Community CPU Limits?

Hi all,

we are managing the infrastructure for an application that is using the SG 2.8.3 Community Edition to enrich data and manage the access to documents via channels.

The application is experiencing frequent slowness and we observed from Kubernetes that the CPU used by the SG seems gapped to 1CPU (about 1000m Cores).

Is there an implicit limit in the SG or a default configuration value?
If yes, is there any chance to increase it?

The Sync Gateway process should be set up by default to use all of the available resources. That includes following cgroup limits, etc. that Kubernetes or any other orchestrator uses under the hood to run a Sync Gateway container.

Can you double check your K8s configuration and see whether you’re unintentionally limiting it to 1 CPU?

You can also make sure either you’re not setting the GOMAXPROCS environment variable, and letting the default behaviour of all CPUs apply, or setting it to an explicit value.

1 Like

We observed that the Kubernetes Deployment related to the SyncGateway has an environment variable GOMAXPROCS set to 1.

This should limit the container to use a maximum of 1 CPU for the SG’s processes. Hence we will try to update this value.

Many thanks for all the support!

1 Like