<?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: SPL optimization for timechart in Splunk Enterprise</title>
    <link>https://community.splunk.com/t5/Splunk-Enterprise/SPL-optimization-for-timechart/m-p/528397#M4100</link>
    <description>&lt;P&gt;Thanks&amp;nbsp;alonsocaio for your response.&lt;/P&gt;&lt;P&gt;I have changed SPL as per your comments as below&lt;/P&gt;&lt;P&gt;host="Server1" index="performance_data" instance IN ("C:","D:","E:","F:","G:","H:") source="PerfmonMk:LogicalDisk" sourcetype="PerfmonMk:LogicalDisk"&lt;BR /&gt;| fields _time, host, instance, Avg._Disk_Queue_Length&lt;BR /&gt;| eval instance = substr(instance, 1, len(instance)-1)&lt;BR /&gt;| eval Host_Instance = 'host'."-".'instance'&lt;BR /&gt;| timechart eval(round(avg('Avg._Disk_Queue_Length'),2)) AS "Avg. Disk Queue Length" BY Host_Instance limit=0&lt;/P&gt;&lt;P&gt;But still the SPL took around 10 mins to load and the chart keeps on dancing while it loads. Even if I just fetch the events using base search and without any further command after |, still it takes significant amount of time.&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Job takes "This search has completed and has returned&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="emphatic"&gt;7&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;results by scanning&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="emphatic"&gt;9,184,627&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;events "&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Is this normal for these many count of events? The index has data for various sourcetypes and its size is 700+ GB. Could there be any problem with index or need additional IX in the cluster. Currently there are 4 indexers in cloud deployment which is managed by Splunk.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 07 Nov 2020 07:36:52 GMT</pubDate>
    <dc:creator>santosh_sshanbh</dc:creator>
    <dc:date>2020-11-07T07:36:52Z</dc:date>
    <item>
      <title>SPL optimization for timechart</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/SPL-optimization-for-timechart/m-p/528339#M4095</link>
      <description>&lt;P&gt;I have a dashboard to show disk read/write data for a server on a area chart. I have wrote below SPL for the same&amp;nbsp;&lt;/P&gt;&lt;P&gt;host="Server1" index="performance_data" instance=*: source="PerfmonMk:LogicalDisk" sourcetype="PerfmonMk:LogicalDisk"&lt;BR /&gt;| eval instance = substr(instance, 1, len(instance)-1)&lt;BR /&gt;| eval Host_Instance = 'host'."-".'instance'&lt;BR /&gt;| timechart eval(round(avg('Avg._Disk_Queue_Length'),2)) AS "Avg. Disk Queue Length" BY Host_Instance limit=0&lt;/P&gt;&lt;P&gt;When I run this SPL for a weeks time and I have the disk data collected at every 30 s interval, the dashboard takes 10-15 mins to load.&amp;nbsp;&lt;/P&gt;&lt;P&gt;My Splunk instance is in Splunk managed cloud. Still it loads very slow. Is there any issue with the SPL or I have to use some optimization technique here to improve performance?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Nov 2020 15:31:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/SPL-optimization-for-timechart/m-p/528339#M4095</guid>
      <dc:creator>santosh_sshanbh</dc:creator>
      <dc:date>2020-11-06T15:31:21Z</dc:date>
    </item>
    <item>
      <title>Re: SPL optimization for timechart</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/SPL-optimization-for-timechart/m-p/528385#M4099</link>
      <description>&lt;P&gt;HI&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/69123"&gt;@santosh_sshanbh&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;Looking at your initial search I would suggest the following to improve performance:&lt;/P&gt;&lt;P&gt;1 - Using wildcards as prefix is not that efficient (&lt;SPAN&gt;instance=*:). As exposed in the docs "the search must look at every string to determine if the end of the string matches what you specify after the asterisk" (&lt;A href="https://docs.splunk.com/Documentation/SCS/current/Search/Wildcards#Avoid_using_wildcards_as_prefixes" target="_blank"&gt;https://docs.splunk.com/Documentation/SCS/current/Search/Wildcards#Avoid_using_wildcards_as_prefixes&lt;/A&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;2 - I suggest you to use the "fields" command, so you can restrict your search to use only the fields you need on your results.&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| fields _time, host, instance, Avg._Disk_Queue_Length&lt;/LI-CODE&gt;</description>
      <pubDate>Sat, 07 Nov 2020 01:04:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/SPL-optimization-for-timechart/m-p/528385#M4099</guid>
      <dc:creator>alonsocaio</dc:creator>
      <dc:date>2020-11-07T01:04:48Z</dc:date>
    </item>
    <item>
      <title>Re: SPL optimization for timechart</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/SPL-optimization-for-timechart/m-p/528397#M4100</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;alonsocaio for your response.&lt;/P&gt;&lt;P&gt;I have changed SPL as per your comments as below&lt;/P&gt;&lt;P&gt;host="Server1" index="performance_data" instance IN ("C:","D:","E:","F:","G:","H:") source="PerfmonMk:LogicalDisk" sourcetype="PerfmonMk:LogicalDisk"&lt;BR /&gt;| fields _time, host, instance, Avg._Disk_Queue_Length&lt;BR /&gt;| eval instance = substr(instance, 1, len(instance)-1)&lt;BR /&gt;| eval Host_Instance = 'host'."-".'instance'&lt;BR /&gt;| timechart eval(round(avg('Avg._Disk_Queue_Length'),2)) AS "Avg. Disk Queue Length" BY Host_Instance limit=0&lt;/P&gt;&lt;P&gt;But still the SPL took around 10 mins to load and the chart keeps on dancing while it loads. Even if I just fetch the events using base search and without any further command after |, still it takes significant amount of time.&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Job takes "This search has completed and has returned&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="emphatic"&gt;7&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;results by scanning&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="emphatic"&gt;9,184,627&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;events "&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Is this normal for these many count of events? The index has data for various sourcetypes and its size is 700+ GB. Could there be any problem with index or need additional IX in the cluster. Currently there are 4 indexers in cloud deployment which is managed by Splunk.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 07 Nov 2020 07:36:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/SPL-optimization-for-timechart/m-p/528397#M4100</guid>
      <dc:creator>santosh_sshanbh</dc:creator>
      <dc:date>2020-11-07T07:36:52Z</dc:date>
    </item>
  </channel>
</rss>

