-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use BoneCP as the datasource manager #28
Comments
Yes definitely... I will investigate that try to implement it as soon as possible. |
Dear Thomas, Actually I am not happy with the built-in connection pooling right now. If you suggest, I'll try to embed BoneCP into Batoo JPA as the default connection pool implementation. If you have chosen BoneCP mostly based on its performance, I wil go ahead on that. Please advise... |
+1 for BoneCP. |
I only use it because of performance, it think its the best pool available :) |
Ok. Looks great. This is the first issue to handle tomorrow. |
Woaw, not so fast... BEFORE BATOO | 0000030125 | 0000000831 | 0000029293 | Criteria Test AFTER BATOO | 0000032657 | 0000001382 | 0000031275 | Criteria Test |
Batoo Datasource 23.68x -> Vanilla BoneCP 14.96x -> Volatile Fix 17.13x. After Converting the BoneCPDataSource.pool from volatile to standard Prvdr | Total Time | JPA Time | DB Time | Name Of The Test BATOO | 0000031802 | 0000001238 | 0000030563 | Criteria Test I think I should fork and study BoneCP before using it as the default Datasource. Thomas & Arul, Please try Batoo JPA with the builtin datasource. If it doesn't suit your needs, then I'll give this priority. Otherwise, I will put this off for some time (Not long though meaning a few days). Meanwhile I committed the BoneCP branchi if you need to take a look. You can change BenchmarkTest.SUMMARIZE to false if you would like to study the cost of BoneCP line-by-line. What do you think? |
Did you also tried to the partition settings and disabled statistics etc.? |
Yes stats is off. Looks like jsr166y.LinkedTransferQueue is expensive. |
I think you have not applied Partitioning in BoneCP settings |
OK, Seems like the releaseHelperThreads cost more to make relese operations asynchronous then it helps. Prvdr | Total Time | JPA Time | DB Time | Name Of The Test BATOO | 0000029667 | 0000000477 | 0000029190 | Criteria Test it is now even faster - 40x. I am renaming this issue and will open a new issue for pluggable connections as this issue's content has become all BoneCP specific. Changes has been merged to the master branch. |
Thomas, Arul and Nilesh, Please advice partitioning. Current set up is:
|
The "Implement Pluggable Datasource Inlets" issue has been recreated with a suggested structure . Please review and feedback as positive or negative. |
OK, I have taken a look into and definitely not fan of that. If one still wants that then they can plug BoneCP back as an external datasource as per the related issue. 4 most important settings have been incorporated. public interface BJPASettings {
(...)
/**
* The default for {@link #MAX_CONNECTIONS} that is 50.
*/
final Integer DEFAULT_MAX_CONNECTIONS = 50;
/**
* The default for {@link #MIN_CONNECTIONS} that is 10.
*/
final Integer DEFAULT_MIN_CONNECTIONS = 1;
/**
* The default for {@link #MIN_CONNECTIONS} that is 10.
*/
final Integer DEFAULT_AUTO_INCREMENT = 2;
/**
* The default for {@link #STATEMENT_CACHE_SIZE} that is 50.
*/
final Integer DEFAULT_STATEMENT_CACHE_SIZE = 50;
/**
* The size of the datasource statement cache size
*/
final String STATEMENT_CACHE_SIZE = "org.batoo.jdbc.statement_cache_size";
/**
* The max size of the connection pool.
*/
final String MAX_CONNECTIONS = "org.batoo.jdbc.max_connections";
/**
* The min size of the connection pool.
*/
final String MIN_CONNECTIONS = "org.batoo.jdbc.min_connections";
/**
* The number of connection to increment on expanding the datasource.
*/
final String AUTO_INCREMENT = "org.batoo.jdbc.auto_increment";
(...)
} I am closing the issue now. Fell free to open it in case you need further improvement. |
Would it be possible to allow pluggable ConnectionPools in the future?
As we use BoneCP in all projects (and we are very happy with it!), this would be a great feature.
The text was updated successfully, but these errors were encountered: