# Limit Metricbeat Memory Usage

**URL:** <https://discuss.elastic.co/t/limit-metricbeat-memory-usage/348062>\
**Category:** Beats\
**Tags:** metricbeat\
**Created:** [November 27, 2023, 3:12pm UTC](https://discuss.elastic.co/t/limit-metricbeat-memory-usage/348062 "2023-11-27T15:12:34Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![nvanalphen](https://avatars.discourse-cdn.com/v4/letter/n/53a042/32.png) [@nvanalphen](https://discuss.elastic.co/u/nvanalphen)\
**Post date:** [November 27, 2023, 3:12pm UTC](https://discuss.elastic.co/t/limit-metricbeat-memory-usage/348062/1 "2023-11-27T15:12:34Z")

</div>

Is it possible to limit the memory that Metricbeat may use? I am seeing huge memory loads on my Windows Servers (2016, 2019 and 2022), between 2 and 3 Gb on VMs and a staggering 24Gb on a HyperV host

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/8/a/8a7c4bfe9525fcf5de060e905535ba6fbc0c29d9.png)

Stopping and starting the Elastic Agent reduces memory usage to ~150Mb, but a couple of hours later, memory usage is way up again.  
I'm running Agent version 8.11.1

I have an Agent Policy with the default System integration, but I also added the WIndows Integration. But reading the documentationagain, I am thinking that these two are gathering the same information. Am I correct in thinking that and should I remove the Windows integration from the policy? Could that help reducing the memory usage?

---

<div class="post-metadata">

**Author:** ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)\
**Post date:** [November 27, 2023, 3:33pm UTC](https://discuss.elastic.co/t/limit-metricbeat-memory-usage/348062/2 "2023-11-27T15:33:37Z")

</div>

> [@nvanalphen](#):
>
> I'm running Agent version 8.11.1

There is a know issue related to memory leak on Metricbeat on windows, which is probably your case.

You can check the [issue here](https://github.com/elastic/beats/issues/37142).

---

<div class="post-metadata">

**Author:** ![nvanalphen](https://avatars.discourse-cdn.com/v4/letter/n/53a042/32.png) [@nvanalphen](https://discuss.elastic.co/u/nvanalphen)\
**Post date:** [November 27, 2023, 3:41pm UTC](https://discuss.elastic.co/t/limit-metricbeat-memory-usage/348062/3 "2023-11-27T15:41:29Z")

</div>

Ah. Yes, that looks like it. I found some old references to similar issues on older versions on this forum, but didn't look there. Thanks!

---

<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:** [December 25, 2023, 5:41pm UTC](https://discuss.elastic.co/t/limit-metricbeat-memory-usage/348062/4 "2023-12-25T17:41:38Z")

</div>

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