JBoss Community

Configuration of Datasource: min-pool-size and max-pool-size

reply from Peter Johnson in Performance Tuning - View the full discussion

I suspect that you will probably never need 50 connections. I would set min connections to a lower amount and monitor how many you actually use.

 

The settings can effect performance because it takes a while to establish a connection, so having idle connections available is better than waiting for connections to be established or waiting for in-use connections to be available. On the other hand, having too many idle connections does use up some Java heap space and some memory space within the database (example: a database memory work area dedicated to the connection), but if you have the spare memory available, it usually is not that big of an issue.

 

I have used several hundred connections with several different databases (MySQL, PostgreSQL, Oracle), and that did not seem to be a problem; the database had no trouble keeping up with the requests. Of course, some database tuning also helped. Having said that, 50 connections is probably too small of a number to worry about, so the settings you proposed are probably just fine.

Reply to this message by going to Community

Start a new discussion in Performance Tuning at Community