You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by Biren <bi...@servicenow.com> on 2017/11/03 23:43:42 UTC
getAverageGetTime/getAveragePutTime APIs of CacheMetrics always
return 0
We are investigating performance issue on our cluster of 2 nodes. We are
trying to understand time it takes to get or put a cache entry from/to the
cache. We are looking at out of box metrics for a cache . Both
getAverageGetTime and getAveragePutTime apis of CacheMetrics are always
giving value 0.
Is this a bug or are we looking at wrong metric?
-Biren
--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
Re: getAverageGetTime/getAveragePutTime APIs of CacheMetrics always
return 0
Posted by Pavel Pereslegin <xx...@gmail.com>.
Hello all.
In addition, I found similar closed issue about cache metrics and
client mode [1].
The ticket resolution seems strange, because it can be reproduced now.
[1] https://issues.apache.org/jira/browse/IGNITE-3605
2017-11-21 2:47 GMT+03:00 Denis Magda <dm...@apache.org>:
> Ignite dev community,
>
> Bring this weird bug to your attention. Could you confirm it’s not a “feature” of us? Put to the IEP-6 (metrics) list.
>
> —
> Denis
>
>> Begin forwarded message:
>>
>> From: Denis Magda <dm...@apache.org>
>> Subject: Re: getAverageGetTime/getAveragePutTime APIs of CacheMetrics always return 0
>> Date: November 20, 2017 at 3:46:27 PM PST
>> To: user@ignite.apache.org
>> Reply-To: user@ignite.apache.org
>>
>> Eventually I could reproduce your issue:
>> https://issues.apache.org/jira/browse/IGNITE-6966 <https://issues.apache.org/jira/browse/IGNITE-6966>
>>
>> It will be fixed as a part of this endeavor:
>> https://cwiki.apache.org/confluence/display/IGNITE/IEP-6%3A+Metrics+improvements <https://cwiki.apache.org/confluence/display/IGNITE/IEP-6:+Metrics+improvements>
>>
>> Thanks for your patience and support in reproducing the bug.
>>
>> —
>> Denis
>>
>>
>>> On Nov 20, 2017, at 4:23 AM, headstar <per.johansson@tangotelecom.com <ma...@tangotelecom.com>> wrote:
>>>
>>> Thanks for the example! Works fine when running IgniteMetricsExample#main
>>> with the provided conf.
>>>
>>> One difference to "my" configuration was that I was running the node
>>> accessing the cache in client mode.
>>>
>>> If I start a node with the configuration provided in your example and then
>>> run IgniteMetricsExample#main in client mode the statistics are 0.
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> --
>>> Sent from: http://apache-ignite-users.70518.x6.nabble.com/ <http://apache-ignite-users.70518.x6.nabble.com/>
>>
>
Fwd: getAverageGetTime/getAveragePutTime APIs of CacheMetrics always
return 0
Posted by Denis Magda <dm...@apache.org>.
Ignite dev community,
Bring this weird bug to your attention. Could you confirm it’s not a “feature” of us? Put to the IEP-6 (metrics) list.
—
Denis
> Begin forwarded message:
>
> From: Denis Magda <dm...@apache.org>
> Subject: Re: getAverageGetTime/getAveragePutTime APIs of CacheMetrics always return 0
> Date: November 20, 2017 at 3:46:27 PM PST
> To: user@ignite.apache.org
> Reply-To: user@ignite.apache.org
>
> Eventually I could reproduce your issue:
> https://issues.apache.org/jira/browse/IGNITE-6966 <https://issues.apache.org/jira/browse/IGNITE-6966>
>
> It will be fixed as a part of this endeavor:
> https://cwiki.apache.org/confluence/display/IGNITE/IEP-6%3A+Metrics+improvements <https://cwiki.apache.org/confluence/display/IGNITE/IEP-6:+Metrics+improvements>
>
> Thanks for your patience and support in reproducing the bug.
>
> —
> Denis
>
>
>> On Nov 20, 2017, at 4:23 AM, headstar <per.johansson@tangotelecom.com <ma...@tangotelecom.com>> wrote:
>>
>> Thanks for the example! Works fine when running IgniteMetricsExample#main
>> with the provided conf.
>>
>> One difference to "my" configuration was that I was running the node
>> accessing the cache in client mode.
>>
>> If I start a node with the configuration provided in your example and then
>> run IgniteMetricsExample#main in client mode the statistics are 0.
>>
>>
>>
>>
>>
>>
>>
>> --
>> Sent from: http://apache-ignite-users.70518.x6.nabble.com/ <http://apache-ignite-users.70518.x6.nabble.com/>
>
Re: getAverageGetTime/getAveragePutTime APIs of CacheMetrics always
return 0
Posted by Denis Magda <dm...@apache.org>.
Eventually I could reproduce your issue:
https://issues.apache.org/jira/browse/IGNITE-6966 <https://issues.apache.org/jira/browse/IGNITE-6966>
It will be fixed as a part of this endeavor:
https://cwiki.apache.org/confluence/display/IGNITE/IEP-6%3A+Metrics+improvements <https://cwiki.apache.org/confluence/display/IGNITE/IEP-6:+Metrics+improvements>
Thanks for your patience and support in reproducing the bug.
—
Denis
> On Nov 20, 2017, at 4:23 AM, headstar <pe...@tangotelecom.com> wrote:
>
> Thanks for the example! Works fine when running IgniteMetricsExample#main
> with the provided conf.
>
> One difference to "my" configuration was that I was running the node
> accessing the cache in client mode.
>
> If I start a node with the configuration provided in your example and then
> run IgniteMetricsExample#main in client mode the statistics are 0.
>
>
>
>
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
Re: getAverageGetTime/getAveragePutTime APIs of CacheMetrics always
return 0
Posted by headstar <pe...@tangotelecom.com>.
Thanks for the example! Works fine when running IgniteMetricsExample#main
with the provided conf.
One difference to "my" configuration was that I was running the node
accessing the cache in client mode.
If I start a node with the configuration provided in your example and then
run IgniteMetricsExample#main in client mode the statistics are 0.
--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
Re: getAverageGetTime/getAveragePutTime APIs of CacheMetrics always
return 0
Posted by Denis Magda <dm...@apache.org>.
See an example I put together for you:
https://github.com/dmagda/IgniteMetricsExampe/tree/master
Most likely you’re missing something in your configuration.
—
Denis
> On Nov 11, 2017, at 8:28 AM, headstar <pe...@tangotelecom.com> wrote:
>
> Hi,
>
> "Set CacheConfiguration.setStatisticsEnabled(boolean) to true for every
> cache you want to collect the metrics for."
>
> I've done that (see post from Nov 7).
>
> "Pass a particular EventStorageSpi interface implementation into
> IgniteConfiguration.setEventStorageSpi(...) method. You can use
> MemoryEventStorageSpi provided out-of-the-box ."
>
> Was hoping to get the metrics exposed via JMX to work.
>
> Regards,
> Per
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
Re: getAverageGetTime/getAveragePutTime APIs of CacheMetrics always
return 0
Posted by headstar <pe...@tangotelecom.com>.
Hi,
"Set CacheConfiguration.setStatisticsEnabled(boolean) to true for every
cache you want to collect the metrics for."
I've done that (see post from Nov 7).
"Pass a particular EventStorageSpi interface implementation into
IgniteConfiguration.setEventStorageSpi(...) method. You can use
MemoryEventStorageSpi provided out-of-the-box ."
Was hoping to get the metrics exposed via JMX to work.
Regards,
Per
--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
Re: getAverageGetTime/getAveragePutTime APIs of CacheMetrics always
return 0
Posted by Denis Magda <dm...@apache.org>.
Hi,
In addition to that you need to enable cache metrics calculation:
To enable cache metrics gathering:
Set CacheConfiguration.setStatisticsEnabled(boolean) to true for every cache you want to collect the metrics for.
Pass a particular EventStorageSpi interface implementation into IgniteConfiguration.setEventStorageSpi(...) method. You can use MemoryEventStorageSpi provided out-of-the-box .
Take from here: https://apacheignite.readme.io/v2.3/docs/cache-metrics
In the upcoming releases we plan to simplify cache metrics activation experience:
https://issues.apache.org/jira/browse/IGNITE-5796 <https://issues.apache.org/jira/browse/IGNITE-5796>
—
Denis
> On Nov 8, 2017, at 12:49 AM, headstar <pe...@tangotelecom.com> wrote:
>
> Hi,
>
> Changed to 2.3.0 and added
>
> <property name="dataStorageConfiguration">
> <bean
> class="org.apache.ignite.configuration.DataStorageConfiguration">
> <property name="defaultDataRegionConfiguration">
> <bean
> class="org.apache.ignite.configuration.DataRegionConfiguration">
> <property name="metricsEnabled" value="true"/>
> </bean>
> </property>
> </bean>
> </property>
>
> AverageGetTime/AveragePutTime still 0.
>
> Per
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
Re: getAverageGetTime/getAveragePutTime APIs of CacheMetrics always
return 0
Posted by headstar <pe...@tangotelecom.com>.
Hi,
Changed to 2.3.0 and added
<property name="dataStorageConfiguration">
<bean
class="org.apache.ignite.configuration.DataStorageConfiguration">
<property name="defaultDataRegionConfiguration">
<bean
class="org.apache.ignite.configuration.DataRegionConfiguration">
<property name="metricsEnabled" value="true"/>
</bean>
</property>
</bean>
</property>
AverageGetTime/AveragePutTime still 0.
Per
--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
Re: getAverageGetTime/getAveragePutTime APIs of CacheMetrics always
return 0
Posted by Denis Magda <dm...@apache.org>.
Hi,
You need to enable metrics per data region (DataRegionConfiguration.setMetricsEnabled(true)). This is how it’s done in Ignite 2.3:
https://apacheignite.readme.io/docs <https://apacheignite.readme.io/docs>
If you prefer to stay on 2.2 then change the documentation version to see how to achieve this with the previous version.
—
Denis
> On Nov 7, 2017, at 1:07 AM, kaleid <pe...@tangotelecom.com> wrote:
>
> Hi,
>
> Using 2.2.0 and looking at the JMX stats, AverageGetTime and AveragePutTime
> are always 0 (other stats, like CacheGets, are updated as expected)
>
> Using cache configuration as:
>
> <bean class="org.apache.ignite.configuration.CacheConfiguration">
> <property name="name" value="test-map"/>
> <property name="atomicityMode" value="ATOMIC"/>
> <property name="cacheMode" value="PARTITIONED" />
> <property name="managementEnabled" value="true" />
> <property name="statisticsEnabled" value="true" />
> <property name="backups" value="0"/>
>
> <property name="queryEntities">
> <list>
> <bean
> class="org.apache.ignite.cache.QueryEntity">
>
> <property name="keyType"
> value="java.lang.String"/>
>
>
> <property name="valueType"
> value="com.foo.TestEntry"/>
>
>
> <property name="fields">
> <map>
> <entry key="user"
> value="java.lang.String"/>
> </map>
> </property>
>
>
> <property name="indexes">
> <list>
> <bean
> class="org.apache.ignite.cache.QueryIndex">
> <constructor-arg value="user"/>
> </bean>
> </list>
> </property>
> </bean>
> </list>
> </property>
> </bean>
>
> Regards,
> Per
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
Re: getAverageGetTime/getAveragePutTime APIs of CacheMetrics always
return 0
Posted by kaleid <pe...@tangotelecom.com>.
Hi,
Using 2.2.0 and looking at the JMX stats, AverageGetTime and AveragePutTime
are always 0 (other stats, like CacheGets, are updated as expected)
Using cache configuration as:
<bean class="org.apache.ignite.configuration.CacheConfiguration">
<property name="name" value="test-map"/>
<property name="atomicityMode" value="ATOMIC"/>
<property name="cacheMode" value="PARTITIONED" />
<property name="managementEnabled" value="true" />
<property name="statisticsEnabled" value="true" />
<property name="backups" value="0"/>
<property name="queryEntities">
<list>
<bean
class="org.apache.ignite.cache.QueryEntity">
<property name="keyType"
value="java.lang.String"/>
<property name="valueType"
value="com.foo.TestEntry"/>
<property name="fields">
<map>
<entry key="user"
value="java.lang.String"/>
</map>
</property>
<property name="indexes">
<list>
<bean
class="org.apache.ignite.cache.QueryIndex">
<constructor-arg value="user"/>
</bean>
</list>
</property>
</bean>
</list>
</property>
</bean>
Regards,
Per
--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
Re: getAverageGetTime/getAveragePutTime APIs of CacheMetrics always
return 0
Posted by Pavel Pereslegin <xx...@gmail.com>.
Hello, BIren.
I think the impact on performance is minimal, but I don't have exact figures.
2017-11-05 22:05 GMT+03:00 Biren <bi...@servicenow.com>:
> Thank you Pavel!!. I have not enabled statistics. Do you know what would be
> performance impact on enabling it?
>
> -Biren
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
Re: getAverageGetTime/getAveragePutTime APIs of CacheMetrics always
return 0
Posted by Biren <bi...@servicenow.com>.
Thank you Pavel!!. I have not enabled statistics. Do you know what would be
performance impact on enabling it?
-Biren
--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
Re: getAverageGetTime/getAveragePutTime APIs of CacheMetrics always
return 0
Posted by Pavel Pereslegin <xx...@gmail.com>.
Hello, Biren.
Did you enable statistics in the cache configuration?
2017-11-04 2:43 GMT+03:00 Biren <bi...@servicenow.com>:
> We are investigating performance issue on our cluster of 2 nodes. We are
> trying to understand time it takes to get or put a cache entry from/to the
> cache. We are looking at out of box metrics for a cache . Both
> getAverageGetTime and getAveragePutTime apis of CacheMetrics are always
> giving value 0.
>
> Is this a bug or are we looking at wrong metric?
>
>
> -Biren
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/