# How to Monitor Cache Usage?

**URL:** <https://discuss.elastic.co/t/how-to-monitor-cache-usage/11980>\
**Category:** Elasticsearch\
**Created:** [May 15, 2013, 8:01pm UTC](https://discuss.elastic.co/t/how-to-monitor-cache-usage/11980 "2013-05-15T20:01:42Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Benjamin\_Sanders](https://avatars.discourse-cdn.com/v4/letter/b/0ea827/32.png) [@Benjamin\_Sanders](https://discuss.elastic.co/u/Benjamin_Sanders)\
**Post date:** [May 15, 2013, 8:01pm UTC](https://discuss.elastic.co/t/how-to-monitor-cache-usage/11980/1 "2013-05-15T20:01:42Z")

</div>

I have seen several questions on this topic, but no direct usable answers.  
Is there an endpoint I can access via the api to see how the cache is being  
used, whether or not it is full, whether particular queries are utilizing  
the cache?

I am primarily interested in node level filter cache, but all information  
would be appreciated.

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Clinton\_Gormley](https://avatars.discourse-cdn.com/v4/letter/c/50afbb/32.png) [@Clinton\_Gormley](https://discuss.elastic.co/u/Clinton_Gormley)\
**Post date:** [May 16, 2013, 9:07am UTC](https://discuss.elastic.co/t/how-to-monitor-cache-usage/11980/2 "2013-05-16T09:07:28Z")

</div>

Which cache are you talking about? The filter cache?

You can use the nodes stats API

> **[Elasticsearch Platform — Find real-time answers at scale](https://www.elastic.co)**
>
> Power insights and outcomes with the Elasticsearch Platform and AI. See into your data and find answers that matter with enterprise solutions designed to help you build, observe, and protect. Try Elasticsearch free today.

get info about how the filter cache, but you can't dive into the  
details  
of what is stored there.

Also, to see what filters are cached, you can use the validate API with  
explain=true [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/reference/api/validate/)

curl -XGET '[http://127.0.0.1:9200/\_all/\_validate/query?pretty=1&explain=true](http://127.0.0.1:9200/_all/_validate/query?pretty=1&explain=true)'  
-d '  
{  
"filtered" : {  
"filter" : {  
"term" : {  
"foo" : "bar"  
}  
}  
}  
}  
'

--\> "explanation" : "ConstantScore(cache(foo:bar))"

On 15 May 2013 22:01, Benjamin Sanders [insightfulquery@gmail.com](mailto:insightfulquery@gmail.com) wrote:

> I have seen several questions on this topic, but no direct usable answers.  
> Is there an endpoint I can access via the api to see how the cache is being  
> used, whether or not it is full, whether particular queries are utilizing  
> the cache?
> 
> I am primarily interested in node level filter cache, but all information  
> would be appreciated.
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Benjamin\_Sanders](https://avatars.discourse-cdn.com/v4/letter/b/0ea827/32.png) [@Benjamin\_Sanders](https://discuss.elastic.co/u/Benjamin_Sanders)\
**Post date:** [May 16, 2013, 4:05pm UTC](https://discuss.elastic.co/t/how-to-monitor-cache-usage/11980/3 "2013-05-16T16:05:56Z")

</div>

That helps a lot, thank you. I had looked at that endpoint while I was  
digging through the guide, but somehow I missed seeing the cache stats.  
That will at least tell me how much memory the cache is using, and how many  
evictions there are. Do you know, other than the guide, where I might read  
to learn more details? For instance, it says "filter evictions", but does  
not give any indication if that is for the last 5 minutes, or for the  
duration the server is running.

On Thursday, May 16, 2013 4:07:28 AM UTC-5, Clinton Gormley wrote:

> Which cache are you talking about? The filter cache?
> 
> You can use the nodes stats API  
> [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/reference/api/admin-cluster-nodes-stats/to) get info about how the filter cache, but you can't dive into the details  
> of what is stored there.
> 
> Also, to see what filters are cached, you can use the validate API with  
> explain=true [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/reference/api/validate/)
> 
> curl -XGET '  
> [http://127.0.0.1:9200/\_all/\_validate/query?pretty=1&explain=true](http://127.0.0.1:9200/_all/_validate/query?pretty=1&explain=true)' -d '  
> {  
> "filtered" : {  
> "filter" : {  
> "term" : {  
> "foo" : "bar"  
> }  
> }  
> }  
> }  
> '
> 
> --\> "explanation" : "ConstantScore(cache(foo:bar))"
> 
> On 15 May 2013 22:01, Benjamin Sanders \<[insight...@gmail.com](mailto:insight...@gmail.com) \<javascript:\>
> 
> > wrote:
> 
> > I have seen several questions on this topic, but no direct usable  
> > answers. Is there an endpoint I can access via the api to see how the cache  
> > is being used, whether or not it is full, whether particular queries are  
> > utilizing the cache?
> > 
> > I am primarily interested in node level filter cache, but all information  
> > would be appreciated.
> > 
> > --  
> > You received this message because you are subscribed to the Google Groups  
> > "elasticsearch" group.  
> > To unsubscribe from this group and stop receiving emails from it, send an  
> > email to [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Clinton\_Gormley](https://avatars.discourse-cdn.com/v4/letter/c/50afbb/32.png) [@Clinton\_Gormley](https://discuss.elastic.co/u/Clinton_Gormley)\
**Post date:** [May 16, 2013, 5:21pm UTC](https://discuss.elastic.co/t/how-to-monitor-cache-usage/11980/4 "2013-05-16T17:21:21Z")

</div>

On 16 May 2013 18:05, Benjamin Sanders [insightfulquery@gmail.com](mailto:insightfulquery@gmail.com) wrote:

> For instance, it says "filter evictions", but does not give any indication  
> if that is for the last 5 minutes, or for the duration the server is  
> running.

All of the node stats are since the node started. They are never reset

clint

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![otisg](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/otisg/32/492_2.png) [@otisg](https://discuss.elastic.co/u/otisg)\
**Post date:** [May 20, 2013, 12:29am UTC](https://discuss.elastic.co/t/how-to-monitor-cache-usage/11980/5 "2013-05-20T00:29:12Z")

</div>

Hi Ben,

I know we have various (all?) filter stats in SPM for Elasticsearch (see  
sig), so you may find that useful if you are trying to understand your  
caches. BigDesk may have this info, too.

## Otis

ELASTICSEARCH Performance Monitoring - [Sematext Monitoring | Infrastructure Monitoring Service](http://sematext.com/spm/index.html)  
Search Analytics - [Cloud Monitoring Tools & Services | Sematext](http://sematext.com/search-analytics/index.html)

On Thursday, May 16, 2013 12:05:56 PM UTC-4, Benjamin Sanders wrote:

> That helps a lot, thank you. I had looked at that endpoint while I was  
> digging through the guide, but somehow I missed seeing the cache stats.  
> That will at least tell me how much memory the cache is using, and how many  
> evictions there are. Do you know, other than the guide, where I might read  
> to learn more details? For instance, it says "filter evictions", but does  
> not give any indication if that is for the last 5 minutes, or for the  
> duration the server is running.
> 
> On Thursday, May 16, 2013 4:07:28 AM UTC-5, Clinton Gormley wrote:
> 
> > Which cache are you talking about? The filter cache?
> > 
> > You can use the nodes stats API  
> > [Elastic — The Search AI Company | Elastic](http://www.elasticsearch.org/guide/reference/api/admin-cluster-nodes-stats/to) get info about how the filter cache, but you can't dive into the details  
> > of what is stored there.
> > 
> > Also, to see what filters are cached, you can use the validate API with  
> > explain=true [Elastic — The Search AI Company | Elastic](http://www.elasticsearch.org/guide/reference/api/validate/)
> > 
> > curl -XGET '  
> > [http://127.0.0.1:9200/\_all/\_validate/query?pretty=1&explain=true](http://127.0.0.1:9200/_all/_validate/query?pretty=1&explain=true)' -d '  
> > {  
> > "filtered" : {  
> > "filter" : {  
> > "term" : {  
> > "foo" : "bar"  
> > }  
> > }  
> > }  
> > }  
> > '
> > 
> > --\> "explanation" : "ConstantScore(cache(foo:bar))"
> > 
> > On 15 May 2013 22:01, Benjamin Sanders [insight...@gmail.com](mailto:insight...@gmail.com) wrote:
> > 
> > > I have seen several questions on this topic, but no direct usable  
> > > answers. Is there an endpoint I can access via the api to see how the cache  
> > > is being used, whether or not it is full, whether particular queries are  
> > > utilizing the cache?
> > > 
> > > I am primarily interested in node level filter cache, but all  
> > > information would be appreciated.
> > > 
> > > --  
> > > You received this message because you are subscribed to the Google  
> > > Groups "elasticsearch" group.  
> > > To unsubscribe from this group and stop receiving emails from it, send  
> > > an email to [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com).  
> > > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Benjamin\_Sanders](https://avatars.discourse-cdn.com/v4/letter/b/0ea827/32.png) [@Benjamin\_Sanders](https://discuss.elastic.co/u/Benjamin_Sanders)\
**Post date:** [May 20, 2013, 5:02pm UTC](https://discuss.elastic.co/t/how-to-monitor-cache-usage/11980/6 "2013-05-20T17:02:01Z")

</div>

Awesome! I'll check it out, thanks!  
On May 19, 2013 7:29 PM, "Otis Gospodnetic" [otis.gospodnetic@gmail.com](mailto:otis.gospodnetic@gmail.com)  
wrote:

> Hi Ben,
> 
> I know we have various (all?) filter stats in SPM for Elasticsearch (see  
> sig), so you may find that useful if you are trying to understand your  
> caches. BigDesk may have this info, too.
> 
> ## Otis
> 
> ELASTICSEARCH Performance Monitoring - [Sematext Monitoring | Infrastructure Monitoring Service](http://sematext.com/spm/index.html)  
> Search Analytics - [Cloud Monitoring Tools & Services | Sematext](http://sematext.com/search-analytics/index.html)
> 
> On Thursday, May 16, 2013 12:05:56 PM UTC-4, Benjamin Sanders wrote:
> 
> > That helps a lot, thank you. I had looked at that endpoint while I was  
> > digging through the guide, but somehow I missed seeing the cache stats.  
> > That will at least tell me how much memory the cache is using, and how many  
> > evictions there are. Do you know, other than the guide, where I might read  
> > to learn more details? For instance, it says "filter evictions", but does  
> > not give any indication if that is for the last 5 minutes, or for the  
> > duration the server is running.
> > 
> > On Thursday, May 16, 2013 4:07:28 AM UTC-5, Clinton Gormley wrote:
> > 
> > > Which cache are you talking about? The filter cache?
> > > 
> > > You can use the nodes stats API [http://www.elasticsearch](http://www.elasticsearch).\*\*  
> > > org/guide/reference/api/admin-\*\*cluster-nodes-stats/[http://www.elasticsearch.org/guide/reference/api/admin-cluster-nodes-stats/](http://www.elasticsearch.org/guide/reference/api/admin-cluster-nodes-stats/)to get info about how the filter cache, but you can't dive into the details  
> > > of what is stored there.
> > > 
> > > Also, to see what filters are cached, you can use the validate API with  
> > > explain=true [http://www](http://www).**[Elasticsearch Platform — Find real-time answers at scale | Elastic](http://elasticsearch.org/guide/)**  
> > > reference/api/validate/[http://www.elasticsearch.org/guide/reference/api/validate/](http://www.elasticsearch.org/guide/reference/api/validate/)
> > > 
> > > curl -XGET '[http://127.0.0.1:9200/\_all/\_\*\*validate/query?pretty=1&](http://127.0.0.1:9200/_all/_**validate/query?pretty=1&)\*\*  
> > > explain=true[http://127.0.0.1:9200/\_all/\_validate/query?pretty=1&explain=true](http://127.0.0.1:9200/_all/_validate/query?pretty=1&explain=true)'  
> > > -d '  
> > > {  
> > > "filtered" : {  
> > > "filter" : {  
> > > "term" : {  
> > > "foo" : "bar"  
> > > }  
> > > }  
> > > }  
> > > }  
> > > '
> > > 
> > > --\> "explanation" : "ConstantScore(cache(foo:bar))\*\*"
> > > 
> > > On 15 May 2013 22:01, Benjamin Sanders [insight...@gmail.com](mailto:insight...@gmail.com) wrote:
> > > 
> > > > I have seen several questions on this topic, but no direct usable  
> > > > answers. Is there an endpoint I can access via the api to see how the cache  
> > > > is being used, whether or not it is full, whether particular queries are  
> > > > utilizing the cache?
> > > > 
> > > > I am primarily interested in node level filter cache, but all  
> > > > information would be appreciated.
> > > > 
> > > > --  
> > > > You received this message because you are subscribed to the Google  
> > > > Groups "elasticsearch" group.  
> > > > To unsubscribe from this group and stop receiving emails from it, send  
> > > > an email to elasticsearc...@googlegroups.\*\*com.  
> > > > For more options, visit [https://groups.google.com/\*\*groups/opt\_out](https://groups.google.com/**groups/opt_out)[https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out)  
> > > > .
> > > 
> > > --  
> > > You received this message because you are subscribed to a topic in the  
> > > Google Groups "elasticsearch" group.  
> > > To unsubscribe from this topic, visit  
> > > [https://groups.google.com/d/topic/elasticsearch/QxuXRMqrOaM/unsubscribe?hl=en-US](https://groups.google.com/d/topic/elasticsearch/QxuXRMqrOaM/unsubscribe?hl=en-US)  
> > > .  
> > > To unsubscribe from this group and all its topics, send an email to  
> > > [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> > > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 2:35am UTC](https://discuss.elastic.co/t/how-to-monitor-cache-usage/11980/7 "2017-07-06T02:35:41Z")

</div>


