The second option is more probable, because there are known issues, that
affect work of these methods.
If you want to make sure, that get operations are not getting slower over
time, you can write a benchmark, using Yardstick.
You can find examples of such benchmarks in Ignite repository:
https://github.com/apache/ignite/blob/master/modules/yardstick/src/main/java/org/apache/ignite/yardstick/cache/IgnitePutGetBenchmark.java

Existing benchmarks don't show the problem, that you described, so it's
more probable, that the metrics don't show valid results.

Denis

вт, 28 нояб. 2017 г. в 23:15, Biren Shah <[email protected]>:

> Sorry missed your earlier comment of cache size api. Thanks for
> reiterating it.
>
>
>
> The issue we are seeing with getAverage###Time is that, when we read the
> metric its always higher than the last value. We are collecting these
> metrics every minute. I have attached couple of graphs here that saws that
> the average time is always going up. Either the each get/put call is
> getting slower by time or the metric is not collected correctly.
>
>
>
> -Biren
>
>
>
> *From: *Denis Mekhanikov <[email protected]>
> *Reply-To: *"[email protected]" <[email protected]>
> *Date: *Tuesday, November 28, 2017 at 5:12 AM
>
>
> *To: *"[email protected]" <[email protected]>
> *Subject: *Re: Cache size changes unexpectedly
>
>
>
> Biren,
>
>
>
> As I already said, you can use *IgniteCache#size* method to calculate
> number of entries in cache, but it has some performance impact, so it's not
> recommended to run too often.
>
> Turns out, *getAverage###Time* metrics are also broken. Here is the
> ticket for it: https://issues.apache.org/jira/browse/IGNITE-3495
> <https://urldefense.proofpoint.com/v2/url?u=https-3A__issues.apache.org_jira_browse_IGNITE-2D3495&d=DwMFaQ&c=Zok6nrOF6Fe0JtVEqKh3FEeUbToa1PtNBZf6G01cvEQ&r=rbkF1xy5tYmkV8VMdTRVaIVhaXCNGxmyTB5plfGtWuY&m=rGOSpNtWj0eeR40zSk_B8r2atV-szrvyfGI7nLJtEaU&s=jsZkNl2hsuuYZO3f-bsGPZtwVHf7bGU1O98oe5Ka438&e=>
>
>
>
> Denis
>
>
>
> пн, 27 нояб. 2017 г. в 22:19, Biren Shah <[email protected]>:
>
> Hi Denis,
>
>
>
> Thank you for confirming the issue. Is there any other way to calculate
> cache size? Also, how accurate are the other cache metrics like
> getAverageGetTime/getAveragePutTime? Do they provide average get time for
> entire cluster or just local node?
>
>
>
> -Biren
>
>
>
> *From: *Denis Mekhanikov <[email protected]>
> *Reply-To: *"[email protected]" <[email protected]>
> *Date: *Thursday, November 23, 2017 at 3:36 AM
>
>
> *To: *"[email protected]" <[email protected]>
> *Subject: *Re: Cache size changes unexpectedly
>
>
>
> Biren,
>
> Apparently, this cache metric is broken. It only shows number of records,
> that are locally stored.
> Here is the ticket for it: IGNITE-6564
> <https://urldefense.proofpoint.com/v2/url?u=https-3A__issues.apache.org_jira_browse_IGNITE-2D6564&d=DwMFaQ&c=Zok6nrOF6Fe0JtVEqKh3FEeUbToa1PtNBZf6G01cvEQ&r=rbkF1xy5tYmkV8VMdTRVaIVhaXCNGxmyTB5plfGtWuY&m=AG2fq1rXgIAnC_QNs5dexONM8sqjHNfZlf4KAqVdjUM&s=mv00HWbNcMgTUmw1pE2xrZ3ea8MYujZdBR8zNRTojNo&e=>
>
> For now you can use IgniteCache#size() method instead. It's much less
> optimal, but shows correct values.
>
>
>
> Denis
>
>
>
> чт, 23 нояб. 2017 г. в 1:49, Biren Shah <[email protected]>:
>
> Hi Denis,
>
>
>
> We are using CacheMetrics.getKeySize api to get size of a cache. Does this
> api give cache size of entire cache or just the size of the partitions
> local to the node?
>
>
>
> -Biren
>
>
>
> *From: *Denis Mekhanikov <[email protected]>
> *Reply-To: *"[email protected]" <[email protected]>
> *Date: *Wednesday, November 22, 2017 at 8:13 AM
> *To: *"[email protected]" <[email protected]>
> *Subject: *Re: Cache size changes unexpectedly
>
>
>
> Hi Brien!
>
>
>
> I tried to run a cluster with a cache configured like you described, but
> everything works fine.
>
> Could you provide more information about this issue? A project with a
> reproducer will be ideal.
>
> Are you sure that you measure size correctly?
>
>
>
> Denis
>
>
>
> ср, 22 нояб. 2017 г. в 1:28, Biren Shah <[email protected]>:
>
> Hi,
>
>
>
> We have a cluster of 4 nodes. On start of the cluster we load our caches.
> In of our cache we are load around 2 million entries. We also monitor cache
> size at regular interval. The behavior we are noticing is that after
> initial load the cache size seems to be correct for few mins. But then the
> size changes and it indicates that there are only 1 million entries in the
> cache. Meaning initially cache size is ~2 million and within few minutes it
> changes to ~1 million. We are deleting anything from the cache. Do entries
> get off loaded to off-heap?
>
>
>
> Cluster node are setup to have 8GB memory and 8 cores.
>
>
>
> Configuration for the cache in question is:
>
>
>
> CacheConfiguration<String, Entry> cacheConfig = new CacheConfiguration<>();
>
> cacheConfig.setOnheapCacheEnabled(true);
>
> cacheConfig.setCacheMode(CacheMode.PARTITIONED);
>
> cacheConfig.setBackups(1);
>
> cacheConfig.setCopyOnRead(false);
>
>
> cacheConfig.setWriteSynchronizationMode(CacheWriteSynchronizationMode.FULL_SYNC);
>
> cacheConfig.setStatisticsEnabled(true);
>
>
>
> -Biren
>
>

Reply via email to