<?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: max concurrent rt searches in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/max-concurrent-rt-searches/m-p/379118#M172283</link>
    <description>&lt;P&gt;Thank you.&lt;BR /&gt;
If I would like to have the possibility still to execute the ad-hoc searches with the SPL, but forbid the rt-alerts / reports, then the only thing to change would be the:&lt;/P&gt;

&lt;P&gt;schedule_rtsearch = disabled&lt;/P&gt;

&lt;P&gt;Is it right?&lt;/P&gt;</description>
    <pubDate>Tue, 26 Mar 2019 15:00:53 GMT</pubDate>
    <dc:creator>damucka</dc:creator>
    <dc:date>2019-03-26T15:00:53Z</dc:date>
    <item>
      <title>max concurrent rt searches</title>
      <link>https://community.splunk.com/t5/Splunk-Search/max-concurrent-rt-searches/m-p/379104#M172269</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;I have an issue with extending the number of the concurrent rt searches. I can see constant amount of 36 RT searches being executed on the system. It happens also that when I try to execute my search, the get queued.&lt;/P&gt;

&lt;P&gt;I have the following parameters active on the search head:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;max_searches_per_cpu = 40
base_max_searches = 10
max_searches_perc = 77
max_rt_search_multiplier = 1
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;So, based on the formulas, the derived number of the rt searches would be:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;max_hist_searches =40 x 8 + 10 = 330
max_rt_searches = max_rt_search_multiplier x max_hist_searches = 1 x 330 = 330
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;... but on the chart, there are only 36 concurrent rt searches visible, so I guess this must be a limit set somewhere there.&lt;/P&gt;

&lt;P&gt;And I assume we are hitting this limit and that is why my searches go into the status "queued" very often.&lt;/P&gt;

&lt;P&gt;Could you please advise?&lt;/P&gt;

&lt;P&gt;Kind Regards,&lt;/P&gt;

&lt;P&gt;Kamil&lt;/P&gt;</description>
      <pubDate>Mon, 25 Mar 2019 10:53:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/max-concurrent-rt-searches/m-p/379104#M172269</guid>
      <dc:creator>damucka</dc:creator>
      <dc:date>2019-03-25T10:53:05Z</dc:date>
    </item>
    <item>
      <title>Re: max concurrent rt searches</title>
      <link>https://community.splunk.com/t5/Splunk-Search/max-concurrent-rt-searches/m-p/379105#M172270</link>
      <description>&lt;P&gt;Just checking that's not a typo?&lt;BR /&gt;
max_searches_per_cpu should be 1, and you should not really have changed this - certainly not to 40!&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 23:51:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/max-concurrent-rt-searches/m-p/379105#M172270</guid>
      <dc:creator>nickhills</dc:creator>
      <dc:date>2020-09-29T23:51:29Z</dc:date>
    </item>
    <item>
      <title>Re: max concurrent rt searches</title>
      <link>https://community.splunk.com/t5/Splunk-Search/max-concurrent-rt-searches/m-p/379106#M172271</link>
      <description>&lt;P&gt;sorry, forgot to attach the picture. Basically it shows around 180 - 200 historical searches and 36 - 39 rt searches constantly throughout the last 7 days.&lt;/P&gt;

&lt;P&gt;What now comes to my mind is:&lt;BR /&gt;
- what would fit from the math point of view would be if the &lt;/P&gt;

&lt;P&gt;max_rt_searches + max_hist_searches &amp;lt;= max_searches_per_cpu x max_searches_perc&lt;/P&gt;

&lt;P&gt;is it so?&lt;BR /&gt;
What I mean is that both rt and historical searches together cannot be higher than the max_searches_per_cpu times max_searches_perc. Only then it would kind of match.&lt;/P&gt;

&lt;P&gt;Kind Regards,&lt;BR /&gt;
Kamil&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 23:51:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/max-concurrent-rt-searches/m-p/379106#M172271</guid>
      <dc:creator>damucka</dc:creator>
      <dc:date>2020-09-29T23:51:32Z</dc:date>
    </item>
    <item>
      <title>Re: max concurrent rt searches</title>
      <link>https://community.splunk.com/t5/Splunk-Search/max-concurrent-rt-searches/m-p/379107#M172272</link>
      <description>&lt;P&gt;Firstly, are you sure you really need RT searches?&lt;BR /&gt;
Before you answer that, read this: &lt;A href="https://answers.splunk.com/answers/734767/why-are-realtime-searches-disliked-in-the-splunk-w.html"&gt;https://answers.splunk.com/answers/734767/why-are-realtime-searches-disliked-in-the-splunk-w.html&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;The number of searches you can do (regardless of what you set in limits.conf) is limited by the processors in your deployment - that is even more true with RT searching, which consumes one core PER SEARCH. (on SH and Indexers) &lt;BR /&gt;
Without digging into your config yet, if you really need more RT searches available, you are going to need more cores on all your Search heads and Indexers.&lt;/P&gt;

&lt;P&gt;With reference to the above doc, you may want to consider if you can instead 'make do' with historic searches (which often give exactly the same/if not better results) with a far more efficient use of resources.&lt;/P&gt;</description>
      <pubDate>Mon, 25 Mar 2019 11:09:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/max-concurrent-rt-searches/m-p/379107#M172272</guid>
      <dc:creator>nickhills</dc:creator>
      <dc:date>2019-03-25T11:09:57Z</dc:date>
    </item>
    <item>
      <title>Re: max concurrent rt searches</title>
      <link>https://community.splunk.com/t5/Splunk-Search/max-concurrent-rt-searches/m-p/379108#M172273</link>
      <description>&lt;P&gt;I would like to pin point here is that &lt;CODE&gt;max_searches_per_cpu = 40&lt;/CODE&gt; is very bad for production environment. To run more searches simply increasing &lt;CODE&gt;max_searches_per_cpu&lt;/CODE&gt; won't help, it will reduce your search performance a lot.&lt;/P&gt;</description>
      <pubDate>Mon, 25 Mar 2019 13:45:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/max-concurrent-rt-searches/m-p/379108#M172273</guid>
      <dc:creator>harsmarvania57</dc:creator>
      <dc:date>2019-03-25T13:45:15Z</dc:date>
    </item>
    <item>
      <title>Re: max concurrent rt searches</title>
      <link>https://community.splunk.com/t5/Splunk-Search/max-concurrent-rt-searches/m-p/379109#M172274</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/163905"&gt;@harsmarvania57&lt;/a&gt; &lt;/P&gt;

&lt;P&gt;Thank you.&lt;BR /&gt;
How would I deal with the situation, when I still have free CPU capacity, let us say 50 - 70% idle and want to get more jobs / alerts processed in parallel?&lt;BR /&gt;
I understand the overcommitment should be avoided, but when I define the max_searches_per_cpu = 1 as recommended, then only around 30 in parallel are possible and at the moment we have demand of up to 200. For me the situation is quite "easy":&lt;BR /&gt;
- if I have free resources, I try to parallelize more.&lt;/P&gt;

&lt;P&gt;Kind Regards,&lt;BR /&gt;
Kamil&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 23:51:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/max-concurrent-rt-searches/m-p/379109#M172274</guid>
      <dc:creator>damucka</dc:creator>
      <dc:date>2020-09-29T23:51:43Z</dc:date>
    </item>
    <item>
      <title>Re: max concurrent rt searches</title>
      <link>https://community.splunk.com/t5/Splunk-Search/max-concurrent-rt-searches/m-p/379110#M172275</link>
      <description>&lt;P&gt;As you are saying that 50-70% idle, have you checked CPU utilization when splunk is complaining about number of searches reached to maximum limit or during peak time (Like midnight because I have seen that many daily reports run at midnight in many organizations)? To fulfill the demand I would recommend to add more CPU or add more hardware. If I want to increase &lt;CODE&gt;max_searches_per_cpu&lt;/CODE&gt; from 1 to 2 then  I'll do in very rare scenario because I have seen that when you increase &lt;CODE&gt;max_searches_per_cpu&lt;/CODE&gt;, more number of jobs will run but job completion time will increase for each job.&lt;/P&gt;</description>
      <pubDate>Mon, 25 Mar 2019 14:25:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/max-concurrent-rt-searches/m-p/379110#M172275</guid>
      <dc:creator>harsmarvania57</dc:creator>
      <dc:date>2019-03-25T14:25:17Z</dc:date>
    </item>
    <item>
      <title>Re: max concurrent rt searches</title>
      <link>https://community.splunk.com/t5/Splunk-Search/max-concurrent-rt-searches/m-p/379111#M172276</link>
      <description>&lt;P&gt;The amount of 'work' a core is doing (i.e how much of the processor is commited at any point of time) is not a direct indication of how 'limited' your deployment is with regard to rt capacity.&lt;/P&gt;

&lt;P&gt;Because real-time searching can be an intensive process, when a user dispatches a rt search a core is dedicated for that search, and it remains allocated to that search until the job completes (which is never for scheduled searches, or for as long as the duration the user (or dashboard) keeps the search running).&lt;/P&gt;

&lt;P&gt;This essentially means if you have 4 cores, you're not going to be able to run more than 4 rt searches (although in practice, Splunk/OS needs some of that proc time so it will be less) &lt;/P&gt;

&lt;P&gt;If you overcommit the max_searches, it won't change how many rt searches can occur at once, but it will impact your other searches, because now each of the cores not assigned to a rt search are going to be heavily oversubscribed- Increasing this from 1 to 40 means you can run 40 jobs per core at once, but each job will take 40 times as long.&lt;/P&gt;

&lt;P&gt;If you are seeing 30-36 concurrent rt searches I am guessing you must have quite a few cores in your SH - you may even see this count reach higher than your 'real' core count, but that will just be an artifact of the way Splunk is reporting the current concurrency. &lt;/P&gt;

&lt;P&gt;I think you are suggesting that you seem limited to 36 rt searches, but that the overall processor use on your 32(???) cores is low?&lt;BR /&gt;
This is the trade off for rt  searching, it's a very inefficient use of your processor, and if at all possible (for all the reasons in the post I linked from @woodcock below) you should try to avoid it.&lt;/P&gt;

&lt;P&gt;In short, if you need 200 rt searches at once, you need 200 cores.&lt;/P&gt;</description>
      <pubDate>Mon, 25 Mar 2019 14:31:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/max-concurrent-rt-searches/m-p/379111#M172276</guid>
      <dc:creator>nickhills</dc:creator>
      <dc:date>2019-03-25T14:31:01Z</dc:date>
    </item>
    <item>
      <title>Re: max concurrent rt searches</title>
      <link>https://community.splunk.com/t5/Splunk-Search/max-concurrent-rt-searches/m-p/379112#M172277</link>
      <description>&lt;P&gt;Absolutely, try to shift towards near real time searches.&lt;/P&gt;</description>
      <pubDate>Mon, 25 Mar 2019 21:33:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/max-concurrent-rt-searches/m-p/379112#M172277</guid>
      <dc:creator>ddrillic</dc:creator>
      <dc:date>2019-03-25T21:33:48Z</dc:date>
    </item>
    <item>
      <title>Re: max concurrent rt searches</title>
      <link>https://community.splunk.com/t5/Splunk-Search/max-concurrent-rt-searches/m-p/379113#M172278</link>
      <description>&lt;P&gt;Thank you. You convinced me :-).&lt;/P&gt;

&lt;P&gt;I am going to:&lt;BR /&gt;
- lower the max_searches from 40 to 4&lt;BR /&gt;
- try to increase the #CPUs from 8 to 12&lt;BR /&gt;
- persuade the project colleagues to turn the RT Alerts into the scheduled ones.&lt;BR /&gt;
  At the moment I am using the following search to identify them:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| rest /services/search/jobs | search isRealTimeSearch=1 | table label, author, dispatchState,  eai:acl.owner, label, isRealTimeSearch, performance.dispatch.stream.local.duration_secs, runDuration, searchProviders, splunk_server, title
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;At the moment the above search returns 8 lines, which I guess correspond to the 8 RT alerts we have in the system. The 36 RT searches I was referring to before come from the following:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_internal sourcetype=splunkd source=*metrics.log group=search_concurrency "system total" 
         | timechart span=1m max(active_hist_searches) as "Historical Searches" max(active_realtime_searches) as "Real-time Searches"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;.. which actually delivers the max per minute. So the correct number of active searches is actually 8, which is still to high for 8 CPU SH.&lt;/P&gt;

&lt;P&gt;@ddrillic:&lt;BR /&gt;
forgive my ignorance, what do you mean by "near real time searches"?&lt;BR /&gt;
Would that be e.g. an rt-alert turned into the scheduled one with the 1 minute schedule? &lt;/P&gt;

&lt;P&gt;Kind Regards,&lt;BR /&gt;
Kamil&lt;/P&gt;</description>
      <pubDate>Tue, 26 Mar 2019 09:07:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/max-concurrent-rt-searches/m-p/379113#M172278</guid>
      <dc:creator>damucka</dc:creator>
      <dc:date>2019-03-26T09:07:57Z</dc:date>
    </item>
    <item>
      <title>Re: max concurrent rt searches</title>
      <link>https://community.splunk.com/t5/Splunk-Search/max-concurrent-rt-searches/m-p/379114#M172279</link>
      <description>&lt;P&gt;Hi Kamil, that sounds very sensible.&lt;BR /&gt;
Yes - @ddrillic means repeating a search every few minutes over a time range of the same period.&lt;BR /&gt;
Like adding &lt;CODE&gt;search ... earliest=-6m@m latest=-1m@m&lt;/CODE&gt; and scheduling that to run every 5 mins.&lt;BR /&gt;
(shorten or lengthen those times to fit your needs)&lt;/P&gt;</description>
      <pubDate>Tue, 26 Mar 2019 10:14:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/max-concurrent-rt-searches/m-p/379114#M172279</guid>
      <dc:creator>nickhills</dc:creator>
      <dc:date>2019-03-26T10:14:15Z</dc:date>
    </item>
    <item>
      <title>Re: max concurrent rt searches</title>
      <link>https://community.splunk.com/t5/Splunk-Search/max-concurrent-rt-searches/m-p/379115#M172280</link>
      <description>&lt;P&gt;Right - that's the idea ; -)&lt;/P&gt;</description>
      <pubDate>Tue, 26 Mar 2019 10:55:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/max-concurrent-rt-searches/m-p/379115#M172280</guid>
      <dc:creator>ddrillic</dc:creator>
      <dc:date>2019-03-26T10:55:49Z</dc:date>
    </item>
    <item>
      <title>Re: max concurrent rt searches</title>
      <link>https://community.splunk.com/t5/Splunk-Search/max-concurrent-rt-searches/m-p/379116#M172281</link>
      <description>&lt;P&gt;Thank you, this was really helpful.&lt;BR /&gt;
There is one more rt alert left in the system, I am chasing the end user to change it :-).&lt;/P&gt;

&lt;P&gt;One last question:&lt;BR /&gt;
- As it seems that the worst thing that can happen are the rt alerts, I would like to take the corresponding authorizations to create them away from the end users.&lt;BR /&gt;
Could you tell me what would be the corresponding role?&lt;/P&gt;

&lt;P&gt;Kind Regards,&lt;BR /&gt;
Kamil&lt;/P&gt;</description>
      <pubDate>Tue, 26 Mar 2019 11:01:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/max-concurrent-rt-searches/m-p/379116#M172281</guid>
      <dc:creator>damucka</dc:creator>
      <dc:date>2019-03-26T11:01:32Z</dc:date>
    </item>
    <item>
      <title>Re: max concurrent rt searches</title>
      <link>https://community.splunk.com/t5/Splunk-Search/max-concurrent-rt-searches/m-p/379117#M172282</link>
      <description>&lt;P&gt;if you remove the rtsearch and schedule_rtsearch caperbility users will not be able to run those types of searches. &lt;BR /&gt;
If you want to change the config directly you can use @woodcock's suggestion:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[default]
 # &lt;A href="https://answers.splunk.com/answers/734767/why-does-everybody-hate-realtime-searches-what-is.html" target="test_blank"&gt;https://answers.splunk.com/answers/734767/why-does-everybody-hate-realtime-searches-what-is.html&lt;/A&gt;
 # Kill all ability to do realtime (rt) searches because each one
 # permanently locks 1 CPU core on Search Head and EACH Indexer!
 # Also set this for EVERY existing role.
 rtsearch = disabled
 schedule_rtsearch = disabled
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 26 Mar 2019 11:07:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/max-concurrent-rt-searches/m-p/379117#M172282</guid>
      <dc:creator>nickhills</dc:creator>
      <dc:date>2019-03-26T11:07:49Z</dc:date>
    </item>
    <item>
      <title>Re: max concurrent rt searches</title>
      <link>https://community.splunk.com/t5/Splunk-Search/max-concurrent-rt-searches/m-p/379118#M172283</link>
      <description>&lt;P&gt;Thank you.&lt;BR /&gt;
If I would like to have the possibility still to execute the ad-hoc searches with the SPL, but forbid the rt-alerts / reports, then the only thing to change would be the:&lt;/P&gt;

&lt;P&gt;schedule_rtsearch = disabled&lt;/P&gt;

&lt;P&gt;Is it right?&lt;/P&gt;</description>
      <pubDate>Tue, 26 Mar 2019 15:00:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/max-concurrent-rt-searches/m-p/379118#M172283</guid>
      <dc:creator>damucka</dc:creator>
      <dc:date>2019-03-26T15:00:53Z</dc:date>
    </item>
    <item>
      <title>Re: max concurrent rt searches</title>
      <link>https://community.splunk.com/t5/Splunk-Search/max-concurrent-rt-searches/m-p/379119#M172284</link>
      <description>&lt;P&gt;Yes, but you need to do that for every role - you might want to leave it for admin though - that way admins can still schedule them if they are ever absolutely necessary.&lt;/P&gt;</description>
      <pubDate>Tue, 26 Mar 2019 15:26:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/max-concurrent-rt-searches/m-p/379119#M172284</guid>
      <dc:creator>nickhills</dc:creator>
      <dc:date>2019-03-26T15:26:49Z</dc:date>
    </item>
    <item>
      <title>Re: max concurrent rt searches</title>
      <link>https://community.splunk.com/t5/Splunk-Search/max-concurrent-rt-searches/m-p/379120#M172285</link>
      <description>&lt;P&gt;Thank you, it was very helpful for me.&lt;BR /&gt;
Today the SH became responsive again ...&lt;/P&gt;

&lt;P&gt;Kind Regards,&lt;BR /&gt;
Kamil&lt;/P&gt;</description>
      <pubDate>Wed, 27 Mar 2019 10:10:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/max-concurrent-rt-searches/m-p/379120#M172285</guid>
      <dc:creator>damucka</dc:creator>
      <dc:date>2019-03-27T10:10:17Z</dc:date>
    </item>
  </channel>
</rss>

