How many messages per second is the system attempting to handle?  I&#39;m very surprised that you&#39;re seeing that level of utilization.  In our setup we&#39;ve never had a problem pushing up through 30,000 messages per second written to disk with Syslog-NG in production, and I&#39;ve pushed more than 70,000 per second in development.  Your forked process idea seems like a good one, but I haven&#39;t seen cases where Syslog-NG is the bottleneck.<br>

<br>--Martin<br><br><div class="gmail_quote">On Thu, Mar 18, 2010 at 7:49 PM, Patrick H. <span dir="ltr">&lt;<a href="mailto:syslogng@feystorm.net">syslogng@feystorm.net</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">




  

<div bgcolor="#ffffff" text="#0050d0">
<font size="-1"><font face="Helvetica, Arial, sans-serif">We turned on
syslog-ng for our production environment today and ran into a problem
which I think the solution might also solve this one.<br>
The problem I ran into is that with full production logging on,
syslog-ng is using up about 50% of the CPU, and thats writing
everything out to /dev/null (a few hundred machines). With a single
regex turned on, it was using 90% CPU. So what I&#39;m going to end up
doing is running multiple syslog-ng processes so they can run in
parallel on separate CPU cores. This way they can process data
simultaneously. There will be a master process which basically sends
everthing with the mail facility to two other syslog-ng processes, one
of which will be parsing out data to insert into a database, and
another will be parsing out data to write to files (different regexes
for each).<br>
<br>
Now, the way this might also solve the failover issue is to make
multi-process capability part of syslog-ng. So one might end up with a
config like:<br>
<br>
</font></font><font size="-1"><tt><font color="#990000">@version: 3.0<br>
options {<br>
    use_dns(no);<br>
    log_iw_size(10000);<br>
};<br>
<br>
</font></tt></font><tt><font size="-1" color="#990000">source s_sys {<br>
    unix-stream(&#39;/dev/log&#39;);<br>
};<br>
source s_net {<br>
    tcp(ip(0.0.0.0) port(514) max-connections(1000));<br>
    udp(ip(0.0.0.0) port(514));<br>
};</font><font color="#990000"><br>
</font></tt><font size="-1"><tt><font color="#990000">filter f_mail {
facility(mail); };<br>
process p_msgid {<br>
    filter f_msgid {<br>
        message(&#39;MsgID: (?&lt;MESSAGEID&gt;\S+)&#39;, type(&#39;pcre&#39;)
flags(&#39;nobackref&#39;,&#39;store-matches&#39;));<br>
    };<br>
    destination d_oracle { sql(...); };<br>
    destination d_oracle_fallback { sql(...); };<br>
    log { filter(f_msgid); destination(d_oracle); };<br>
    log { filter(f_msgid); destination(d_oracle_fallback);
flags(fallback); };<br>
};<br>
process p_foobar {<br>
    options {<br>
       flush_timeout(1000);<br>
    }<br>
    filter f_foobar { ... };<br>
    destination d_foobar { ... };<br>
    destination d_foobar_fallback { ... };<br>
    log { filter(f_foobar); destination(d_foobar); };<br>
    log { filter(f_foobar); destination(d_foobar_fallback);
flags(fallback); };<br>
};<br>
<br>
log { source(s_sys); source(s_net); filter(f_mail);
destination(p_msgid); destination(p_foobar); };</font></tt></font><font size="-1"><font face="Helvetica, Arial, sans-serif"><br>
<br>
This will launch 3 processes, a master control process that does very
basic filtering and uses some sort of IPC to send the data to 2 other
processes which inherit the global options section and accept every
config statement the master process does except sources. This way each
process can run in parallel on the different CPU cores, and can have
fallback destinations that wont interfere with the other processes.<br>
<br>
</font></font><br>
Sent: Wednesday, March 17, 2010 7:54:42 AM<br>
From: Zoltán Pallagi <a href="mailto:pzolee@balabit.hu" target="_blank">&lt;pzolee@balabit.hu&gt;</a><br>
To: Syslog-ng users&#39; and developers&#39; mailing list
<a href="mailto:syslog-ng@lists.balabit.hu" target="_blank">&lt;syslog-ng@lists.balabit.hu&gt;</a>, <a href="mailto:syslogng@feystorm.net" target="_blank">syslogng@feystorm.net</a> <br>
Subject: Re: [syslog-ng] log failback groups
<div><div></div><div class="h5"><blockquote type="cite">
  
Hi Patrick,<br>
  <br>
As far as I know,  we would like to solve the failover/failback problem
in syslog-ng PE v3.2 (and perhaps in OSE v3.2), but we are still
working on it.<br>
However, we are planning to support it only in case of tcp/syslog
destinations.<br>
  <br>
Patrick H. wrote:
  <blockquote type="cite"><big><font size="-1"><big><font face="Helvetica, Arial, sans-serif">How
do you do groups of failbacks? For example<br>
    <br>
log { filter(f_filter1); destination(d_file1); };<br>
log { filter(f_filter1); destination(d_file2); }; &lt;-- log here only
if the above fails<br>
log { filter(f_filter2); destination(d_sql1); }; &lt;-- may include
messages from the above 2 lines<br>
log { filter(f_filter2); destination(d_sql2); }; &lt;-- log here only
if d_sql1 fails<br>
    <br>
So, say lines 1 and 3 both fail, lines 2 and 3 should both start
working. If I put a fallback flag on d_file2 and d_sql2, and d_sql1
fails, d_sql2 wont kick in on matches that d_file1 is still taking.<br>
It seems like there should be a way to do &quot;</font></big></font><font size="-1"><big><tt>log { destination(...) or destination(...); };</tt></big></font><font size="-1"><big><font face="Helvetica, Arial, sans-serif">&quot;, or &quot;</font></big></font><font size="-1"><big><tt>log {...} or log {...};</tt></big></font><font size="-1"><big><font face="Helvetica, Arial, sans-serif">&quot;.<br>


    <br>
    </font></big></font></big>
    <pre><hr size="4" width="90%">
______________________________________________________________________________
Member info: <a href="https://lists.balabit.hu/mailman/listinfo/syslog-ng" target="_blank">https://lists.balabit.hu/mailman/listinfo/syslog-ng</a>
Documentation: <a href="http://www.balabit.com/support/documentation/?product=syslog-ng" target="_blank">http://www.balabit.com/support/documentation/?product=syslog-ng</a>
FAQ: <a href="http://www.campin.net/syslog-ng/faq.html" target="_blank">http://www.campin.net/syslog-ng/faq.html</a>

  </pre>
  </blockquote>
  <br>
  <br>
  <pre cols="72">-- 
pzolee
  </pre>
</blockquote>
</div></div></div>

<br>______________________________________________________________________________<br>
Member info: <a href="https://lists.balabit.hu/mailman/listinfo/syslog-ng" target="_blank">https://lists.balabit.hu/mailman/listinfo/syslog-ng</a><br>
Documentation: <a href="http://www.balabit.com/support/documentation/?product=syslog-ng" target="_blank">http://www.balabit.com/support/documentation/?product=syslog-ng</a><br>
FAQ: <a href="http://www.campin.net/syslog-ng/faq.html" target="_blank">http://www.campin.net/syslog-ng/faq.html</a><br>
<br>
<br></blockquote></div><br>