The Source for Java Technology Collaboration

Home » java.net Forums » GlassFish » GlassFish

Thread: connection pool monitoring on a cluster

Welcome, Guest Help
Login Login
Guest Settings Guest Settings
Reply to this Thread Reply to this Thread Search Forum Search Forum Back to Thread List Back to Thread List

Permlink Replies: 5 - Last Post: Sep 3, 2008 4:28 AM by: Dick Davies
Dick Davies
connection pool monitoring on a cluster
Posted: Aug 28, 2008 6:11 AM
  Click to reply to this thread Reply

I've got a 2 node GF2 cluster and I'm trying to enable connection pool
monitoring on it
(following http://blogs.sun.com/JagadishPrasath/entry/monitoring_jdbc_connection_pool_glassfish
which is a good howto).

Because I'm on a cluster, the server instances use a different
configuration (clustername-config) to the DAS (server-config).
It looks like the admin webapp lets you enable JDBC monitoring for the
clustername-config configuration, but you can only view
things under 'server-config' (i.e. things on the DAS).

I tried the commandline instead and had more luck.
It looks like there's an entry for the pool under each server instance:

gfish$ asadmin list --monitor=true *prod-pool*
inst01.resources.prod-pool
inst02.resources.prod-pool

So my first question is : can I see these values via the admin webapp?

Also, it looks like each server instance has its own copy of the pool,
that's right isn't it
(in my mental model, they were sharing a global pool and checking out
their own connections)?

If I browse around under those entries I can find stats on the
pool(s?) themselves, but they don't seem to add up:

gfish$ asadmin get --monitor=true inst*.resources.prod-pool.numconn*-current

inst01.resources.prod-pool.numconnfree-current = 7
inst01.resources.prod-pool.numconnused-current = 0
inst02.resources.prod-pool.numconnfree-current = 6
inst02.resources.prod-pool.numconnused-current = 0

I expect the database to be failry quiet (I memcache the hell out of
this app) but
both the pools have an initial size of 8 (the default), so I can't
figure out where the other connections are?

Have I missed an entry, or am I just not understanding the values?

Tried the same thing on my desktop
(same version of GFv2 but in developer profile, so everything is under
'server') and it behaved as expected.

--
Rasputnik :: Jack of All Trades - Master of Nuns
http://number9.hellooperator.net/

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: users-help@glassfish.dev.java.net


Dick Davies
Re: connection pool monitoring on a cluster
Posted: Aug 28, 2008 6:41 AM   in response to: Dick Davies
  Click to reply to this thread Reply

On Thu, Aug 28, 2008 at 2:11 PM, Dick Davies
<rasputnik@hellooperator.net> wrote:

> So my first question is : can I see these values via the admin webapp?

To answer my own question : yes, under

clusters -> <cluster-name> - > instances -> <pick an instance> -> monitor

would still like to know why the values below don't seem to add up, though.

> Also, it looks like each server instance has its own copy of the pool,
> that's right isn't it
> (in my mental model, they were sharing a global pool and checking out
> their own connections)?
>
> If I browse around under those entries I can find stats on the
> pool(s?) themselves, but they don't seem to add up:
>
> gfish$ asadmin get --monitor=true inst*.resources.prod-pool.numconn*-current
>
> inst01.resources.prod-pool.numconnfree-current = 7
> inst01.resources.prod-pool.numconnused-current = 0
> inst02.resources.prod-pool.numconnfree-current = 6
> inst02.resources.prod-pool.numconnused-current = 0
>
> I expect the database to be failry quiet (I memcache the hell out of
> this app) but
> both the pools have an initial size of 8 (the default), so I can't
> figure out where the other connections are?
>
> Have I missed an entry, or am I just not understanding the values?
>
> Tried the same thing on my desktop
> (same version of GFv2 but in developer profile, so everything is under
> 'server') and it behaved as expected.
>
> --
> Rasputnik :: Jack of All Trades - Master of Nuns
> http://number9.hellooperator.net/
>



--
Rasputnik :: Jack of All Trades - Master of Nuns
http://number9.hellooperator.net/

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: users-help@glassfish.dev.java.net


Jagadish Prasat...
Re: connection pool monitoring on a cluster
Posted: Aug 29, 2008 4:11 AM   in response to: Dick Davies
  Click to reply to this thread Reply



On Thu, 2008-08-28 at 14:41 +0100, Dick Davies wrote:
> On Thu, Aug 28, 2008 at 2:11 PM, Dick Davies
> <rasputnik@hellooperator.net> wrote:
>
> > So my first question is : can I see these values via the admin webapp?
>
> To answer my own question : yes, under
>
> clusters -> <cluster-name> - > instances -> <pick an instance> -> monitor
>
> would still like to know why the values below don't seem to add up, though.
Yes, this can be done though showing the added/avg values for a cluster
will be a bit tricky, IMO. eg: avg-connection-wait-time : One instance
may serve better than the other (though the configuration remains the
same) as the load on it is affected by various parameters. We can not
take avg (or sum) for these values as they won't provide a realistic
view for the administrator.

Please raise an RFE (ENHANCEMENT) for "monitoring" subcomponent, if
there isn't one already.

You can use AMX to collect monitoring information from both the
instances and add them.
>
> > Also, it looks like each server instance has its own copy of the pool,
> > that's right isn't it
Yes. each instance maintains its own pool.
> > (in my mental model, they were sharing a global pool and checking out
> > their own connections)?
> >
> > If I browse around under those entries I can find stats on the
> > pool(s?) themselves, but they don't seem to add up:
> >
> > gfish$ asadmin get --monitor=true inst*.resources.prod-pool.numconn*-current
> >
> > inst01.resources.prod-pool.numconnfree-current = 7
> > inst01.resources.prod-pool.numconnused-current = 0
> > inst02.resources.prod-pool.numconnfree-current = 6
> > inst02.resources.prod-pool.numconnused-current = 0
> >
> > I expect the database to be failry quiet (I memcache the hell out of
> > this app) but
> > both the pools have an initial size of 8 (the default), so I can't
> > figure out where the other connections are?
Can you check the no. of connections (session) from the db ?
> >
> > Have I missed an entry, or am I just not understanding the values?
> >
> > Tried the same thing on my desktop
> > (same version of GFv2 but in developer profile, so everything is under
> > 'server') and it behaved as expected.
> >
> > --
> > Rasputnik :: Jack of All Trades - Master of Nuns
> > http://number9.hellooperator.net/
> >
>
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: users-help@glassfish.dev.java.net


Dick Davies
Re: connection pool monitoring on a cluster
Posted: Aug 29, 2008 6:26 AM   in response to: Jagadish Prasat...
  Click to reply to this thread Reply

Hi Jagadish, thanks for getting back to me.

On Fri, Aug 29, 2008 at 12:11 PM, Jagadish Prasath Ramu
<Jagadish.Ramu@sun.com> wrote:
>
>
> On Thu, 2008-08-28 at 14:41 +0100, Dick Davies wrote:
>> On Thu, Aug 28, 2008 at 2:11 PM, Dick Davies
>> <rasputnik@hellooperator.net> wrote:
>>
>> > So my first question is : can I see these values via the admin webapp?
>>
>> To answer my own question : yes, under
>>
>> clusters -> <cluster-name> - > instances -> <pick an instance> -> monitor
>>
>> would still like to know why the values below don't seem to add up, though.

> Yes, this can be done though showing the added/avg values for a cluster
> will be a bit tricky, IMO. eg: avg-connection-wait-time

No, that's fine - if the pools are per-instance it's not all that
useful to aggregate them
anyway. asadmin, amx or Jruby-jmx is fine for my purposes.

I was talking about the individual pools tallying up (further down).

>> > Also, it looks like each server instance has its own copy of the pool,
>> > that's right isn't it
> Yes. each instance maintains its own pool.

>> > If I browse around under those entries I can find stats on the
>> > pool(s?) themselves, but they don't seem to add up:
>> >
>> > gfish$ asadmin get --monitor=true inst*.resources.prod-pool.numconn*-current
>> >
>> > inst01.resources.prod-pool.numconnfree-current = 7
>> > inst01.resources.prod-pool.numconnused-current = 0
>> > inst02.resources.prod-pool.numconnfree-current = 6
>> > inst02.resources.prod-pool.numconnused-current = 0

>> > both the pools have an initial size of 8 (the default), so I can't
>> > figure out where the other connections are?

> Can you check the no. of connections (session) from the db ?

After the weekend yes - the DBA is off to Cornwall for a lie down, but back
monday I believe.

But whatever's going on back there, I'd expect these figures to add up,
and they don't seem to.
Is there somewhere else they might appear (e.g. leaks?)

--
Rasputnik :: Jack of All Trades - Master of Nuns
http://number9.hellooperator.net/

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: users-help@glassfish.dev.java.net


Jagadish Prasat...
Re: connection pool monitoring on a cluster
Posted: Aug 29, 2008 9:41 AM   in response to: Dick Davies
  Click to reply to this thread Reply


Hi Dick,
Responses in-line.
On Fri, 2008-08-29 at 14:26 +0100, Dick Davies wrote:
> Hi Jagadish, thanks for getting back to me.
>
> On Fri, Aug 29, 2008 at 12:11 PM, Jagadish Prasath Ramu
> <Jagadish.Ramu@sun.com> wrote:
> >
> >
> > On Thu, 2008-08-28 at 14:41 +0100, Dick Davies wrote:
> >> On Thu, Aug 28, 2008 at 2:11 PM, Dick Davies
> >> <rasputnik@hellooperator.net> wrote:
> >>
> >> > So my first question is : can I see these values via the admin webapp?
> >>
> >> To answer my own question : yes, under
> >>
> >> clusters -> <cluster-name> - > instances -> <pick an instance> -> monitor
> >>
> >> would still like to know why the values below don't seem to add up, though.
>
> > Yes, this can be done though showing the added/avg values for a cluster
> > will be a bit tricky, IMO. eg: avg-connection-wait-time
>
> No, that's fine - if the pools are per-instance it's not all that
> useful to aggregate them
> anyway. asadmin, amx or Jruby-jmx is fine for my purposes.
>
> I was talking about the individual pools tallying up (further down).
>
> >> > Also, it looks like each server instance has its own copy of the pool,
> >> > that's right isn't it
> > Yes. each instance maintains its own pool.
>
> >> > If I browse around under those entries I can find stats on the
> >> > pool(s?) themselves, but they don't seem to add up:
> >> >
> >> > gfish$ asadmin get --monitor=true inst*.resources.prod-pool.numconn*-current
> >> >
> >> > inst01.resources.prod-pool.numconnfree-current = 7
> >> > inst01.resources.prod-pool.numconnused-current = 0
> >> > inst02.resources.prod-pool.numconnfree-current = 6
> >> > inst02.resources.prod-pool.numconnused-current = 0
>
> >> > both the pools have an initial size of 8 (the default), so I can't
> >> > figure out where the other connections are?
>
> > Can you check the no. of connections (session) from the db ?
>
> After the weekend yes - the DBA is off to Cornwall for a lie down, but back
> monday I believe.
>
> But whatever's going on back there, I'd expect these figures to add up,
> and they don't seem to.
> Is there somewhere else they might appear (e.g. leaks?)
Probably, you can enable connection-leak-tracing in the connection-pool
to see the code that's leaking the connections.

http://blogs.sun.com/kshitiz/entry/connection_leak_tracing

Thanks,
-Jagadish
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: users-help@glassfish.dev.java.net


Dick Davies
Re: connection pool monitoring on a cluster
Posted: Sep 3, 2008 4:28 AM   in response to: Jagadish Prasat...
  Click to reply to this thread Reply

Thanks Jagadish, have a better idea what's what now, see
'connection pool monitoring, take 2' thread :)

On Fri, Aug 29, 2008 at 5:41 PM, Jagadish Prasath Ramu
<Jagadish.Ramu@sun.com> wrote:

> On Fri, 2008-08-29 at 14:26 +0100, Dick Davies wrote:
I'd expect these figures to add up,
>> and they don't seem to.
>> Is there somewhere else they might appear (e.g. leaks?)

> Probably, you can enable connection-leak-tracing in the connection-pool
> to see the code that's leaking the connections.
>
> http://blogs.sun.com/kshitiz/entry/connection_leak_tracing

--
Rasputnik :: Jack of All Trades - Master of Nuns
http://number9.hellooperator.net/

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: users-help@glassfish.dev.java.net





 XML java.net RSS