You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by Himetic <ca...@theplatform.com> on 2016/10/29 00:55:41 UTC

Cache hit rate for Ignite not adding up

I've got a process running ignite with 5 nodes, and a partitioned cache.

Checking jconsole for the hit rates and stuff, I see the following:

CacheGets: 912287
CacheHits: 142473
CacheMisses: 769814
Size: 27539
CacheRemovals: 0
CacheEvictions: 0

The other hosts have very similar stats.  The largest is 30K, and there's 5,
so we're looking at under 150K elements in the cache.  If there's been 770K
cache misses, and no evictions, how is that possible?  Shouldn't we either
have 770K elements in the cache, or cache removals/evictions from the cache
filling up?  Are the stats inaccurate?  Is there a more reliable way to get
stats?

I could be wrong, but it seems like something is off about the misses
number.  Checking the logs I don't think we're making that many requests to
any single node, but the rest of the stats (size, for example) seem to be
specific to the node I'm looking at.  Is it possible it's comparing the hits
on only itself to misses for all requests or something?



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Cache-hit-rate-for-Ignite-not-adding-up-tp8602.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: Cache hit rate for Ignite not adding up

Posted by vkulichenko <va...@gmail.com>.
Hi,

Missed entries can be loaded only if read-through is configured and these
entries exist in store. In any case, these metrics can depend on different
factors and it's not very clear what is going on in your system. Generally,
I don't see any issues in what you describe so far. If you have a small test
project that you can share, then I will take a look and give my feedback.

-Val



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Cache-hit-rate-for-Ignite-not-adding-up-tp8602p8755.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: Cache hit rate for Ignite not adding up

Posted by Himetic <ca...@theplatform.com>.
And another: After restarting a node, the local stats show that it has 162K
cache puts, but only a size of 81K.  It's not quite double, but it's really
close.  Does that mean there's 81K duplicate puts that were ignored?  Or
does it mean something else?



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Cache-hit-rate-for-Ignite-not-adding-up-tp8602p8642.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: Cache hit rate for Ignite not adding up

Posted by Himetic <ca...@theplatform.com>.
Another example of this not really adding up: I run a test hitting a bunch of
data.  We get a low cache hit rate, as expected, but presumably we're
filling the cache with everything we missed.  Nothing is getting removed
from the cache, according to the metrics through jconsole.  So then I run
the exact same requests.  We get a HIGHER hit rate (~25%) but still very far
away from 100%, which is what I'd think we would get given that we're
querying exclusively for stuff we already queried for.



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Cache-hit-rate-for-Ignite-not-adding-up-tp8602p8639.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: Cache hit rate for Ignite not adding up

Posted by Himetic <ca...@theplatform.com>.
Shouldn't Ignite be putting an object into cache every time it's missed,
though?  As long as it isn't running out of room, shouldn't it have one
entry for every time it missed?

Another question I have is: when it says there are X misses, does that mean:
1) X times, this host looked for an object in the distributed cache that
wasn't there.
2) X times, one of the distributed hosts made a call to find an object in
this host's cache partition that wasn't there.
3) something else?



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Cache-hit-rate-for-Ignite-not-adding-up-tp8602p8638.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: Cache hit rate for Ignite not adding up

Posted by vkulichenko <va...@gmail.com>.
Hi,

These numbers look valid to me. Number of hits/misses is incremented each
time you access a key. I.e. it you call get(key) for the same key three
times, you will get 3 hits if this key exists, or 3 misses if it doesn't.
Having said that, number of gets must equal to hits+misses, which is true in
your case. Cache size is a completely different metric, it just shows how
many entries you have in cache.

-Val



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Cache-hit-rate-for-Ignite-not-adding-up-tp8602p8625.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.