What are the downside of having more db connections open than required?

102 Views Asked by At

I have a bunch services that might have overestimated the connection pool size config , let's some of them have twice as many connections open to the db then that are actually required .
I am trying to get articulate the downside of over-provisioning - my understanding is on client side it is like having few open files all the time , doesn't really strain the system resources unless it is in 10s of thousands.
What is the cost of this on the db server though - are these extra idle connections consuming some db resource that could be harmful in the longer run ?
For context , its postgresql db on RDS being used here.

1

There are 1 best solutions below

0
On

It is tough to answer without looking at the numbers. But since you are posing a generic question, the generic answer is yes it would but YMMV.

I find this video recording by Andrew about Oracle DB connection pool performance a good reference point to understand how the DB performance curve is related to open connections. The video is old but it sets the first principles that you can take away to refine your thinking further.