# High number of log files leads to high filebeat RAM and CPU usage

**URL:** <https://discuss.elastic.co/t/high-number-of-log-files-leads-to-high-filebeat-ram-and-cpu-usage/207575>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [November 12, 2019, 7:13pm UTC](https://discuss.elastic.co/t/high-number-of-log-files-leads-to-high-filebeat-ram-and-cpu-usage/207575 "2019-11-12T19:13:43Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jbrown](https://avatars.discourse-cdn.com/v4/letter/j/b19c9b/32.png) [@jbrown](https://discuss.elastic.co/u/jbrown)\
**Post date:** [November 12, 2019, 7:13pm UTC](https://discuss.elastic.co/t/high-number-of-log-files-leads-to-high-filebeat-ram-and-cpu-usage/207575/1 "2019-11-12T19:13:43Z")

</div>

I have a filebeat client watching a log folder that receives up to 120,000 log files per day. Early in the day, when there are only a few files in the folder, filebeat works fine. However, later in the day filebeat CPU and RAM usage is very high. I believe this is because it is trying to scan all 120,000 files constantly. I moved the scan frequency to 30 seconds, but it seems that did not help.

What can I do to process these log files without the rise in CPU and RAM once the log folder file count gets high?

Any recommendations will help.

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 10, 2019, 7:13pm UTC](https://discuss.elastic.co/t/high-number-of-log-files-leads-to-high-filebeat-ram-and-cpu-usage/207575/2 "2019-12-10T19:13:56Z")

</div>

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