Hi
im curious how people manage vertically scaling their percona MongoDB deployments we have a sharded replicated mongodb cluster with resources limits and requests set.
resources:
limits:
cpu: 8
memory: 8Gi
requests:
cpu: 300m
memory: 500M
The workload can be quite dynamic and im curious if there is some way to auto adjust the requests/limits based on the workload.
Hi, I hope you use our Percona Operator for MongoDB. If so, there are multiple components that the Operator deploys and manages: MongoDB replica set instances, mongos and config server instances, etc. To add or reduce CPU or Memory, you need to edit the corresponding sections in the Custom Resource - as you showed in the sample CR code.
We follow the structure for requests and limits that Kubernetes provides .
To add more resources to your MongoDB replica set instances, edit the following section in the Custom Resource:
spec:
replsets:
resources:
requests:
memory: 4G
cpu: 2
limits:
memory: 4G
cpu: 2
Use our reference documentation for the Custom Resource options for more details about other components.