-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Romain,
On 10/18/12 6:05 AM, Romain Van der Keilen wrote: > After that, I looked deeper into the database configuration, as I > saw in the tests that non db relative actions were responding very > fast (50ms for a 1000 users basis). I finally found an > OracleDataSource in the Oracle Driver, which reacts far way better > than the BasicDataSource I was using before (12s for 150 users for > the basic data source, 1.5s for the oracle one, same test). I'd be interested to see the difference in configuration. I've never had problems with Tomcat's (really commons-dbcp's) BasicDataSource. Perhaps when you switched, you changed some essential configuration option? The obvious one being the size of the connection pool: if you are try to test 70 simultaneous db-related operations but your connection pool only contains 50 connections, then many of the requests are going to sit idly-waiting for db connections. Basically, you cannot scale beyond 50 simultaneous HTTP connections if all your requests are db-related. The equation looks something like this (where 'R' is the number of HTTP requests, 'P' is the size of your connection pool and 'L' is the proportion of all request you expect to require a db connection): max(R) = P / L So, if you have 50 connections in your pool and you expect 50% of your requests to require a database connection, then you can only expect to be able to serve 50 / 0.5 = 100 simultaneous HTTP connections. Conversely, if you want to be able to handle 500 connections at 50% rate, then you need to have 250 connections available in your database pool. Of course, if you have multiple servers, then you have to be aware that each app instance will open 250 connections to your database. If you can't handle N*250 on the database side, then you have to do the equation from the resource-limited side instead of from the demand-I-want-to-serve side. - -chris -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.17 (Darwin) Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Mozilla - http://www.enigmail.net/ iEYEARECAAYFAlCAFWIACgkQ9CaO5/Lv0PDKZACgmocnQvpoGVKSS4x2GcwWE9e6 kLEAn2YgbZrpQ0HqrgIiC1s5s2GanNbQ =Kasu -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org