<?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 Interpreting execution costs on the Job Inspector page: Query update in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Interpreting-execution-costs-on-the-Job-Inspector-page-Query/m-p/490604#M194153</link>
    <description>&lt;P&gt;Could see an old question in 2010 , but just getting confused on the timings/duration  vs execution cost&lt;/P&gt;

&lt;P&gt;I've a search which finishes in  &lt;CODE&gt;This search has completed in 87.776 seconds&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;Below is snapshot of job inspector. As per the &lt;A href="https://docs.splunk.com/Documentation/Splunk/7.3.1/Search/ViewsearchjobpropertieswiththeJobInspector"&gt;documentation&lt;/A&gt;, the &lt;CODE&gt;command.search.index&lt;/CODE&gt; (which took &lt;CODE&gt;102.39&lt;/CODE&gt;) tells how long it took to look into the .TSIDX files for the location to read in the raw data. I assume this is in seconds?&lt;/P&gt;

&lt;P&gt;So the confusion is, the entire search has taken only 87.776 seconds, but a component took more than that? Different components are much higher than the total duration. (NOTE this is a SHC &amp;amp; IDX cluster environment). Do we need to divide the duration (seconds) value with the cluster SHC count to get the real value in seconds?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Duration (seconds)      Component   Invocations Input count Output count
    0.96     command.eval   960 14,440  14,440
    0.10     command.fields 240 3,606   3,606
    0.48     command.pretransaction 478 10,818  10,818
    0.00     command.rename 1   -   -
    275.92   command.search 718 7,361   11,100
    102.39   command.search.index   326 -   -
    24.10    command.search.filter  435 -   -
    4.37     command.search.fieldalias  195 737,809 737,809
    3.88     command.search.calcfields  195 737,809 737,809
    1.66     command.search.expand_search   1   -   -
    0.00     command.search.index.usec_1_8  83,018,230  -   -
    0.00     command.search.index.usec_512_4096 1   -   -
    0.00     command.search.index.usec_64_512   14  -   -
    0.00     command.search.index.usec_8_64 125,952 -   -
         .........  
        ..........
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;There are more entries to this. &lt;/P&gt;</description>
    <pubDate>Fri, 27 Sep 2019 09:45:18 GMT</pubDate>
    <dc:creator>koshyk</dc:creator>
    <dc:date>2019-09-27T09:45:18Z</dc:date>
    <item>
      <title>Interpreting execution costs on the Job Inspector page: Query update</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Interpreting-execution-costs-on-the-Job-Inspector-page-Query/m-p/490604#M194153</link>
      <description>&lt;P&gt;Could see an old question in 2010 , but just getting confused on the timings/duration  vs execution cost&lt;/P&gt;

&lt;P&gt;I've a search which finishes in  &lt;CODE&gt;This search has completed in 87.776 seconds&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;Below is snapshot of job inspector. As per the &lt;A href="https://docs.splunk.com/Documentation/Splunk/7.3.1/Search/ViewsearchjobpropertieswiththeJobInspector"&gt;documentation&lt;/A&gt;, the &lt;CODE&gt;command.search.index&lt;/CODE&gt; (which took &lt;CODE&gt;102.39&lt;/CODE&gt;) tells how long it took to look into the .TSIDX files for the location to read in the raw data. I assume this is in seconds?&lt;/P&gt;

&lt;P&gt;So the confusion is, the entire search has taken only 87.776 seconds, but a component took more than that? Different components are much higher than the total duration. (NOTE this is a SHC &amp;amp; IDX cluster environment). Do we need to divide the duration (seconds) value with the cluster SHC count to get the real value in seconds?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Duration (seconds)      Component   Invocations Input count Output count
    0.96     command.eval   960 14,440  14,440
    0.10     command.fields 240 3,606   3,606
    0.48     command.pretransaction 478 10,818  10,818
    0.00     command.rename 1   -   -
    275.92   command.search 718 7,361   11,100
    102.39   command.search.index   326 -   -
    24.10    command.search.filter  435 -   -
    4.37     command.search.fieldalias  195 737,809 737,809
    3.88     command.search.calcfields  195 737,809 737,809
    1.66     command.search.expand_search   1   -   -
    0.00     command.search.index.usec_1_8  83,018,230  -   -
    0.00     command.search.index.usec_512_4096 1   -   -
    0.00     command.search.index.usec_64_512   14  -   -
    0.00     command.search.index.usec_8_64 125,952 -   -
         .........  
        ..........
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;There are more entries to this. &lt;/P&gt;</description>
      <pubDate>Fri, 27 Sep 2019 09:45:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Interpreting-execution-costs-on-the-Job-Inspector-page-Query/m-p/490604#M194153</guid>
      <dc:creator>koshyk</dc:creator>
      <dc:date>2019-09-27T09:45:18Z</dc:date>
    </item>
    <item>
      <title>Re: Interpreting execution costs on the Job Inspector page: Query update</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Interpreting-execution-costs-on-the-Job-Inspector-page-Query/m-p/490605#M194154</link>
      <description>&lt;P&gt;You've got a couple different times in play here.&lt;/P&gt;

&lt;P&gt;The &lt;CODE&gt;87.776 seconds&lt;/CODE&gt; is total elapsed &lt;STRONG&gt;human&lt;/STRONG&gt; time (ie, form when it started searching towhen it completed, was just under a miunte and a half on the wall clock - you experienced less than 90 seconds for it to run).&lt;/P&gt;

&lt;P&gt;The other times are total elapsed &lt;STRONG&gt;system&lt;/STRONG&gt; time - across all Search Heads, Indexers, etc.&lt;/P&gt;

&lt;P&gt;Splunk's summing the runtimes of every server involved for those values (eg the &lt;CODE&gt;275.92&lt;/CODE&gt; &amp;amp; &lt;CODE&gt;102.39&lt;/CODE&gt; seconds) so that you can see how hard your search &lt;EM&gt;actually&lt;/EM&gt; worked behind the scenes to get you a sub-90-second perceived (ie, real-world) run time.&lt;/P&gt;

&lt;P&gt;Another way to think about it: if you had an all-in-one Splunk instance that could handle the workload, this search would've taken a few minutes to complete.&lt;/P&gt;

&lt;P&gt;This is a good way to analyze a few things (at least):&lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;Splunk's horizontal scalability (ie, how more Indexers cut &lt;EM&gt;perceived&lt;/EM&gt; run time)&lt;/LI&gt;
&lt;LI&gt;How much data you're &lt;EM&gt;really&lt;/EM&gt; looking at to get your results&lt;/LI&gt;
&lt;LI&gt;What part(s) of the search are least time-efficient&lt;/LI&gt;
&lt;LI&gt;&lt;EM&gt;Perhaps&lt;/EM&gt; where you can look to improve your search's performance&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;From personal experience, I can say that you can see (on a large enough search) the difference in doing something like &lt;CODE&gt;index=ndx field1=value1 field2=value3&lt;/CODE&gt; and &lt;CODE&gt;index=ndx sourcetype=srctp field1=value1 field2=value2&lt;/CODE&gt;. &lt;/P&gt;

&lt;P&gt;The first form tries to look in &lt;EM&gt;all&lt;/EM&gt; sourcetypes you have access to (even if there's only 1 sourcetype in the index) in &lt;CODE&gt;index=ndx&lt;/CODE&gt; for &lt;EM&gt;all&lt;/EM&gt; the fields you've asked for. First time I started investigating this for myself, I saw searches trying to look for &lt;CODE&gt;field=value1 field2=value2&lt;/CODE&gt; in over &lt;STRONG&gt;&lt;EM&gt;200 sourcetypes&lt;/EM&gt;&lt;/STRONG&gt;!&lt;/P&gt;

&lt;P&gt;&lt;EM&gt;Maybe&lt;/EM&gt; that's what you meant. But if you know which sourcetype(s) you want to look at, you're going to be able to accelerate your searches by limiting your search to &lt;EM&gt;just&lt;/EM&gt; the sourcetype(s) you care about.&lt;/P&gt;</description>
      <pubDate>Fri, 27 Sep 2019 15:10:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Interpreting-execution-costs-on-the-Job-Inspector-page-Query/m-p/490605#M194154</guid>
      <dc:creator>wmyersas</dc:creator>
      <dc:date>2019-09-27T15:10:24Z</dc:date>
    </item>
  </channel>
</rss>

