# Stop caching

**URL:** https://discuss.elastic.co/t/stop-caching/11244
**Category:** Elasticsearch
**Created:** [March 21, 2013, 3:28pm UTC](https://discuss.elastic.co/t/stop-caching/11244 "2013-03-21T15:28:34Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Ophir\_Michaeli](https://avatars.discourse-cdn.com/v4/letter/o/9f8e36/32.png) [@Ophir\_Michaeli](https://discuss.elastic.co/u/Ophir_Michaeli)
#### Post date: [March 21, 2013, 3:28pm UTC](https://discuss.elastic.co/t/stop-caching/11244/1 "2013-03-21T15:28:34Z")

</div>

Hi,

How do I stop all caching?

I need to stop it for performance tests vs lucene.

I tried this at the yml fiel, but not sure that it covers all:

indices.cache.filter.size: 0%

index.cache.filter.max\_size: 0

index.cache.filter.expire: 0m

index.cache.field.max\_size: 0

index.cache.field.expire: 0

Thanks,

Ophir

--  
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: ![q42jaap](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/q42jaap/32/2241_2.png) [@q42jaap](https://discuss.elastic.co/u/q42jaap)
#### Post date: [March 21, 2013, 4:07pm UTC](https://discuss.elastic.co/t/stop-caching/11244/2 "2013-03-21T16:07:11Z")

</div>

That sounds silly imho, if I'd write an app using lucene I'd always  
implement some basic caching to speed up a number of things that would  
just be plain stupid to query everytime.  
You also have to keep in mind that ES is optimized for a distributed  
setup so it adds some overhead.

Under the covers it is "just" Lucene with a lot of smartness added to  
it. I think it would be very difficult to fairly compare the two.  
Jaap Taal

[Q42 BV | tel 070 44523 42 | direct 070 44523 65 | [http://q42.nl](http://q42.nl) |  
Waldorpstraat 17F, Den Haag | Vijzelstraat 72 unit 4.23, Amsterdam |  
KvK 30164662 ]

On Thu, Mar 21, 2013 at 4:28 PM, Ophir Michaeli [ophirmichaeli@gmail.com](mailto:ophirmichaeli@gmail.com) wrote:

> Hi,
> 
> How do I stop all caching?
> 
> I need to stop it for performance tests vs lucene.
> 
> I tried this at the yml fiel, but not sure that it covers all:
> 
> indices.cache.filter.size: 0%
> 
> index.cache.filter.max\_size: 0
> 
> index.cache.filter.expire: 0m
> 
> index.cache.field.max\_size: 0
> 
> index.cache.field.expire: 0
> 
> Thanks,
> 
> Ophir
> 
> --  
> 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: ![jprante](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jprante/32/44941_2.png) [@jprante](https://discuss.elastic.co/u/jprante)
#### Post date: [March 21, 2013, 4:19pm UTC](https://discuss.elastic.co/t/stop-caching/11244/3 "2013-03-21T16:19:08Z")

</div>

I wonder what kind of performance you want to compare. ES is based on  
Lucene. Although ES implements its own caching, there is no much sense  
in "stopping" caching because many functions rely on it. A field cache  
is not a turbo charger, in an inverted index, it's simply essential to  
cache fields. Note, Lucene brings its own field caching.

Jörg

Am 21.03.13 16:28, schrieb Ophir Michaeli:

> How do I stop all caching?
> 
> I need to stop it for performance tests vs lucene.

--  
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: [March 22, 2013, 4:24am UTC](https://discuss.elastic.co/t/stop-caching/11244/4 "2013-03-22T04:24:25Z")

</div>

Hi Ophir,

While some say this is silly, I'd love to hear what you find - what you get  
when you run ES vs. Lucene test where you have all ES-only cached disabled.  
Please share your findings.

## Otis

ELASTICSEARCH Performance Monitoring - [Sematext Monitoring | Infrastructure Monitoring Service](http://sematext.com/spm/index.html)

On Thursday, March 21, 2013 11:28:34 AM UTC-4, Ophir Michaeli wrote:

> Hi,
> 
> How do I stop all caching?
> 
> I need to stop it for performance tests vs lucene.
> 
> I tried this at the yml fiel, but not sure that it covers all:
> 
> indices.cache.filter.size: 0%
> 
> index.cache.filter.max\_size: 0
> 
> index.cache.filter.expire: 0m
> 
> index.cache.field.max\_size: 0
> 
> index.cache.field.expire: 0
> 
> Thanks,
> 
> Ophir

--  
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: ![Ophir\_Michaeli](https://avatars.discourse-cdn.com/v4/letter/o/9f8e36/32.png) [@Ophir\_Michaeli](https://discuss.elastic.co/u/Ophir_Michaeli)
#### Post date: [March 24, 2013, 9:29am UTC](https://discuss.elastic.co/t/stop-caching/11244/5 "2013-03-24T09:29:28Z")

</div>

We have our own distributed system that uses lucene, and we're considering  
changing to elasticsearch.

Our system has billions of indexed documents and the first tests are with  
tens of millions,

so we want to check that the elasticsearch results are not influenced by  
cache which might function different with billions of documents.

On Thursday, March 21, 2013 5:28:34 PM UTC+2, Ophir Michaeli wrote:

> Hi,
> 
> How do I stop all caching?
> 
> I need to stop it for performance tests vs lucene.
> 
> I tried this at the yml fiel, but not sure that it covers all:
> 
> indices.cache.filter.size: 0%
> 
> index.cache.filter.max\_size: 0
> 
> index.cache.filter.expire: 0m
> 
> index.cache.field.max\_size: 0
> 
> index.cache.field.expire: 0
> 
> Thanks,
> 
> Ophir

--  
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: ![simonw\_2](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/simonw_2/32/1130_2.png) [@simonw\_2](https://discuss.elastic.co/u/simonw_2)
#### Post date: [March 24, 2013, 12:00pm UTC](https://discuss.elastic.co/t/stop-caching/11244/6 "2013-03-24T12:00:38Z")

</div>

you should be able to set the filter.max\_size = 0 per segment via:

index.cache.filter.max\_size

see also:

> **[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.

further you can simply set "\_cache" = false on each filter which should  
prevent the filter from being cached.

You can also prevent the field\_cache from being reused but I don't think  
this makes any sense since you don't wanna benchmark uninverting which is  
the same thing in plain lucene or ES.

If you only execute queries then you don't need to do anything since ES  
doesn't cache queries nor their results.

Hope that helps,

simon

On Sunday, March 24, 2013 10:29:28 AM UTC+1, Ophir Michaeli wrote:

> We have our own distributed system that uses lucene, and we're considering  
> changing to elasticsearch.
> 
> Our system has billions of indexed documents and the first tests are with  
> tens of millions,
> 
> so we want to check that the elasticsearch results are not influenced by  
> cache which might function different with billions of documents.
> 
> On Thursday, March 21, 2013 5:28:34 PM UTC+2, Ophir Michaeli wrote:
> 
> > Hi,
> > 
> > How do I stop all caching?
> > 
> > I need to stop it for performance tests vs lucene.
> > 
> > I tried this at the yml fiel, but not sure that it covers all:
> > 
> > indices.cache.filter.size: 0%
> > 
> > index.cache.filter.max\_size: 0
> > 
> > index.cache.filter.expire: 0m
> > 
> > index.cache.field.max\_size: 0
> > 
> > index.cache.field.expire: 0
> > 
> > Thanks,
> > 
> > Ophir

--  
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:44am UTC](https://discuss.elastic.co/t/stop-caching/11244/7 "2017-07-06T02:44:56Z")

</div>


