Just a friendly suggestion and request about documentation from the source for this excellent software.
Could be added a special section of documentation about best settings about configuration?
Because you are the creator of this software I am assuming you have some formulas or math rules to apply special settings according some ranges or scenario, it for production or for yourself to apply your own tests . Of course it for each possible 'field' that expects a number value. Thus what could be the best or recomended value for minimumIdle according some N scenario, perhaps number of possible connections in production or anything else, same thought for maximumPoolSize for example it has a page to About Pool Sizing. Thus a table listing all these fields and suggested range values would be nice.
Thus when a developer try to configure Hikari for a first time, he has already available a suggested range valid range of possible values according other factors.
I know is very relative because even hardware (memory ram) and other factors are involved.
Note: I am not saying the current documentation is useless.
As you stated there are many factors to consider here which would make a generic formula next to impossible.
You should monitor the pool usage and consider using multiple pools if you have various types of queries OLAP vs OLTP.
If you are low scale you will probably not gain a whole lot from tweaking pool settings. Other than that you really have to test it yourself. Every application is different.
Yes, I understand and are valid your points.
But the general point is that should exists something (a 'pattern') to apply the following quickly:
I know it is very hard, because it depends hardware, db configuration etc... but I think should exists a 'reach point' in someway.
Testing could help in some way. I mean, how create 'fake' user connections to apply stress testing to all the environment about persistence in Java, and here working or playing around with the Hikari settings
I hope you see my point.
how create 'fake' user connections to apply stress testing to all the environment about persistence in Java
This is a very difficult problem but the answer is make it as similar to production as possible.
Playing around with the settings should be pretty straight forward. Just measure and test.
That sounds like a job for a performance / load testing framework which still requires intimate application knowledge to be useful. What is the distribution of different queries that are run, how many run concurrently, what is the usage pattern?
I believe all the recommendations are listed.
All of the above apply to any JDBC connection pool you use.
Thanks for the points.
BTW about:
If you have a very high throughput app don't use minimum idle at all and let the pool always stay at the max size.
I had this experience:
Thus not always the obvious is the correct.
I am assuming that the author (and team) have a table with values about these settings for his own testing prior to release a new version of HikariCP
@manueljordan @billoneil Bill makes a lot of valid points. Still, there may be something we can come up with.
But in general I will say this, for the vast majority of "typical" internal IT applications, with a few hundred active users, just run with the defaults and investigate/tune if you have issues
If you are part of a large organization, like Wix, with hundreds of front-end web servers and tens and tens of thousands of users, then I assume there is already a performance team who is capable, and armed with all of the tools necessary, to profile and tune HikariCP.
Still, there may be 'something' we can come up with.
Sounds great, some extra information is valuable for the audience
Thanks to both.