-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Ahmed,
On 5/29/12 9:29 AM, S Ahmed wrote: > If my requirement for a hosted application is to give each > customer a separate instance of mysql, I am curious how feasible > that would be. You can certainly do this. > What is the memory footprint for a single connection to a > database? That depends a lot of which database you are using (MySQL connections are fairly modest: the "retained size" of one of my MySQL JDBC4Connection objects is 66k in an x86-64 environment with a 64-bit Sun/Oracle JVM), what things you are having cached/pooled on the client side, etc. You'd have to give us a lot more information about your environment. Better yet, configure it the way you want it and use a profiler to see how "big" the connections become. > If I had 10K separate mysql instances, would it be feasible to > create a pool of pools? i.e. a hashmap of connection pools? That sounds like a lot of MySQL instances to be contacted by a single application server. Do you need 10k separate customers all running in the same webapp? If my environment and requirements match yours, you'd need 10000 * max_pool_size * 66KiB at peak usage. That's about 640MiB for each connection you want in 10k pools. For a (uniform) max pool size of 4, you'll need more than 2GiB of heap space just for connection pools. Is that acceptable? - -chris -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.17 (Darwin) Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk/GKb8ACgkQ9CaO5/Lv0PBmCACghH4L1ycmK1UwHHPq1aVu0Sxn X2IAnjePQzdy5iMAL5pEIe0KgxRY1q8V =Uieg -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org