0

I was wondering what is maxPoolSize for? what is minPoolSize for?

How do I know which property value to use for my database?

EDITED

I am using Oracle 10g, connecting with Hibernate and bitronix on windows OS.

1
  • It would help to know what database, platform and language you are using. Commented Mar 15, 2011 at 21:47

1 Answer 1

1

minPoolSize is the minimum number of database connections being opened all the time, even when none of them are used. maxPoolSize on the other hand represents the maximum number of concurrent connection. Now:

  • Use minPoolSize to always keep few connections opened (even when idle) so that you don't have to wait for establishing a new network connection when request arrives to the system with low load. This is basically a set of connections waiting "for emergency"

  • maxPoolSize is much more important. If the system is under heavy load and some request tries to open maxPoolSize + 1 connection, the connection pool will refuse, in turns causing the whole request to be discarded. On the other hand setting this parameter to to high value shift the bottleneck from your application to the database server, as it has limited capacity.

Sign up to request clarification or add additional context in comments.

2 Comments

thanks. so what do you recommend to put as maxPoolSize for oracle using bitronix? who decides how many connections to be concurrent to db and when to close one?
Well... measure. After exceeding some value you will notice no performance gain or even performance degradation. Also the maximum number of concurrent connections should be correlated to the number of concurrent HTTP connections (assuming we're talking about web application with JDBC connection bound to the request for almost all the time). As for closing the connections: when the application becomes idle, connection pool should take care of idle connections, closing them completely (but leaving at least minPoolSize).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.