zalando / postgres-operator

Postgres operator creates and manages PostgreSQL clusters running in Kubernetes
https://postgres-operator.readthedocs.io/
MIT License
4.29k stars 974 forks source link

Support removing CPU limit #2428

Closed josedev-union closed 7 months ago

josedev-union commented 1 year ago

Please, answer some short questions which should help us to understand your problem / question better?

Context

I've been running zalando postgresql clusters as the database for Graph node for several months. I collected postgres metrics(from postgres-exporter deployed as a sidecar of postgresql cluster) and patroni metrics also from spilo 8008 port to found the RC of the frequent performance issues (facing when I ran compute-intensive queries in subgraph). After some investigation, I figured out the reason and it was cpu throttling in postgresql clusters. To make things worse, becaues of slowness by cpu throttling, db connections are increased by graph-node. The increase in the active connection results in the resource usage increase. Cyclic causality

Cpu throttling occurs even if postgres pods don't use much cpu in fact and it turns out k8s cpu limit is ridiculous. I want to stop using cpu limit but when i set it as none, default value 1 is used.

Expectation

If cpu limit field is set as null explicitly, I expect to not set cpu limit to postgresql pods instead of setting default values. If cpu limit field is not set explicitly, I expect the default limit value.

jchomat commented 10 months ago

Hello, CPU throttling is pretty annoying. i would prefered disabled it if not set but at least having a possibility to disable it if needed could be great

andreykeen commented 10 months ago

The same thoughts about CPU throttling. I'd prefer to be able to disable any settings in postgres_pod_resources section.

oldluke92 commented 9 months ago

This is a duplicate of #2057, which is also open.

mmoscher commented 7 months ago

@josedev-union this issue has been solved with #2524 and can be closed.