<?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: Does the union command affect CPU utilization? in Monitoring Splunk</title>
    <link>https://community.splunk.com/t5/Monitoring-Splunk/Does-the-union-command-affect-CPU-utilization/m-p/367730#M3186</link>
    <description>&lt;P&gt;Do post your search to get a more detailed answer.&lt;/P&gt;

&lt;P&gt;In general, the streaming portion of searches (e.g. &lt;CODE&gt;index=foo | eval field = "bar"&lt;/CODE&gt;) will run on all indexers in parallel.&lt;BR /&gt;
The same holds true for union'd searches, e.g. &lt;CODE&gt;| union [search index=a | eval type = "foo"] [search index=b | eval mytype = "bar"]&lt;/CODE&gt; - which is the first example from the union docs at &lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/SearchReference/union"&gt;http://docs.splunk.com/Documentation/Splunk/latest/SearchReference/union&lt;/A&gt;&lt;BR /&gt;
Every indexer will run the searches in parallel, and return results to the search head.&lt;/P&gt;

&lt;P&gt;For most cases, I'd recommend using &lt;CODE&gt;OR&lt;/CODE&gt; instead of union: &lt;CODE&gt;index=foo OR index=bar | ...&lt;/CODE&gt; because you also get parallel execution on all indexers for the streaming part but don't run into limits of the union command.&lt;/P&gt;</description>
    <pubDate>Mon, 30 Apr 2018 10:08:25 GMT</pubDate>
    <dc:creator>martin_mueller</dc:creator>
    <dc:date>2018-04-30T10:08:25Z</dc:date>
    <item>
      <title>Does the union command affect CPU utilization?</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/Does-the-union-command-affect-CPU-utilization/m-p/367729#M3185</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;[architecture]&lt;BR /&gt;
One search header, several indexers, one LB forwarder&lt;/P&gt;

&lt;P&gt;[Question]&lt;BR /&gt;
* If one search statement is returned, the search starts from one indexer. (Using CPU 1 core)&lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;&lt;P&gt;When using the Union command in the search header, does the search run in one indexer? (Use CPU 1 core?)&lt;/P&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;P&gt;If not, does one search statement run on multiple indexers? (Using multiple CPUs?)&lt;/P&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;P&gt;The point is, when using the Union command, does one search statement run on multiple indexers?&lt;/P&gt;&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Mon, 30 Apr 2018 06:24:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/Does-the-union-command-affect-CPU-utilization/m-p/367729#M3185</guid>
      <dc:creator>kind7776</dc:creator>
      <dc:date>2018-04-30T06:24:28Z</dc:date>
    </item>
    <item>
      <title>Re: Does the union command affect CPU utilization?</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/Does-the-union-command-affect-CPU-utilization/m-p/367730#M3186</link>
      <description>&lt;P&gt;Do post your search to get a more detailed answer.&lt;/P&gt;

&lt;P&gt;In general, the streaming portion of searches (e.g. &lt;CODE&gt;index=foo | eval field = "bar"&lt;/CODE&gt;) will run on all indexers in parallel.&lt;BR /&gt;
The same holds true for union'd searches, e.g. &lt;CODE&gt;| union [search index=a | eval type = "foo"] [search index=b | eval mytype = "bar"]&lt;/CODE&gt; - which is the first example from the union docs at &lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/SearchReference/union"&gt;http://docs.splunk.com/Documentation/Splunk/latest/SearchReference/union&lt;/A&gt;&lt;BR /&gt;
Every indexer will run the searches in parallel, and return results to the search head.&lt;/P&gt;

&lt;P&gt;For most cases, I'd recommend using &lt;CODE&gt;OR&lt;/CODE&gt; instead of union: &lt;CODE&gt;index=foo OR index=bar | ...&lt;/CODE&gt; because you also get parallel execution on all indexers for the streaming part but don't run into limits of the union command.&lt;/P&gt;</description>
      <pubDate>Mon, 30 Apr 2018 10:08:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/Does-the-union-command-affect-CPU-utilization/m-p/367730#M3186</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2018-04-30T10:08:25Z</dc:date>
    </item>
    <item>
      <title>Re: Does the union command affect CPU utilization?</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/Does-the-union-command-affect-CPU-utilization/m-p/367731#M3187</link>
      <description>&lt;P&gt;Sorry, I seem to have confused the question.&lt;BR /&gt;
For example, using the append command, you can physically query one CPU core (one indexer)&lt;BR /&gt;
If you have multiple indexers, I wonder if you use the union command to physically search the CPU cour using several indexers (multiple indexers).&lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;I understand that append uses one cpu core, and union uses multiple cpu cores, so it is faster when using the union command.&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;I wonder if the above is true.&lt;/P&gt;</description>
      <pubDate>Thu, 03 May 2018 01:31:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/Does-the-union-command-affect-CPU-utilization/m-p/367731#M3187</guid>
      <dc:creator>kind7776</dc:creator>
      <dc:date>2018-05-03T01:31:03Z</dc:date>
    </item>
    <item>
      <title>Re: Does the union command affect CPU utilization?</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/Does-the-union-command-affect-CPU-utilization/m-p/367732#M3188</link>
      <description>&lt;P&gt;If you have spare cores, consider enabling batch mode search parallelization: &lt;A href="http://docs.splunk.com/Documentation/Splunk/7.1.0/Capacity/Parallelization#Batch_mode_search_parallelization"&gt;http://docs.splunk.com/Documentation/Splunk/7.1.0/Capacity/Parallelization#Batch_mode_search_parallelization&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;That will allow all batch mode eligible searches to search multiple non-hot buckets at once.&lt;/P&gt;

&lt;P&gt;As for &lt;CODE&gt;append&lt;/CODE&gt; vs &lt;CODE&gt;union&lt;/CODE&gt;, I'd use neither in most cases - instead &lt;CODE&gt;OR&lt;/CODE&gt; your data sets together in one big search.&lt;/P&gt;</description>
      <pubDate>Thu, 10 May 2018 19:08:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/Does-the-union-command-affect-CPU-utilization/m-p/367732#M3188</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2018-05-10T19:08:00Z</dc:date>
    </item>
  </channel>
</rss>

