Statistics enhancements: maxWaitTime and numberOfConnections averages

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Statistics enhancements: maxWaitTime and numberOfConnections averages

mihalcea_vlad
I feel we could benefit from having more detailed statistics via JMX. In my current production set-up we have tens of apps (each one with a BTM connection pool), all concurring for the limited set of database connections.

Trying to set the min and max pool size is more like a wild-guess, and I think we can improve this process if we add more statistics and make them available through JMX.

We could add:

- the cummulativeWaitTime (XAPool.getInPool().waitForConnectionInPool())
- the cummulativeConnectionRequestNumber

Dividing these two could get us the average wait time

We could have:

- averageInPoolSize

This would be useful, as if we set the min and max pool size, we are usually interested where does the average situates (closer to min or to max), so we could better size the pool.

Let me know if you consider such changes as useful as I do.

Vlad Mihalcea (http://vladmihalcea.wordpress.com/)
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Statistics enhancements: maxWaitTime and numberOfConnections averages

Ludovic Orban-2
Indeed, this sounds interesting and useful.

Do you feel like contributing a patch?


On Wed, Jan 15, 2014 at 10:58 AM, mihalcea_vlad <[hidden email]> wrote:
I feel we could benefit from having more detailed statistics via JMX. In my
current production set-up we have tens of apps (each one with a BTM
connection pool), all concurring for the limited set of database
connections.

Trying to set the min and max pool size is more like a wild-guess, and I
think we can improve this process if we add more statistics and make them
available through JMX.

We could add:

- the cummulativeWaitTime (XAPool.getInPool().waitForConnectionInPool())
- the cummulativeConnectionRequestNumber

Dividing these two could get us the average wait time

We could have:

- averageInPoolSize

This would be useful, as if we set the min and max pool size, we are usually
interested where does the average situates (closer to min or to max), so we
could better size the pool.

Let me know if you consider such changes as useful as I do.

Vlad Mihalcea (http://vladmihalcea.wordpress.com/)



--
View this message in context: http://bitronix-transaction-manager.10986.n7.nabble.com/Statistics-enhancements-maxWaitTime-and-numberOfConnections-averages-tp1590.html
Sent from the Bitronix Transaction Manager mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Statistics enhancements: maxWaitTime and numberOfConnections averages

mihalcea_vlad
Hi,

Well, I've been wanting to contribute to BTM for quite some time now, since I've been using it for the last 5 years on multiple projects, some running in production.

What is BTM open-contribution work-style?

1. I can add a toicket for this issue?
2. Does every issue require a new Git branch?
3. Is there a 3.0.0 branch I could forck and just send a pull request there?

Thanks,

Vlad Mihalcea



On Wednesday, January 15, 2014 3:37 PM, Ludovic Orban-2 [via Bitronix Transaction Manager] <[hidden email]> wrote:
Indeed, this sounds interesting and useful.

Do you feel like contributing a patch?


On Wed, Jan 15, 2014 at 10:58 AM, mihalcea_vlad <[hidden email]> wrote:
I feel we could benefit from having more detailed statistics via JMX. In my
current production set-up we have tens of apps (each one with a BTM
connection pool), all concurring for the limited set of database
connections.

Trying to set the min and max pool size is more like a wild-guess, and I
think we can improve this process if we add more statistics and make them
available through JMX.

We could add:

- the cummulativeWaitTime (XAPool.getInPool().waitForConnectionInPool())
- the cummulativeConnectionRequestNumber

Dividing these two could get us the average wait time

We could have:

- averageInPoolSize

This would be useful, as if we set the min and max pool size, we are usually
interested where does the average situates (closer to min or to max), so we
could better size the pool.

Let me know if you consider such changes as useful as I do.

Vlad Mihalcea (http://vladmihalcea.wordpress.com/)



--
View this message in context: http://bitronix-transaction-manager.10986.n7.nabble.com/Statistics-enhancements-maxWaitTime-and-numberOfConnections-averages-tp1590.html
Sent from the Bitronix Transaction Manager mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email






To unsubscribe from Statistics enhancements: maxWaitTime and numberOfConnections averages, click here.
NAML


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Statistics enhancements: maxWaitTime and numberOfConnections averages

Brett Wooldridge-2
Why don't you start by creating a ticket on Github, and we'll flag it as an "Enhancement"?  For the work, just fork the repo on Github, do your work against master in your fork, then submit a pull request when you think it's ready.  Any additional unit tests you create against your new functionality is also appreciated.  In terms of style, it's pretty simple, just stick to what you see.

Thanks,
Brett



On Wed, Jan 15, 2014 at 11:19 PM, mihalcea_vlad <[hidden email]> wrote:
Hi,

Well, I've been wanting to contribute to BTM for quite some time now, since I've been using it for the last 5 years on multiple projects, some running in production.

What is BTM open-contribution work-style?

1. I can add a toicket for this issue?
2. Does every issue require a new Git branch?
3. Is there a 3.0.0 branch I could forck and just send a pull request there?

Thanks,

Vlad Mihalcea





On Wednesday, January 15, 2014 3:37 PM, Ludovic Orban-2 [via Bitronix Transaction Manager] <[hidden email]> wrote:

Indeed, this sounds interesting and useful.

Do you feel like contributing a patch?




On Wed, Jan 15, 2014 at 10:58 AM, mihalcea_vlad <[hidden email]> wrote:

I feel we could benefit from having more detailed statistics via JMX. In my
>current production set-up we have tens of apps (each one with a BTM
>connection pool), all concurring for the limited set of database
>connections.
>
>Trying to set the min and max pool size is more like a wild-guess, and I
>think we can improve this process if we add more statistics and make them
>available through JMX.
>
>We could add:
>
>- the cummulativeWaitTime (XAPool.getInPool().waitForConnectionInPool())
>- the cummulativeConnectionRequestNumber
>
>Dividing these two could get us the average wait time
>
>We could have:
>
>- averageInPoolSize
>
>This would be useful, as if we set the min and max pool size, we are usually
>interested where does the average situates (closer to min or to max), so we
>could better size the pool.
>
>Let me know if you consider such changes as useful as I do.
>
>Vlad Mihalcea (http://vladmihalcea.wordpress.com/)
>
>
>
>--
>View this message in context: http://bitronix-transaction-manager.10986.n7.nabble.com/Statistics-enhancements-maxWaitTime-and-numberOfConnections-averages-tp1590.html
>Sent from the Bitronix Transaction Manager mailing list archive at Nabble.com.
>
>---------------------------------------------------------------------
>To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>
>


________________________________

If you reply to this email, your message will be added to the discussion below:http://bitronix-transaction-manager.10986.n7.nabble.com/Statistics-enhancements-maxWaitTime-and-numberOfConnections-averages-tp1590p1591.html
To unsubscribe from Statistics enhancements: maxWaitTime and numberOfConnections averages, click here.
NAML



--
View this message in context: http://bitronix-transaction-manager.10986.n7.nabble.com/Statistics-enhancements-maxWaitTime-and-numberOfConnections-averages-tp1590p1592.html
Sent from the Bitronix Transaction Manager mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Statistics enhancements: maxWaitTime and numberOfConnections averages

mihalcea_vlad
Hi,

I've added the issue: https://github.com/bitronix/btm/issues/6

I am glad you opted for a simple development style, working against master with pull requests.
I'll fork the repo and start thinking of the design/impl and tests for it.

Vlad
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Statistics enhancements: maxWaitTime and numberOfConnections averages

Ludovic Orban-2
You can thank Brett for convincing me of moving the code to Github and re-licensing it to Apache2, on top of very many other improvements he made in that version.

The only thing you have to keep in mind is that Github hosts the upcoming 3.0.0 version, the 2.x version will stay at codehaus.


On Wed, Jan 15, 2014 at 3:53 PM, mihalcea_vlad <[hidden email]> wrote:
Hi,

I've added the issue: https://github.com/bitronix/btm/issues/6

I am glad you opted for a simple development style, working against master
with pull requests.
I'll fork the repo and start thinking of the design/impl and tests for it.

Vlad



--
View this message in context: http://bitronix-transaction-manager.10986.n7.nabble.com/Statistics-enhancements-maxWaitTime-and-numberOfConnections-averages-tp1590p1594.html
Sent from the Bitronix Transaction Manager mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Statistics enhancements: maxWaitTime and numberOfConnections averages

mihalcea_vlad
Well,

I haven't checked the 3.0.0 branch mission, but I knew there was a guy who wanted extra performance out of the stable 2.x.x version, and that's why he started the btm-hp project. So, it was Brett that convinced you to  push this forward, right? Actually, that's why I liked BTM in the very first place, as it was always about open-source ambition.

Right now, the connection pooling Java landscape is quite stale (C3PO and DBPool were abandoned, and BoneCP doesn't have to much tracking lately). BTM could really catch up in this particular area. I could see it as the "de facto" Java transaction manager, with state-of-the-art connection pooling, and maybe some XADisk integration as well.

And, I think there should be a book about BTM as well, and I hope I can deliver as much as I can for this, as I've put my mind to write an open book for that (http://vladmihalcea.wordpress.com/2014/01/01/my-open-book-movement/).

I'll check the latest 3.0.0 branch, since I'm sure it differs a lot from the 2.x.x I've been accustomed with.
I'll come back when I have a design for the new CP related enhancements.

Vlad
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Statistics enhancements: maxWaitTime and numberOfConnections averages

Brett Wooldridge-2
Vlad,

Re: BoneCP, C3P0 and the relatively dead connection pool landscape ... a few months back I built upon some of the work and ideas I put into the BTM connection pool and proxies and created a new connection pool project called HikariCP.  You can find it here:


It has been gaining a lot of traction recently.  Note that HikariCP is a simple connection pool, and does not support XA -- and competes with BoneCP et al.  An XA pool is quite a bit more complicated, and I think the BTM 3.0 implementation is just about the best around.

I'm really excited about your contributions to BTM.  Maybe we're finally seeing some dividends being paid on our move over to Github.  Our hope is that it will make collaboration and contribution easier for the community.  We absolutely want BTM to be the obvious and "go to" solution for users needing XA (which I find compelling even with a single database).

Brett





On Thu, Jan 16, 2014 at 6:04 AM, mihalcea_vlad <[hidden email]> wrote:
Well,

I haven't checked the 3.0.0 branch mission, but I knew there was a guy who
wanted extra performance out of the stable 2.x.x version, and that's why he
started the btm-hp project. So, it was Brett that convinced you to  push
this forward, right? Actually, that's why I liked BTM in the very first
place, as it was always about open-source ambition.

Right now, the connection pooling Java landscape is quite stale (C3PO and
DBPool were abandoned, and BoneCP doesn't have to much tracking lately). BTM
could really catch up in this particular area. I could see it as the "de
facto" Java transaction manager, with state-of-the-art connection pooling,
and maybe some XADisk integration as well.

And, I think there should be a book about BTM as well, and I hope I can
deliver as much as I can for this, as I've put my mind to write an open book
for that
(http://vladmihalcea.wordpress.com/2014/01/01/my-open-book-movement/).

I'll check the latest 3.0.0 branch, since I'm sure it differs a lot from the
2.x.x I've been accustomed with.
I'll come back when I have a design for the new CP related enhancements.

Vlad



--
View this message in context: http://bitronix-transaction-manager.10986.n7.nabble.com/Statistics-enhancements-maxWaitTime-and-numberOfConnections-averages-tp1590p1596.html
Sent from the Bitronix Transaction Manager mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Statistics enhancements: maxWaitTime and numberOfConnections averages

mihalcea_vlad
Yesterday, when I googled for "java connection pooling" there was only one reference for HikariCP, and after I checked your GitHub repository I was struck by the times you mentioned there. If BoneCP was the fast, then Hickari must be lightning fast. I'll have to write some posts about it, to promote it on DZone and JavaCodeGeeks.

Indeed, BTM XAPool is tightly related to all sorts of transaction aspects, I've thought there is a certain extension-point where you could just plug-in any CP to it, but probably it's not that easy.
Loading...