tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <>
Subject Re: tomcat jdbc pool, creating a pool of pools, single connection memory footprint
Date Wed, 30 May 2012 23:48:55 GMT
Hash: SHA1


On 5/30/12 6:18 PM, André Warnier wrote:
> Taking the same hypothetical case and figures :
> Assuming that you need a total of (10000 * 4 connections) = 40000 
> connections. Assuming that it takes 10ms to set up one such 
> connection, and that once it is there, you don't do anything with 
> it and just let it be for now. Assuming we ignore such things like 
> bandwidth, other things happening on that host etc.. It then takes 
> a total of (10 ms * 40000) = 400000 ms = 400s = ~ 6.5 minutes just 
> to set up these connections.
> Is that acceptable ?
> What I mean is that once you start playing with such numbers, you 
> may want to look at other aspects than just required memory..

There's also the issue of open filehandles, etc. My development
environment is limited to 10240 filehandles per process (though of
course that can be changed). Opening 10,000 connections would use most
of those, leaving very few left to accept incoming requests from
clients, etc.

It would be easier if all databases were hosted by a single instance
of MySQL -- then you could use Tomcat-pool's feature of being able to
provide credentials when obtaining connections from the pool -- and
get the right database. That way, a much smaller number of connections
could be maintained with roughly the same semantics.

- -chris
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools -
Comment: Using GnuPG with Mozilla -


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message