<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Forwarder very high RAM consumption in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-can-I-manage-my-Forwarder-with-very-high-RAM-consumption/m-p/591277#M103566</link>
    <description>&lt;P&gt;Heeeeee, man... too simple &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Directory has ONLY needed files, and there's also, for security, a whitelist to get the right proper files, and they're, as i said, 150000 per day &lt;span class="lia-unicode-emoji" title=":face_with_rolling_eyes:"&gt;🙄&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Inputs has already its proper file get monitor... no other files are present in the path, nor they should be touched since not in whitelist input &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Files are correctly ingested, so the forwarder metrics... all is fine!!! But forwarder gets 3GB of System RAM... &lt;span class="lia-unicode-emoji" title=":astonished_face:"&gt;😲&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 29 Mar 2022 14:39:59 GMT</pubDate>
    <dc:creator>verbal_666</dc:creator>
    <dc:date>2022-03-29T14:39:59Z</dc:date>
    <item>
      <title>How can I manage my Forwarder with very high RAM consumption?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-can-I-manage-my-Forwarder-with-very-high-RAM-consumption/m-p/591238#M103562</link>
      <description>&lt;P&gt;Hi.&lt;/P&gt;
&lt;P&gt;I ran into a major problem, and to which I am unable to apply a real fix.&lt;/P&gt;
&lt;P&gt;I have tried all versions of Forwarders (Linux x64), from 7.x.x to 8.x.x, the problem is always the same.&lt;/P&gt;
&lt;P&gt;I have a directory with millions of small files, about 150.000 are being generated per day, continuously generating. To manage this path, the Forwarder starts to occupy several GB of RAM, instead of the few standard MB.&lt;/P&gt;
&lt;P&gt;I tested an&lt;BR /&gt;&lt;STRONG&gt;ignoreOlderThan = 1h&lt;/STRONG&gt; (&lt;EM&gt;also 5m&lt;/EM&gt;) in &lt;EM&gt;inputs&lt;/EM&gt;&lt;BR /&gt;but the result does not change, the GB are always several (about 20% of the System RAM)&lt;BR /&gt;&lt;BR /&gt;Is there a method to avoid this excessive consumption?&lt;BR /&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Mar 2022 15:47:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-can-I-manage-my-Forwarder-with-very-high-RAM-consumption/m-p/591238#M103562</guid>
      <dc:creator>verbal_666</dc:creator>
      <dc:date>2022-03-29T15:47:29Z</dc:date>
    </item>
    <item>
      <title>Re: Forwarder very high RAM consumption</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-can-I-manage-my-Forwarder-with-very-high-RAM-consumption/m-p/591267#M103564</link>
      <description>&lt;P&gt;See if you can modify your inputs.conf to monitor specific files and not all the files in the directory.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Mar 2022 14:04:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-can-I-manage-my-Forwarder-with-very-high-RAM-consumption/m-p/591267#M103564</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2022-03-29T14:04:22Z</dc:date>
    </item>
    <item>
      <title>Re: Forwarder very high RAM consumption</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-can-I-manage-my-Forwarder-with-very-high-RAM-consumption/m-p/591277#M103566</link>
      <description>&lt;P&gt;Heeeeee, man... too simple &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Directory has ONLY needed files, and there's also, for security, a whitelist to get the right proper files, and they're, as i said, 150000 per day &lt;span class="lia-unicode-emoji" title=":face_with_rolling_eyes:"&gt;🙄&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Inputs has already its proper file get monitor... no other files are present in the path, nor they should be touched since not in whitelist input &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Files are correctly ingested, so the forwarder metrics... all is fine!!! But forwarder gets 3GB of System RAM... &lt;span class="lia-unicode-emoji" title=":astonished_face:"&gt;😲&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Mar 2022 14:39:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-can-I-manage-my-Forwarder-with-very-high-RAM-consumption/m-p/591277#M103566</guid>
      <dc:creator>verbal_666</dc:creator>
      <dc:date>2022-03-29T14:39:59Z</dc:date>
    </item>
    <item>
      <title>Re: How can I manage my Forwarder with very high RAM consumption?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-can-I-manage-my-Forwarder-with-very-high-RAM-consumption/m-p/591499#M103589</link>
      <description>&lt;P&gt;IF someone wants to reproduce the issue, here's some data.&lt;/P&gt;&lt;P&gt;THE PACK WITH MULIPLE FILES,&lt;BR /&gt;just an example, but quite equal to what i ingest in Production Environment, i put them in /tmp/FILES/,&lt;/P&gt;&lt;P&gt;&lt;A title="THE_PACK_of_FILES" href="https://drive.google.com/file/d/1pGnZiKEJN9P6cC2lb6mKh6MUGcR2VWGi/view?usp=sharing" target="_self"&gt;THE_PACK&lt;/A&gt;&amp;nbsp;&lt;BR /&gt;&lt;A href="https://drive.google.com/file/d/1pGnZiKEJN9P6cC2lb6mKh6MUGcR2VWGi/view?usp=sharing" target="_blank"&gt;https://drive.google.com/file/d/1pGnZiKEJN9P6cC2lb6mKh6MUGcR2VWGi/view?usp=sharing&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;THE TA, a simple banal inputs.conf,&lt;/P&gt;&lt;P&gt;[monitor:///tmp/FILES/*.txt]&lt;BR /&gt;index=YOUR_INDEX&lt;BR /&gt;sourcetype=multiple_small&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;THE MONITORING&lt;BR /&gt;Start Splunk with the TA enabled, and see,&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;ps -eo args,pmem|grep "^[s]plunkd"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;&lt;EM&gt;splunkd -p 8089 restart 79.6&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial black,avant garde" color="#FF0000"&gt;79,6%&lt;/FONT&gt; of System RAM used &lt;span class="lia-unicode-emoji" title=":downcast_face_with_sweat:"&gt;😓&lt;/span&gt;&lt;span class="lia-unicode-emoji" title=":downcast_face_with_sweat:"&gt;😓&lt;/span&gt;&lt;span class="lia-unicode-emoji" title=":downcast_face_with_sweat:"&gt;😓&lt;/span&gt; (media is 70%)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;NOW, let's see disabling the TA,&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;ps -eo args,pmem|grep "^[s]plunkd"&lt;/FONT&gt;&lt;BR /&gt;&lt;EM&gt;splunkd -p 8089 restart 4.8&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So? &lt;span class="lia-unicode-emoji" title=":persevering_face:"&gt;😣&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Mar 2022 13:32:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-can-I-manage-my-Forwarder-with-very-high-RAM-consumption/m-p/591499#M103589</guid>
      <dc:creator>verbal_666</dc:creator>
      <dc:date>2022-03-30T13:32:49Z</dc:date>
    </item>
    <item>
      <title>Re: How can I manage my Forwarder with very high RAM consumption?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-can-I-manage-my-Forwarder-with-very-high-RAM-consumption/m-p/591524#M103592</link>
      <description>&lt;P&gt;There are some parameters within limits.conf that you could try tweaking but they can limit your functionality.&lt;/P&gt;&lt;P&gt;In the end it may turn out that you've simply bitten off much more than you can chew.&lt;/P&gt;&lt;P&gt;After all if you want to monitor many files, you need memory for file descriptors and all required OS structures so it might not be possible to monitor so many files with reasonable memory usage.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Mar 2022 14:21:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-can-I-manage-my-Forwarder-with-very-high-RAM-consumption/m-p/591524#M103592</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2022-03-30T14:21:58Z</dc:date>
    </item>
    <item>
      <title>Re: How can I manage my Forwarder with very high RAM consumption?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-can-I-manage-my-Forwarder-with-very-high-RAM-consumption/m-p/591536#M103595</link>
      <description>&lt;P&gt;I already tried,&lt;/P&gt;&lt;PRE&gt;maxKBps = &amp;lt;integer&amp;gt;&lt;/PRE&gt;&lt;P&gt;to level the thruput, but that's not the problem.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;max_fd = &amp;lt;integer&amp;gt;&lt;/PRE&gt;&lt;P&gt;to level the fd cache, but also with low values (example 5 in place of default 100), there is a high consumption.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I know, the problem is in OS and file management. I thought Splunk could level this.&lt;/P&gt;&lt;P&gt;No way. I'll give it a reason &lt;span class="lia-unicode-emoji" title=":thumbs_up:"&gt;👍&lt;/span&gt; &lt;span class="lia-unicode-emoji" title=":oncoming_fist:"&gt;👊&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!!! &lt;span class="lia-unicode-emoji" title=":raised_hand:"&gt;✋&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Mar 2022 14:40:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-can-I-manage-my-Forwarder-with-very-high-RAM-consumption/m-p/591536#M103595</guid>
      <dc:creator>verbal_666</dc:creator>
      <dc:date>2022-03-30T14:40:54Z</dc:date>
    </item>
    <item>
      <title>Re: How can I manage my Forwarder with very high RAM consumption?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-can-I-manage-my-Forwarder-with-very-high-RAM-consumption/m-p/591578#M103599</link>
      <description>&lt;P&gt;Well, I have a forwarder monitoring exchange logs from several servers (around dozen of them or so - I'd estimate some 2, maybe 3 thousand files altogether). It can eat several gigabytes of RAM easily. If you have much more than that it's obvious you'll need huge amounts of memory. I'd try to think about splitting the workload between different UFs (like sharing the whole directory over NFS/CIFS and using whitelists to monitor only partial sets of the files on each UF).&lt;/P&gt;</description>
      <pubDate>Wed, 30 Mar 2022 17:08:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-can-I-manage-my-Forwarder-with-very-high-RAM-consumption/m-p/591578#M103599</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2022-03-30T17:08:11Z</dc:date>
    </item>
    <item>
      <title>Re: How can I manage my Forwarder with very high RAM consumption?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-can-I-manage-my-Forwarder-with-very-high-RAM-consumption/m-p/591602#M103601</link>
      <description>&lt;P&gt;I understand.&lt;BR /&gt;But IMHO, it's not pretty obvious since i'm skipping unneeded files older then 5 minutes (&lt;SPAN class=""&gt;ignoreOlderThan=5m), so i'm telling Splunk Forwarder to DO NOT ANALYZE files with timestamp older than 5m... but, obviously, to take the timestamp, i think it needs to "read" from OS and use a file.descriptor call, but really can't understand why so much ram to skip older files &lt;span class="lia-unicode-emoji" title=":face_with_rolling_eyes:"&gt;🙄&lt;/span&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;Unfortunately i can't manage logs, since there is an Application Team who does that. And, as said before, there is already a whitelist to take only two types of files (but it really does not need, since all path is full of needed small files, divided in two prefix (ex. "Job.NODE1.&amp;lt;sessioname&amp;gt;.txt" and "Logging.NODE1.&amp;lt;sessionname&amp;gt;.txt", and they are +100.000 per day in small, very small size... but they have developed the Application this way &lt;span class="lia-unicode-emoji" title=":face_with_head_bandage:"&gt;🤕&lt;/span&gt; when a single file could be very usefull)... i think it's unuseful also installing more instances of forwarders, since forwarder1+forwarder2 ram consumption, will be something like a single forwarder instance &lt;span class="lia-unicode-emoji" title=":face_with_rolling_eyes:"&gt;🙄&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;At the end of the story, anyway, Forwarder does its job, System RAM is 16GB, Applications work..... so... who cares? &lt;span class="lia-unicode-emoji" title=":grinning_face:"&gt;😀&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Mar 2022 18:21:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-can-I-manage-my-Forwarder-with-very-high-RAM-consumption/m-p/591602#M103601</guid>
      <dc:creator>verbal_666</dc:creator>
      <dc:date>2022-03-30T18:21:40Z</dc:date>
    </item>
    <item>
      <title>Re: How can I manage my Forwarder with very high RAM consumption?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-can-I-manage-my-Forwarder-with-very-high-RAM-consumption/m-p/591606#M103604</link>
      <description>&lt;P&gt;I don't know the exact code behind monitor inputs &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; but i suspect the directory has to be polled every now and then. Which means reading filesystem structures for those thousands of files. That on its own can be a performance hit. Apart from that UF keeps the fishbucket database. That also uses some memory...&lt;/P&gt;&lt;P&gt;You can see which files are tracked by the forwarder using&lt;/P&gt;&lt;PRE&gt;splunk list monitor&lt;/PRE&gt;&lt;P&gt;It will tell you a list of tracked files along with their status. But that you probably already know.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Mar 2022 18:43:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-can-I-manage-my-Forwarder-with-very-high-RAM-consumption/m-p/591606#M103604</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2022-03-30T18:43:44Z</dc:date>
    </item>
    <item>
      <title>Re: How can I manage my Forwarder with very high RAM consumption?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-can-I-manage-my-Forwarder-with-very-high-RAM-consumption/m-p/591650#M103609</link>
      <description>&lt;P&gt;Thanks, i often use the "splunk list monitor" functions (as the btool that's magical ‌&lt;span class="lia-unicode-emoji" title=":smiling_face_with_smiling_eyes:"&gt;😊&lt;/span&gt;‌ ).&lt;BR /&gt;But in this case, it's irrilevant, since I KNOW it monitors those files in that path ‌&lt;span class="lia-unicode-emoji" title=":smiling_face_with_sunglasses:"&gt;😎&lt;/span&gt;‌ ... i was considering that just the fishbucket itsself could prevent from "analyze" those old irrilevant, yet ingested files, and leveles the resourses usage... but, it's not, as i can see ‌&lt;span class="lia-unicode-emoji" title=":face_with_steam_from_nose:"&gt;😤&lt;/span&gt;‌&lt;/P&gt;&lt;P&gt;I'm considering doing a daily rotation of older files, also removing them from monitored path or moving in a subdir, and leave only 1 day back of them in monitored path... i'll see.&lt;/P&gt;&lt;P&gt;Anyway, i think next Forwarders could implement something to manage this behaviour, maybe with a proper limit parameter in limits.conf.............. 3GB of ram for an agent, IMO, it's too much ‌&lt;span class="lia-unicode-emoji" title=":face_with_rolling_eyes:"&gt;🙄&lt;/span&gt;‌ but, maybe, we are in front of OS limit, so forwarder can't do nothing for it!!! Don't know.&lt;/P&gt;</description>
      <pubDate>Thu, 31 Mar 2022 02:26:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-can-I-manage-my-Forwarder-with-very-high-RAM-consumption/m-p/591650#M103609</guid>
      <dc:creator>verbal_666</dc:creator>
      <dc:date>2022-03-31T02:26:38Z</dc:date>
    </item>
  </channel>
</rss>

