On 28/04/2008, at 4:59 PM, Alan Chaney wrote:
David Smith wrote:


No, I have at most 20 idle connections, that's goes right, but my boss want less idle connections to avoid to overload the database server. So there isn't way to close an idle connection to remove the relative process? If so, I will set maxIdle="2" and everyone will be happy (expecially me :)

I'll bet money the added, idle postgres connections are just sleeping while they wait for work. Given idle connections contribute virtually no additional load, don't see his argument that idle connections contribute to a database overload. If the minor increase in overhead due to sleeping threads actually overloads the database, you need to let your boss know the server hardware is way too frail for production use and needs to be upgraded.
--David
Agreed. I use postgres and with ps alx | grep postgres each connection shows as idle (when its not being used!) and consumes about 140k bytes of memory. On a modern server that can hardly be considered as any use at all!

This sounds as if it is out of a Dilbert comic.

Paint it red, that way it will go faster.

Actually, reducing it will if anything make it slower due to increased latency when the application does actually need the additional connections. That being said and done, setting number of idle procs to 1000 isn't such a good idea either. ^^

Andrew

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to