<?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 Reduce time spent in regexreplacement queue? in All Apps and Add-ons</title>
    <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Reduce-time-spent-in-regexreplacement-queue/m-p/23613#M648</link>
    <description>&lt;P&gt;I have a situation where my Splunk feed is coming in all via syslog, sourcetyped as syslog, yet containing many different kinds of data. I've set up index-time TRANSFORMS in my props.conf to split out these various events to have new sourcetypes, and then sending those sourcetypes to an appropriate index.&lt;/P&gt;

&lt;P&gt;Then I look at my indexing metrics in Splunk on Splunk. I see that the indexer queue is taking approx. 20% CPU time, but the regexreplacementqueue is at nearly 25%! (Note that this is a 24-CPU system--is the percentage 25% of one CPU, or 25% of the total available processing power?)&lt;/P&gt;

&lt;P&gt;Does this (relatively) high use of CPU time in the regexreplacement queue suggest that my regexes are inefficient? Are there suggestions to keeping this processing queue a little less busy?&lt;/P&gt;</description>
    <pubDate>Thu, 07 Feb 2013 18:31:16 GMT</pubDate>
    <dc:creator>sowings</dc:creator>
    <dc:date>2013-02-07T18:31:16Z</dc:date>
    <item>
      <title>Reduce time spent in regexreplacement queue?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Reduce-time-spent-in-regexreplacement-queue/m-p/23613#M648</link>
      <description>&lt;P&gt;I have a situation where my Splunk feed is coming in all via syslog, sourcetyped as syslog, yet containing many different kinds of data. I've set up index-time TRANSFORMS in my props.conf to split out these various events to have new sourcetypes, and then sending those sourcetypes to an appropriate index.&lt;/P&gt;

&lt;P&gt;Then I look at my indexing metrics in Splunk on Splunk. I see that the indexer queue is taking approx. 20% CPU time, but the regexreplacementqueue is at nearly 25%! (Note that this is a 24-CPU system--is the percentage 25% of one CPU, or 25% of the total available processing power?)&lt;/P&gt;

&lt;P&gt;Does this (relatively) high use of CPU time in the regexreplacement queue suggest that my regexes are inefficient? Are there suggestions to keeping this processing queue a little less busy?&lt;/P&gt;</description>
      <pubDate>Thu, 07 Feb 2013 18:31:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Reduce-time-spent-in-regexreplacement-queue/m-p/23613#M648</guid>
      <dc:creator>sowings</dc:creator>
      <dc:date>2013-02-07T18:31:16Z</dc:date>
    </item>
    <item>
      <title>Re: Reduce time spent in regexreplacement queue?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Reduce-time-spent-in-regexreplacement-queue/m-p/23614#M649</link>
      <description>&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;EM&gt;Is the percentage 25% of one CPU, or 25% of the total available processing power?&lt;/EM&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;That percentage represent the approximate usage of &lt;STRONG&gt;one&lt;/STRONG&gt; CPU core.&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;EM&gt;Does this (relatively) high use of CPU time in the regexreplacement queue suggest that my regexes are inefficient?&lt;/EM&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;Possibly, that does seem to be on the high side for the regexreplacement processor. That being said, what really matters is:&lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;Is the regexreplacement processor being a bottleneck? This is true if the typing queue fills up and remains saturated while the indexing queue is starved or near empty.&lt;/LI&gt;
&lt;LI&gt;What is the proportion of the CPU usage of the indexer processor vs. the regexreplacement processor? In your situation, it seems that indexer processor is using &lt;STRONG&gt;less&lt;/STRONG&gt; CPU power than regexreplacement, which is indeed a bit imbalanced.&lt;/LI&gt;
&lt;/UL&gt;

&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;EM&gt;Are there suggestions to keeping this processing queue a little less busy?&lt;/EM&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;Yes, but they are not always trivial to implement:&lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;Reduce the number of index-time transformations using regular expressions&lt;/LI&gt;
&lt;LI&gt;Avoid regular expressions in index-time transformations that operate against _raw&lt;/LI&gt;
&lt;LI&gt;Optimize your regular expressions in index-time transformations to run faster. Anchoring can sometimes do wonders to prevent unnecessary back-tracking.&lt;/LI&gt;
&lt;/UL&gt;</description>
      <pubDate>Fri, 08 Feb 2013 01:02:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Reduce-time-spent-in-regexreplacement-queue/m-p/23614#M649</guid>
      <dc:creator>hexx</dc:creator>
      <dc:date>2013-02-08T01:02:05Z</dc:date>
    </item>
    <item>
      <title>Re: Reduce time spent in regexreplacement queue?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Reduce-time-spent-in-regexreplacement-queue/m-p/23615#M650</link>
      <description>&lt;P&gt;Thanks for the feedback.&lt;/P&gt;

&lt;P&gt;It doesn't appear that the regexreplacement pipeline is becoming an issue. Typing queue is not full, and not blocking earlier queues.&lt;/P&gt;

&lt;P&gt;In this instance, the regexreplacement pipeline is in fact taking more time than the indexer pipeline, but I'm going to write that off to "good IO" and maybe poor regexes. I'll see if they can be improved.&lt;/P&gt;</description>
      <pubDate>Fri, 08 Feb 2013 14:41:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Reduce-time-spent-in-regexreplacement-queue/m-p/23615#M650</guid>
      <dc:creator>sowings</dc:creator>
      <dc:date>2013-02-08T14:41:10Z</dc:date>
    </item>
  </channel>
</rss>

