# Buffer memory usage on Linux server

**URL:** <https://discuss.elastic.co/t/buffer-memory-usage-on-linux-server/224947>\
**Category:** Elasticsearch\
**Tags:** docker\
**Created:** [March 25, 2020, 6:54am UTC](https://discuss.elastic.co/t/buffer-memory-usage-on-linux-server/224947 "2020-03-25T06:54:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![tarophin403](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tarophin403/32/65022_2.png) [@tarophin403](https://discuss.elastic.co/u/tarophin403)\
**Post date:** [March 25, 2020, 6:54am UTC](https://discuss.elastic.co/t/buffer-memory-usage-on-linux-server/224947/1 "2020-03-25T06:54:46Z")

</div>

16g of the total 32g memory was allocated as heap memory.  
I know that lucene uses buffer memory, and I know that buffer memory is managed automatically without any control.  
However, since the resource monitoring system calculates the total memory usage as actual usage + buffer memory, I am wondering if I can limit the buffer memory usage.  
I tried applying the option below but it doesn't seem to work.  
-Djdk.nio.maxCachedBufferSize = 262144 and -XX: MaxDirectMemorySize = 2048m

---

<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:** [April 22, 2020, 7:01am UTC](https://discuss.elastic.co/t/buffer-memory-usage-on-linux-server/224947/2 "2020-04-22T07:01:13Z")

</div>

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