Re: CDBI and mod_perl
[prev]
[thread]
[next]
[Date index for 2005/03/02]
Matt S Trout wrote:
> I sincerely doubt you'll find this to be the case; an idling database
> connection shouldn't require noticeable amounts of resources. For example,
> MySQL AFAIK only maintains a small buffer per connection plus some tracking
> info and everything else is shared.
I would recommend you read Jeremy Zawodny's "High Performance MySQL" for
examples of times when it really matters how many connections to the
database you have. He has stories about shutting down persistence on
connections for this reason. I don't need to handle as much traffic as
Yahoo does, but I don't have as many servers as Yahoo does either.
It's fairly common to make MySQL's per-connection buffers significantly
higher when dealing with a large database, in order to improve query
performance. At that point, every idle connection means less memory
available for the shared buffers. I have personally experienced this
problem. When dealing with something like Oracle, you may actually have
licensing problems from too many connections, or hit the wall on how
many your big-iron server can support. Oracle connections are
resource-intensive.
If you poll your neighborhood DBAs, I suspect they will agree that
doubling the number of idle connections to a server can be a serious
problem in many situations.
- Perrin