# Is it safe to clear pagecache

**URL:** <https://discuss.elastic.co/t/is-it-safe-to-clear-pagecache/98948>\
**Category:** Elasticsearch\
**Created:** [August 31, 2017, 6:46am UTC](https://discuss.elastic.co/t/is-it-safe-to-clear-pagecache/98948 "2017-08-31T06:46:33Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![596375269](https://avatars.discourse-cdn.com/v4/letter/5/e495f1/32.png) [@596375269](https://discuss.elastic.co/u/596375269)\
**Post date:** [August 31, 2017, 6:46am UTC](https://discuss.elastic.co/t/is-it-safe-to-clear-pagecache/98948/1 "2017-08-31T06:46:33Z")

</div>

Hi., to All.  
Good Evening.

Generally elasticsearch occupies a lot of pagecache, does it safe to use the command  
'echo 3 \> /proc/sys/vm/drop\_caches'  
to clear pagecache? even when data is indexing?

Thanks to you all.

regards

---

<div class="post-metadata">

**Author:** ![thiago](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/thiago/32/32096_2.png) [@thiago](https://discuss.elastic.co/u/thiago)\
**Post date:** [September 8, 2017, 12:08pm UTC](https://discuss.elastic.co/t/is-it-safe-to-clear-pagecache/98948/2 "2017-09-08T12:08:24Z")

</div>

This is intended. Elasticsearch performance relies a lot on OS level filesystem cache for indexing but mostly for querying. If that cache is not available then performance will certainly degrade.

---

<div class="post-metadata">

**Author:** ![596375269](https://avatars.discourse-cdn.com/v4/letter/5/e495f1/32.png) [@596375269](https://discuss.elastic.co/u/596375269)\
**Post date:** [September 18, 2017, 7:57am UTC](https://discuss.elastic.co/t/is-it-safe-to-clear-pagecache/98948/3 "2017-09-18T07:57:24Z")

</div>

> [@thiago](#):
>
> intended

ok

then  
when the memory usage is high ,for example higher than 99%,  
is it necessary (or safe?) to clear filesystem cache use the command above?

thanks

---

<div class="post-metadata">

**Author:** ![thiago](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/thiago/32/32096_2.png) [@thiago](https://discuss.elastic.co/u/thiago)\
**Post date:** [September 18, 2017, 7:59am UTC](https://discuss.elastic.co/t/is-it-safe-to-clear-pagecache/98948/4 "2017-09-18T07:59:41Z")

</div>

You should leave as is, do not clear filesystem pagecache. It's cache, so if something else critical to OS health needs memory, OS will release the cache anyway.

---

<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:** [October 16, 2017, 7:59am UTC](https://discuss.elastic.co/t/is-it-safe-to-clear-pagecache/98948/5 "2017-10-16T07:59:53Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
