<?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: how to tune ulimit on my server ? in Monitoring Splunk</title>
    <link>https://community.splunk.com/t5/Monitoring-Splunk/how-to-tune-ulimit-on-my-server/m-p/72072#M850</link>
    <description>&lt;P&gt;In my experience with AWS deployments, I found the need to change the settings within /etc/security/limits.d&lt;BR /&gt;
if I changed only the values in the limits.conf from /etc/security/ it gets overridden by limits.d contents.&lt;/P&gt;

&lt;P&gt;make sure to check if any pre- determined limits were not set by AWS in limits.d&lt;/P&gt;

&lt;P&gt;Hope it helps,&lt;/P&gt;</description>
    <pubDate>Mon, 11 Apr 2016 00:06:39 GMT</pubDate>
    <dc:creator>ccruz_splunk</dc:creator>
    <dc:date>2016-04-11T00:06:39Z</dc:date>
    <item>
      <title>how to tune ulimit on my server ?</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/how-to-tune-ulimit-on-my-server/m-p/72060#M838</link>
      <description>&lt;P&gt;I have an indexer on linux on a physical server, with 100+ forwarders, and local files indexing, it's also my deployment server, and my search-head, with all the users from my AD.&lt;/P&gt;

&lt;P&gt;I beefed-up the disk size, multiple cores, RAM...
But I still see some complains at startup.
How can I tune it ?&lt;/P&gt;

&lt;P&gt;here is my starting log in splunkd.log&lt;/P&gt;

&lt;PRE&gt;
03-03-2011 21:50:09.027 INFO  ulimit - Limit: virtual address space size: unlimited
03-03-2011 21:50:09.027 INFO  ulimit - Limit: data segment size: 1879048192 bytes [hard maximum: unlimited]
03-03-2011 21:50:09.027 INFO  ulimit - Limit: resident memory size: 2147482624 bytes [hard maximum: unlimited]
03-03-2011 21:50:09.027 INFO  ulimit - Limit: stack size: 33554432 bytes [hard maximum: 2147483646 bytes]
03-03-2011 21:50:09.027 INFO  ulimit - Limit: core file size: 1073741312 bytes [hard maximum: unlimited]
03-03-2011 21:50:09.027 INFO  ulimit - Limit: data file size: 2147483646 bytes
03-03-2011 21:50:09.027 ERROR ulimit - Splunk may not work due to low file size limit
03-03-2011 21:50:09.027 INFO  ulimit - Limit: open files: 1024
03-03-2011 21:50:09.027 INFO  ulimit - Limit: cpu time: unlimited
03-03-2011 21:50:09.029 INFO  loader - Splunkd starting (build 95063).
&lt;/PRE&gt;</description>
      <pubDate>Thu, 31 Mar 2011 04:41:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/how-to-tune-ulimit-on-my-server/m-p/72060#M838</guid>
      <dc:creator>mataharry</dc:creator>
      <dc:date>2011-03-31T04:41:32Z</dc:date>
    </item>
    <item>
      <title>Re: how to tune ulimit on my server ?</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/how-to-tune-ulimit-on-my-server/m-p/72061#M839</link>
      <description>&lt;P&gt;&lt;STRONG&gt;The culprit is your server ulimit.&lt;/STRONG&gt;
This is a classic problem with linux boxes, a real dedicated server needs higher limits.&lt;/P&gt;

&lt;P&gt;To check your limits,&lt;/P&gt;

&lt;PRE&gt;
ulimit -a
# if you are running splunk under another user
su myuserrunningsplunk ulimit -a
# or restart splunk and check
grep ulimit $SPLUNK_HOME/var/log/splunk/splunkd.log
&lt;/PRE&gt;

&lt;P&gt;the 2 critical values are :&lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;the file size (ulimit -f)&lt;/STRONG&gt;, because the size of a uncompressed bucket files can be very high. This is why splunk was complaining at launch or you.&lt;/P&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;the number of open files (ulimit -n)&lt;/STRONG&gt;, also named number of &lt;STRONG&gt;file descriptors&lt;/STRONG&gt;.
This one is very important in your case, because splunk is consuming a lot or file descriptors.
Increase the value to at least 2048 or more (depending of your server capacity, I usually multiply by 10 to 10240 or 102400 or even unlimited for dedicated high-end production servers) &lt;/P&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;the number of user processes (ulimit -u)&lt;/STRONG&gt; 
this is one if linked to the number of users and concurrent searches, it it is recommended to have more than 1024, 10000 is a good start&lt;/P&gt;&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;To have an estimation, consider that you may concurrently need a file descriptors for:
every forwarder socket, every deployment client socket, each bucket can use 10 to 100 files, every search will consume up to 3, every file to be indexed, every user connected ...&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;How to change the file descriptor ulimit, by example to 10240 ?&lt;/STRONG&gt;&lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;&lt;STRONG&gt;temporary&lt;/STRONG&gt; with a simple ulimit -n 10240 (this will not survive a server restart)&lt;/LI&gt;
&lt;LI&gt;&lt;STRONG&gt;persistently&lt;/STRONG&gt;  edit users limits (on AIX and ubuntu) in /etc/security/limits.conf
( Hard limits are maintained by the kernel while the soft limits are enforced by the shell, here we use the soft &amp;lt; hard)
&lt;PRE&gt;
splunkuser               hard   nofile          20240
splunkuser               soft    nofile          10240
&lt;/PRE&gt; &lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;Don't forget to restart splunk after, and double check for ulimit in splunkd.log to confirm that the new value is detected (in particular if splunk is not running as root).&lt;/P&gt;

&lt;HR /&gt;

&lt;P&gt;Remarks :&lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;You may ultimately reach the system wide limit, that is usually much higher.
see on debian and redhat in /etc/sysctl.conf   fs.file-max&lt;/LI&gt;
&lt;LI&gt;Don't run the deployment server in the same instance than your indexer, it will reduce your performances of splunkd. Instead, you should run it on another server, or at least in another instance.&lt;/LI&gt;
&lt;/UL&gt;</description>
      <pubDate>Thu, 31 Mar 2011 04:47:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/how-to-tune-ulimit-on-my-server/m-p/72061#M839</guid>
      <dc:creator>yannK</dc:creator>
      <dc:date>2011-03-31T04:47:46Z</dc:date>
    </item>
    <item>
      <title>Re: how to tune ulimit on my server ?</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/how-to-tune-ulimit-on-my-server/m-p/72062#M840</link>
      <description>&lt;P&gt;This is much more stable with openfile= 8096 for me.&lt;BR /&gt;
I also increased the filesize, on ext3 64bit I can go up to 2TB, 32bit seems limited to 2GB.&lt;BR /&gt;
&lt;A href="http://www.cyberciti.biz/tips/what-is-maximum-partition-size-supported-by-linux.html"&gt;http://www.cyberciti.biz/tips/what-is-maximum-partition-size-supported-by-linux.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 02 Apr 2011 00:54:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/how-to-tune-ulimit-on-my-server/m-p/72062#M840</guid>
      <dc:creator>mataharry</dc:creator>
      <dc:date>2011-04-02T00:54:48Z</dc:date>
    </item>
    <item>
      <title>Re: how to tune ulimit on my server ?</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/how-to-tune-ulimit-on-my-server/m-p/72063#M841</link>
      <description>&lt;P&gt;Note about Ubuntu.  On my 8.04 install, the "pam_limits" module wasn't enabled by default for the "su" command, and therefore the "splunk" init.d (startup/shutdown) script which prevented the appropriate limits from being applied.  Here's what I had to do:&lt;/P&gt;

&lt;P&gt;First, edit &lt;CODE&gt;/etc/pam.d/su&lt;/CODE&gt;:  You will need to add (or uncomment) the following line:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;  session    required   pam_limits.so
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Second, edit &lt;CODE&gt;/etc/security/limits.conf&lt;/CODE&gt;:  Add the following "nofiles" limit for the "splunk" user (or whatever user your &lt;CODE&gt;splunkd&lt;/CODE&gt; process runs as)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;splunk          soft    nofile          4096
splunk          hard    nofile          8196
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Note, you may also want to enable "pam_limits.so" for "sudo" as well, if you ever use that tool too login interactively restart splunk services.&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Update:&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;This appears to still be true for default Ubuntu 12.04 installs.&lt;/P&gt;</description>
      <pubDate>Tue, 23 Aug 2011 17:54:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/how-to-tune-ulimit-on-my-server/m-p/72063#M841</guid>
      <dc:creator>Lowell</dc:creator>
      <dc:date>2011-08-23T17:54:30Z</dc:date>
    </item>
    <item>
      <title>Re: how to tune ulimit on my server ?</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/how-to-tune-ulimit-on-my-server/m-p/72064#M842</link>
      <description>&lt;P&gt;Also remember for those running splunk as root, that root has to be explicitly listed in the /etc/security/limits.conf and will not match against the '*' wildcard.  eg.&lt;/P&gt;

&lt;P&gt;root   soft  nofile 10000&lt;BR /&gt;
root   hard  nofile 20000&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jun 2012 17:20:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/how-to-tune-ulimit-on-my-server/m-p/72064#M842</guid>
      <dc:creator>mburgener</dc:creator>
      <dc:date>2012-06-06T17:20:57Z</dc:date>
    </item>
    <item>
      <title>Re: how to tune ulimit on my server ?</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/how-to-tune-ulimit-on-my-server/m-p/72065#M843</link>
      <description>&lt;P&gt;remark : the answer was edited, we mentioned previously to edit  /etc/sysctl.conf instead of /etc/security/limit.conf. You should not touch sysctl that has a higher default value already.&lt;/P&gt;</description>
      <pubDate>Thu, 06 Sep 2012 22:46:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/how-to-tune-ulimit-on-my-server/m-p/72065#M843</guid>
      <dc:creator>yannK</dc:creator>
      <dc:date>2012-09-06T22:46:02Z</dc:date>
    </item>
    <item>
      <title>Re: how to tune ulimit on my server ?</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/how-to-tune-ulimit-on-my-server/m-p/72066#M844</link>
      <description>&lt;P&gt;Amazing detective work.&lt;/P&gt;</description>
      <pubDate>Thu, 06 Sep 2012 22:55:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/how-to-tune-ulimit-on-my-server/m-p/72066#M844</guid>
      <dc:creator>jrodman</dc:creator>
      <dc:date>2012-09-06T22:55:03Z</dc:date>
    </item>
    <item>
      <title>Re: how to tune ulimit on my server ?</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/how-to-tune-ulimit-on-my-server/m-p/72067#M845</link>
      <description>&lt;P&gt;Any tips on tuning the deployment server settings to reduce impact to performance in scenarios where an independent deployment server is not possible?  I am asking specifically in this context as I am already familiar with settings for deployment server.  I'm specifically curious about settings that will reduce issues that we get related to ulimit settings.  Thanks for any tips!&lt;/P&gt;</description>
      <pubDate>Fri, 29 Mar 2013 13:09:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/how-to-tune-ulimit-on-my-server/m-p/72067#M845</guid>
      <dc:creator>sloshburch</dc:creator>
      <dc:date>2013-03-29T13:09:03Z</dc:date>
    </item>
    <item>
      <title>Re: how to tune ulimit on my server ?</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/how-to-tune-ulimit-on-my-server/m-p/72068#M846</link>
      <description>&lt;P&gt;deployment server has no link with this particular file descriptor issue.&lt;BR /&gt;
ulimit is a system setting not a splunk setting.&lt;/P&gt;</description>
      <pubDate>Fri, 29 Mar 2013 15:16:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/how-to-tune-ulimit-on-my-server/m-p/72068#M846</guid>
      <dc:creator>yannK</dc:creator>
      <dc:date>2013-03-29T15:16:56Z</dc:date>
    </item>
    <item>
      <title>Re: how to tune ulimit on my server ?</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/how-to-tune-ulimit-on-my-server/m-p/72069#M847</link>
      <description>&lt;P&gt;here is the recommendation&lt;BR /&gt;
&lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/Installation/Systemrequirements#Considerations_regarding_File_Descriptors"&gt;http://docs.splunk.com/Documentation/Splunk/latest/Installation/Systemrequirements#Considerations_regarding_File_Descriptors&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 25 Apr 2013 00:36:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/how-to-tune-ulimit-on-my-server/m-p/72069#M847</guid>
      <dc:creator>yannK</dc:creator>
      <dc:date>2013-04-25T00:36:25Z</dc:date>
    </item>
    <item>
      <title>Re: how to tune ulimit on my server ?</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/how-to-tune-ulimit-on-my-server/m-p/72070#M848</link>
      <description>&lt;P&gt;and the official troubleshooting method&lt;BR /&gt;
&lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/Troubleshooting/ulimitErrors"&gt;http://docs.splunk.com/Documentation/Splunk/latest/Troubleshooting/ulimitErrors&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Jan 2014 23:16:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/how-to-tune-ulimit-on-my-server/m-p/72070#M848</guid>
      <dc:creator>yannK</dc:creator>
      <dc:date>2014-01-23T23:16:27Z</dc:date>
    </item>
    <item>
      <title>Re: how to tune ulimit on my server ?</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/how-to-tune-ulimit-on-my-server/m-p/72071#M849</link>
      <description>&lt;P&gt;Re-load the new setting either by restarting the box or else issue command&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;/sbin/sysctl -p 
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 26 Aug 2014 18:10:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/how-to-tune-ulimit-on-my-server/m-p/72071#M849</guid>
      <dc:creator>rbal_splunk</dc:creator>
      <dc:date>2014-08-26T18:10:59Z</dc:date>
    </item>
    <item>
      <title>Re: how to tune ulimit on my server ?</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/how-to-tune-ulimit-on-my-server/m-p/72072#M850</link>
      <description>&lt;P&gt;In my experience with AWS deployments, I found the need to change the settings within /etc/security/limits.d&lt;BR /&gt;
if I changed only the values in the limits.conf from /etc/security/ it gets overridden by limits.d contents.&lt;/P&gt;

&lt;P&gt;make sure to check if any pre- determined limits were not set by AWS in limits.d&lt;/P&gt;

&lt;P&gt;Hope it helps,&lt;/P&gt;</description>
      <pubDate>Mon, 11 Apr 2016 00:06:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/how-to-tune-ulimit-on-my-server/m-p/72072#M850</guid>
      <dc:creator>ccruz_splunk</dc:creator>
      <dc:date>2016-04-11T00:06:39Z</dc:date>
    </item>
    <item>
      <title>Re: how to tune ulimit on my server ?</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/how-to-tune-ulimit-on-my-server/m-p/72073#M851</link>
      <description>&lt;P&gt;I do not have the limits.conf file at the location /etc/security/limits.conf, how should I proceed?&lt;/P&gt;

&lt;P&gt;When I run the command,&lt;/P&gt;

&lt;P&gt;splunkuser               hard   nofile          20240&lt;/P&gt;

&lt;P&gt;It says, its not a valid command.&lt;/P&gt;

&lt;P&gt;Sorry, if this is an invalid question. I am new to this. Please help.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Sep 2016 22:57:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/how-to-tune-ulimit-on-my-server/m-p/72073#M851</guid>
      <dc:creator>ppanchal</dc:creator>
      <dc:date>2016-09-07T22:57:51Z</dc:date>
    </item>
    <item>
      <title>Re: how to tune ulimit on my server ?</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/how-to-tune-ulimit-on-my-server/m-p/72074#M852</link>
      <description>&lt;P&gt;/!\ please read carefuly /!\ &lt;/P&gt;

&lt;BLOCKQUOTE&gt;
&lt;P&gt;temporary with a simple ulimit -n 10240 (this will not survive a server restart)&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;So use ulimit -n 20240 ! &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Dec 2016 16:27:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/how-to-tune-ulimit-on-my-server/m-p/72074#M852</guid>
      <dc:creator>vince2010091</dc:creator>
      <dc:date>2016-12-19T16:27:55Z</dc:date>
    </item>
    <item>
      <title>Re: how to tune ulimit on my server ?</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/how-to-tune-ulimit-on-my-server/m-p/72075#M853</link>
      <description>&lt;P&gt;persistently edit users limits (on AIX and ubuntu) in /etc/security/limits.conf&lt;BR /&gt;
( Hard limits are maintained by the kernel while the soft limits are enforced by the shell, here we use the soft &amp;lt; hard)&lt;/P&gt;

&lt;P&gt;splunkuser               hard   nofile          20240&lt;BR /&gt;
splunkuser               soft    nofile          10240&lt;/P&gt;

&lt;P&gt;is not working after server reboot &lt;/P&gt;</description>
      <pubDate>Tue, 09 Jan 2018 00:58:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/how-to-tune-ulimit-on-my-server/m-p/72075#M853</guid>
      <dc:creator>nawazns5038</dc:creator>
      <dc:date>2018-01-09T00:58:16Z</dc:date>
    </item>
    <item>
      <title>Re: how to tune ulimit on my server ?</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/how-to-tune-ulimit-on-my-server/m-p/72076#M854</link>
      <description>&lt;P&gt;This one is quite old - but still wrong - therefore the downvote.&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;sysctl -p&lt;/CODE&gt;-command load kernel settings from &lt;CODE&gt;/etc/sysctl.conf&lt;/CODE&gt;. That's different from the user-specific settings in &lt;CODE&gt;/etc/security/limits.conf&lt;/CODE&gt;, which are not read by this command. Instead one has to logoff and logon again.&lt;/P&gt;</description>
      <pubDate>Sun, 29 Mar 2020 17:16:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/how-to-tune-ulimit-on-my-server/m-p/72076#M854</guid>
      <dc:creator>rvany</dc:creator>
      <dc:date>2020-03-29T17:16:29Z</dc:date>
    </item>
    <item>
      <title>Re: how to tune ulimit on my server ?</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/how-to-tune-ulimit-on-my-server/m-p/72077#M855</link>
      <description>&lt;P&gt;At least today - e.g. in a Red Hat 7.6 environment - wildcard settings &lt;EM&gt;are&lt;/EM&gt; used for the root user also.&lt;/P&gt;</description>
      <pubDate>Sun, 29 Mar 2020 17:27:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/how-to-tune-ulimit-on-my-server/m-p/72077#M855</guid>
      <dc:creator>rvany</dc:creator>
      <dc:date>2020-03-29T17:27:55Z</dc:date>
    </item>
  </channel>
</rss>

