You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by Emmanuel Touzery <em...@lit-transit.com> on 2017/12/20 14:31:11 UTC

monitoring stateless bean pool usage through JMX?

Hello,

     I'm interested in monitoring the tomee stateless bean pool usage 
through JMX. I can't find the relevant object name. I was looking at:



Re: monitoring stateless bean pool usage through JMX?

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Depends if a bean is used for all http requests or not but aligning it on
the datasource pool is a good idea

Le 20 déc. 2017 16:54, "Emmanuel Touzery" <em...@lit-transit.com>
a écrit :

> Hello,
>
>     thank you for the advice regarding the relevance. We've had issues
> where we ran out of statelesses from the pool but it was mostly due to, for
> instance, overloaded SQL so the real issue what elsewhere. Still it made us
> wonder whether we should consider tuning this parameter too.
>
>     Given that it's per bean, I guess the default of 10 is likely
> appropriate after all yes..
>
>     Thank you!
>
> Emmanuel
>
> On 20/12/17 16:45, Romain Manni-Bucau wrote:
>
>> it is per bean yes, you can poll them all at once through JMX API
>>
>> now on the impl itself there are almost no case where a stateless is
>> really
>> relevant today with CDI (and potentially microprofile or deltaspike
>> throttler) so maybe check the app really need it before adding tooling on
>> top of it
>>
>>
>> Romain Manni-Bucau
>> @rmannibucau <https://twitter.com/rmannibucau> |  Blog
>> <https://rmannibucau.metawerx.net/> | Old Blog
>> <http://rmannibucau.wordpress.com> | Github <
>> https://github.com/rmannibucau> |
>> LinkedIn <https://www.linkedin.com/in/rmannibucau>
>>
>> 2017-12-20 16:43 GMT+01:00 Emmanuel Touzery <
>> emmanuel.touzery@lit-transit.com>:
>>
>>
>>>      Certainly I can't poll every stateless bean in my app, too many of
>>>> them, I think it'd have a performance impact on the app.
>>>>
>>>> (I meant I can't poll the active instances through JMX)
>>>
>>> emmanuel
>>>
>>>
>>>
>

Re: monitoring stateless bean pool usage through JMX?

Posted by Emmanuel Touzery <em...@lit-transit.com>.
Hello,

     thank you for the advice regarding the relevance. We've had issues 
where we ran out of statelesses from the pool but it was mostly due to, 
for instance, overloaded SQL so the real issue what elsewhere. Still it 
made us wonder whether we should consider tuning this parameter too.

     Given that it's per bean, I guess the default of 10 is likely 
appropriate after all yes..

     Thank you!

Emmanuel

On 20/12/17 16:45, Romain Manni-Bucau wrote:
> it is per bean yes, you can poll them all at once through JMX API
>
> now on the impl itself there are almost no case where a stateless is really
> relevant today with CDI (and potentially microprofile or deltaspike
> throttler) so maybe check the app really need it before adding tooling on
> top of it
>
>
> Romain Manni-Bucau
> @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> <https://rmannibucau.metawerx.net/> | Old Blog
> <http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
> LinkedIn <https://www.linkedin.com/in/rmannibucau>
>
> 2017-12-20 16:43 GMT+01:00 Emmanuel Touzery <
> emmanuel.touzery@lit-transit.com>:
>
>>
>>>      Certainly I can't poll every stateless bean in my app, too many of
>>> them, I think it'd have a performance impact on the app.
>>>
>> (I meant I can't poll the active instances through JMX)
>>
>> emmanuel
>>
>>


Re: monitoring stateless bean pool usage through JMX?

Posted by Romain Manni-Bucau <rm...@gmail.com>.
it is per bean yes, you can poll them all at once through JMX API

now on the impl itself there are almost no case where a stateless is really
relevant today with CDI (and potentially microprofile or deltaspike
throttler) so maybe check the app really need it before adding tooling on
top of it


Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<https://rmannibucau.metawerx.net/> | Old Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau>

2017-12-20 16:43 GMT+01:00 Emmanuel Touzery <
emmanuel.touzery@lit-transit.com>:

>
>
>>     Certainly I can't poll every stateless bean in my app, too many of
>> them, I think it'd have a performance impact on the app.
>>
>
> (I meant I can't poll the active instances through JMX)
>
> emmanuel
>
>

Re: monitoring stateless bean pool usage through JMX?

Posted by Emmanuel Touzery <em...@lit-transit.com>.
>
>     Certainly I can't poll every stateless bean in my app, too many of 
> them, I think it'd have a performance impact on the app. 

(I meant I can't poll the active instances through JMX)

emmanuel


Re: monitoring stateless bean pool usage through JMX?

Posted by Emmanuel Touzery <em...@lit-transit.com>.
Hello,

     oh so we have accounting per-stateless bean? For a stateless bean 
for instance, I see:

   MaxSize = 10
   MinSize = 0
   InstancesActive = 0
   InstancesIdle = 0

     and I guess that's what interesting to me. But I didn't expect 
per-bean accounting.

     Isn't that a bit coarse then, we have accounting per individual 
bean, but to set the maximum for instance, we must do it app-wide, 
through a container "type=STATELESS" in the tomee.xml, right?

     so in the end if i was worried that my maxSize for my stateless 
container was too low... I'd have to monitor "InstancesActive" for every 
stateless bean in my application? Do I understand right? And if some 
stateless bean has many more instances than the others, that may mean I 
should consider redesigning my application right? Or would it make sense 
to raise the maxSize which will affect other stateless beans too?

     Certainly I can't poll every stateless bean in my app, too many of 
them, I think it'd have a performance impact on the app.

     Thank you!

Emmanuel


On 20/12/17 15:44, Romain Manni-Bucau wrote:
> Hello
>
> did you check
>
> openejb.management:J2EEServer=openejb,J2EEApplication=<empty>,EJBModule=app,StatelessSessionBean=TheBean,name=TheBean,j2eeType=Pool
>
>
> Romain Manni-Bucau
> @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> <https://rmannibucau.metawerx.net/> | Old Blog
> <http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
> LinkedIn <https://www.linkedin.com/in/rmannibucau>
>
> 2017-12-20 15:32 GMT+01:00 Emmanuel Touzery <
> emmanuel.touzery@lit-transit.com>:
>
>> Hello,
>>
>>      I'm interested in monitoring the tomee stateless bean pool usage
>> through JMX. I can't find the relevant object name. I was looking at:
>>
>> openejb.management:ObjectType=containers,DataSource=Default Stateless
>> Container
>>
>>      But I would not find information about the current pool usage (I would
>> be interested in pool capacity & current usage).
>>
>>      Thank you!
>>
>> Emmanuel
>>
>>
>>


Re: monitoring stateless bean pool usage through JMX?

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Hello

did you check

openejb.management:J2EEServer=openejb,J2EEApplication=<empty>,EJBModule=app,StatelessSessionBean=TheBean,name=TheBean,j2eeType=Pool


Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<https://rmannibucau.metawerx.net/> | Old Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau>

2017-12-20 15:32 GMT+01:00 Emmanuel Touzery <
emmanuel.touzery@lit-transit.com>:

>
> Hello,
>
>     I'm interested in monitoring the tomee stateless bean pool usage
> through JMX. I can't find the relevant object name. I was looking at:
>
> openejb.management:ObjectType=containers,DataSource=Default Stateless
> Container
>
>     But I would not find information about the current pool usage (I would
> be interested in pool capacity & current usage).
>
>     Thank you!
>
> Emmanuel
>
>
>

Re: monitoring stateless bean pool usage through JMX?

Posted by Emmanuel Touzery <em...@lit-transit.com>.
Hello,

     I'm interested in monitoring the tomee stateless bean pool usage 
through JMX. I can't find the relevant object name. I was looking at:

openejb.management:ObjectType=containers,DataSource=Default Stateless 
Container

     But I would not find information about the current pool usage (I 
would be interested in pool capacity & current usage).

     Thank you!

Emmanuel