# Disable cache?

**URL:** https://discuss.elastic.co/t/disable-cache/6995
**Category:** Elasticsearch
**Created:** [March 14, 2012, 11:58am UTC](https://discuss.elastic.co/t/disable-cache/6995 "2012-03-14T11:58:33Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Andrej](https://avatars.discourse-cdn.com/v4/letter/a/d9b06d/32.png) [@Andrej](https://discuss.elastic.co/u/Andrej)
#### Post date: [March 14, 2012, 11:58am UTC](https://discuss.elastic.co/t/disable-cache/6995/1 "2012-03-14T11:58:33Z")

</div>

Hi,

I have a very simple question: is there a way to disable caching or  
other runtime optimizations for tests? We are comparing several query  
types, but this is a tough job with caching enabled.

Thanks!  
Andrej

---

<div class="post-metadata">

### Author: ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)
#### Post date: [March 14, 2012, 12:53pm UTC](https://discuss.elastic.co/t/disable-cache/6995/2 "2012-03-14T12:53:21Z")

</div>

The only really relevant filter that you can disable is the filter cache (set index.cache.filter.type to none) assuming you use filters. The main other cache usually used is the file system cache, which is OS level.

On Wednesday, March 14, 2012 at 1:58 PM, Andrej Rosenheinrich wrote:

> Hi,
> 
> I have a very simple question: is there a way to disable caching or  
> other runtime optimizations for tests? We are comparing several query  
> types, but this is a tough job with caching enabled.
> 
> Thanks!  
> Andrej

---

<div class="post-metadata">

### Author: ![Andrej](https://avatars.discourse-cdn.com/v4/letter/a/d9b06d/32.png) [@Andrej](https://discuss.elastic.co/u/Andrej)
#### Post date: [March 26, 2012, 3:49pm UTC](https://discuss.elastic.co/t/disable-cache/6995/3 "2012-03-26T15:49:31Z")

</div>

Does that mean that actually giving elasticsearch more memory doesnt  
speed up the index and it would make more sense to leave memory to the  
system for file caching? What are your recommendations for productive  
use settings, concerning memory, shard size, shards per node?

On 14 Mrz., 14:53, Shay Banon [kim...@gmail.com](mailto:kim...@gmail.com) wrote:

> The only really relevant filter that you can disable is the filter cache (set index.cache.filter.type to none) assuming you use filters. The main other cache usually used is the file system cache, which is OS level.
> 
> On Wednesday, March 14, 2012 at 1:58 PM, Andrej Rosenheinrich wrote:
> 
> > Hi,
> 
> > I have a very simple question: is there a way to disable caching or  
> > other runtime optimizations for tests? We are comparing several query  
> > types, but this is a tough job with caching enabled.
> 
> > Thanks!  
> > Andrej

---

<div class="post-metadata">

### Author: ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)
#### Post date: [March 27, 2012, 1:16pm UTC](https://discuss.elastic.co/t/disable-cache/6995/4 "2012-03-27T13:16:30Z")

</div>

Hard to give numbers for shard size and shards per node and so on, really  
depends on the data, but in general, yes, no need to allocate more memory  
to ES then it really needs, the rest is best left for the OS.

On Mon, Mar 26, 2012 at 5:49 PM, Andrej Rosenheinrich \<  
[andrej.rosenheinrich@unister.de](mailto:andrej.rosenheinrich@unister.de)\> wrote:

> Does that mean that actually giving elasticsearch more memory doesnt  
> speed up the index and it would make more sense to leave memory to the  
> system for file caching? What are your recommendations for productive  
> use settings, concerning memory, shard size, shards per node?
> 
> On 14 Mrz., 14:53, Shay Banon [kim...@gmail.com](mailto:kim...@gmail.com) wrote:
> 
> > The only really relevant filter that you can disable is the filter cache  
> > (set index.cache.filter.type to none) assuming you use filters. The main  
> > other cache usually used is the file system cache, which is OS level.
> > 
> > On Wednesday, March 14, 2012 at 1:58 PM, Andrej Rosenheinrich wrote:
> > 
> > > Hi,
> > 
> > > I have a very simple question: is there a way to disable caching or  
> > > other runtime optimizations for tests? We are comparing several query  
> > > types, but this is a tough job with caching enabled.
> > 
> > > Thanks!  
> > > Andrej

---

<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, 3:34am UTC](https://discuss.elastic.co/t/disable-cache/6995/5 "2017-07-06T03:34:38Z")

</div>


