<html><body><span style="font-family:Verdana; color:#000000; font-size:10pt;"><div>Ok, so the patch never put the thread option into the suricata.yaml. I reapplied the patch and all was good.</div><div><br></div><div>- Ran with 8 threads, everything worked great, CPU utilization seems much better 2Gbps of traffic and load was less then 7% across all CPU's</div><div>- Ran with 16 threads, failed<br></div><div>- Ran with 24 threads, failed</div><div><br></div><div>--</div><div>[722] 9/3/2011 -- 11:35:09 - (log-droplog.c:182) 
&lt;Info&gt; (LogDropLogInitCtx) -- Drop log output initialized, 
filename: drop.log</div> <div>[722] 9/3/2011 -- 11:35:09 - (source-pfring.c:167) &lt;Info&gt; (PfringLoadConfig) -- Going to use 16 PF_RING receive threads</div><div>[725]
 9/3/2011 -- 11:35:09 - (source-pfring.c:309) &lt;Info&gt; 
(ReceivePfringThreadInit) -- (RecvPfring1) Using PF_RING v.4.6.0, 
interface eth0, cluster-id 99</div> <div>[727] 9/3/2011 -- 11:35:09 - 
(source-pfring.c:309) &lt;Info&gt; (ReceivePfringThreadInit) -- 
(RecvPfring3) Using PF_RING v.4.6.0, interface eth0, cluster-id 99</div><div>[728]
 9/3/2011 -- 11:35:09 - (source-pfring.c:309) &lt;Info&gt; 
(ReceivePfringThreadInit) -- (RecvPfring4) Using PF_RING v.4.6.0, 
interface eth0, cluster-id 99</div> <div>[730] 9/3/2011 -- 11:35:09 - 
(source-pfring.c:309) &lt;Info&gt; (ReceivePfringThreadInit) -- 
(RecvPfring6) Using PF_RING v.4.6.0, interface eth0, cluster-id 99</div><div>[731]
 9/3/2011 -- 11:35:10 - (source-pfring.c:309) &lt;Info&gt; 
(ReceivePfringThreadInit) -- (RecvPfring7) Using PF_RING v.4.6.0, 
interface eth0, cluster-id 99</div> <div>[726] 9/3/2011 -- 11:35:10 - 
(source-pfring.c:309) &lt;Info&gt; (ReceivePfringThreadInit) -- 
(RecvPfring2) Using PF_RING v.4.6.0, interface eth0, cluster-id 99</div><div>[729]
 9/3/2011 -- 11:35:10 - (source-pfring.c:309) &lt;Info&gt; 
(ReceivePfringThreadInit) -- (RecvPfring5) Using PF_RING v.4.6.0, 
interface eth0, cluster-id 99</div> <div>[722] 9/3/2011 -- 11:35:10 - (stream-tcp.c:344) &lt;Info&gt; (StreamTcpInitConfig) -- stream "max_sessions": 262144</div><div>[722] 9/3/2011 -- 11:35:10 - (stream-tcp.c:356) &lt;Info&gt; (StreamTcpInitConfig) -- stream "prealloc_sessions": 32768</div> <div>[722] 9/3/2011 -- 11:35:10 - (stream-tcp.c:366) &lt;Info&gt; (StreamTcpInitConfig) -- stream "memcap": 33554432</div><div>[722]
 9/3/2011 -- 11:35:10 - (stream-tcp.c:373) &lt;Info&gt; 
(StreamTcpInitConfig) -- stream "midstream" session pickups: disabled</div> <div>[722] 9/3/2011 -- 11:35:10 - (stream-tcp.c:381) &lt;Info&gt; (StreamTcpInitConfig) -- stream "async_oneside": disabled</div><div>[722] 9/3/2011 -- 11:35:10 - (stream-tcp.c:390) &lt;Info&gt; (StreamTcpInitConfig) -- <a href="http://stream.reassembly">stream.reassembly</a> "memcap": 67108864</div> <div>[722] 9/3/2011 -- 11:35:10 - (stream-tcp.c:410) &lt;Info&gt; (StreamTcpInitConfig) -- <a href="http://stream.reassembly">stream.reassembly</a> "depth": 1048576</div><div>[722] 9/3/2011 -- 11:35:10 - (stream-tcp.c:421) &lt;Info&gt; (StreamTcpInitConfig) -- stream."inline": disabled</div> <div>[734]
 9/3/2011 -- 11:35:10 - (source-pfring.c:309) &lt;Info&gt; 
(ReceivePfringThreadInit) -- (RecvPfring1) Using PF_RING v.4.6.0, 
interface eth0, cluster-id 99</div><div>[732] 9/3/2011 -- 11:35:10 - 
(source-pfring.c:303) &lt;Error&gt; (ReceivePfringThreadInit) -- 
[ERRCODE: SC_ERR_PF_RING_SET_CLUSTER_FAILED(37)] - pfring_set_cluster 
returned -1 for cluster-id: 99</div> <div>[733] 9/3/2011 -- 11:35:10 - 
(source-pfring.c:303) &lt;Error&gt; (ReceivePfringThreadInit) -- 
[ERRCODE: SC_ERR_PF_RING_SET_CLUSTER_FAILED(37)] - pfring_set_cluster 
returned -1 for cluster-id: 99</div><div>[722] 9/3/2011 -- 11:35:10 - 
(tm-threads.c:1475) &lt;Error&gt; (TmThreadWaitOnThreadInit) -- 
[ERRCODE: SC_ERR_THREAD_INIT(49)] - thread "RecvPfring8" closed on 
initialization.</div> <div>[722] 9/3/2011 -- 11:35:10 - 
(suricata.c:1245) &lt;Error&gt; (main) -- [ERRCODE: 
SC_ERR_INITIALIZATION(45)] - Engine initialization failed, aborting...</div><div><br></div><div>--</div><div>Josh<br></div><div><br></div>
<blockquote id="replyBlockquote" webmail="1" style="border-left: 2px solid blue; margin-left: 8px; padding-left: 8px; font-size: 10pt; color: black; font-family: verdana;">
<div id="wmQuoteWrapper">
-------- Original Message --------<br>
Subject: Re: [Oisf-users] Improved PF_RING support, please test!<br>
From: Victor Julien &lt;<a href="mailto:victor@inliniac.net">victor@inliniac.net</a>&gt;<br>
Date: Wed, March 09, 2011 10:47 am<br>
To: <a href="mailto:oisf-users@openinfosecfoundation.org">oisf-users@openinfosecfoundation.org</a><br>
<br>
Josh, are you setting the <a href="http://pfring.threads">pfring.threads</a> option in your suricata.yaml?<br>
It appears you have it either not set or set to 1. Set it like this:<br>
<br>
# PF_RING configuration. for use with native PF_RING support<br>
# for more info see <a href="http://www.ntop.org/PF_RING.html">http://www.ntop.org/PF_RING.html</a><br>
pfring:<br>
  # Number of receive threads (&gt;1 will enable experimental flow pinned<br>
  # runmode)<br>
  threads: 8<br>
<br>
  # Default interface we will listen on.<br>
  interface: eth0<br>
<br>
  # Default clusterid.  PF_RING will load balance packets based on flow.<br>
  # All threads/processes that will participate need to have the same<br>
  # clusterid.<br>
  cluster-id: 99<br>
<br>
  # Default PF_RING cluster type. PF_RING can load balance per flow or<br>
per hash.<br>
  # This is only supported in versions of PF_RING &gt; 4.1.1.<br>
  cluster-type: cluster_round_robin<br>
<br>
If I set it to 8 pf_ring reports 8 rings...<br>
<br>
Cheers,<br>
Victor<br>
<br>
<br>
On 03/09/2011 12:06 AM, <a href="mailto:jwhite@everisinc.com">jwhite@everisinc.com</a> wrote:<br>
&gt; I've set it to 24, recompiled and it seems to be running ok, (as in it's<br>
&gt; handling 2Gbps worth of packets) but I'm unable to get the number of<br>
&gt; rings to report as anything but 1. Have I missed somthing or is trully<br>
&gt; not working correctly. I've run it based on on flow and as packet...<br>
&gt; still no go.<br>
&gt; <br>
&gt; EV-SVR-006:~$ cat /proc/net/pf_ring/info<br>
&gt; PF_RING Version     : 4.6.0 ($Revision: exported$)<br>
&gt; Ring slots          : 32768<br>
&gt; Slot version        : 12<br>
&gt; Capture TX          : No [RX only]<br>
&gt; IP Defragment       : No<br>
&gt; Transparent mode    : Yes (mode 0)<br>
&gt; Total rings         : 1<br>
&gt; Total plugins       : 0<br>
&gt; <br>
&gt; - josh<br>
&gt; <br>
&gt; ---<br>
&gt; <br>
&gt; Date: 3/8/2011 -- 16:52:58 (uptime: 0d, 00h 03m 21s)<br>
&gt; -------------------------------------------------------------------<br>
&gt; Counter                   | TM Name                   | Value<br>
&gt; -------------------------------------------------------------------<br>
&gt; <a href="http://decoder.pkts">decoder.pkts</a>              &lt;<a href="http://decoder.pkts">http://decoder.pkts</a>             &gt;; |<br>
&gt; Decode1                   | 16416387<br>
&gt; <a href="http://decoder.bytes">decoder.bytes</a>             &lt;<a href="http://decoder.bytes">http://decoder.bytes</a>            &gt;; |<br>
&gt; Decode1                   | 988040217<br>
&gt; decoder.ipv4              | Decode1                   | 16461043<br>
&gt; decoder.ipv6              | Decode1                   | 700<br>
&gt; <a href="http://decoder.ethernet">decoder.ethernet</a>          &lt;<a href="http://decoder.ethernet">http://decoder.ethernet</a>         &gt;; |<br>
&gt; Decode1                   | 16406387<br>
&gt; decoder.raw               | Decode1                   | 0<br>
&gt; <a href="http://decoder.sll">decoder.sll</a>               &lt;<a href="http://decoder.sll">http://decoder.sll</a>              &gt;; |<br>
&gt; Decode1                   | 0<br>
&gt; <a href="http://decoder.tcp">decoder.tcp</a>               &lt;<a href="http://decoder.tcp">http://decoder.tcp</a>              &gt;; |<br>
&gt; Decode1                   | 16406097<br>
&gt; decoder.udp               | Decode1                   | 1130<br>
&gt; decoder.icmpv4            | Decode1                   | 3<br>
&gt; decoder.icmpv6            | Decode1                   | 0<br>
&gt; decoder.ppp               | Decode1                   | 0<br>
&gt; decoder.pppoe             | Decode1                   | 0<br>
&gt; <a href="http://decoder.gre">decoder.gre</a>               &lt;<a href="http://decoder.gre">http://decoder.gre</a>              &gt;; |<br>
&gt; Decode1                   | 0<br>
&gt; decoder.vlan              | Decode1                   | 0<br>
&gt; decoder.avg_pkt_size      | Decode1                   | 60.012753<br>
&gt; <a href="http://decoder.max_pkt_size">decoder.max_pkt_size</a>      &lt;<a href="http://decoder.max_pkt_size">http://decoder.max_pkt_size</a>     &gt;; |<br>
&gt; Decode1                   | 382<br>
&gt; <a href="http://defrag.ipv4.fragments">defrag.ipv4.fragments</a>     &lt;<a href="http://defrag.ipv4.fragments">http://defrag.ipv4.fragments</a>    &gt;; |<br>
&gt; Decode1                   | 0<br>
&gt; <a href="http://defrag.ipv4.reassembled">defrag.ipv4.reassembled</a>   &lt;<a href="http://defrag.ipv4.reassembled">http://defrag.ipv4.reassembled</a>  &gt;; |<br>
&gt; Decode1                   | 0<br>
&gt; defrag.ipv4.timeouts      | Decode1                   | 0<br>
&gt; <a href="http://defrag.ipv6.fragments">defrag.ipv6.fragments</a>     &lt;<a href="http://defrag.ipv6.fragments">http://defrag.ipv6.fragments</a>    &gt;; |<br>
&gt; Decode1                   | 0<br>
&gt; <a href="http://defrag.ipv6.reassembled">defrag.ipv6.reassembled</a>   &lt;<a href="http://defrag.ipv6.reassembled">http://defrag.ipv6.reassembled</a>  &gt;; |<br>
&gt; Decode1                   | 0<br>
&gt; defrag.ipv6.timeouts      | Decode1                   | 0<br>
&gt; <a href="http://tcp.sessions">tcp.sessions</a>              &lt;<a href="http://tcp.sessions">http://tcp.sessions</a>             &gt;; |<br>
&gt; Stream1                   | 844100<br>
&gt; tcp.ssn_memcap_drop       | Stream1                   | 0<br>
&gt; <a href="http://tcp.pseudo">tcp.pseudo</a>                &lt;<a href="http://tcp.pseudo">http://tcp.pseudo</a>               &gt;; |<br>
&gt; Stream1                   | 0<br>
&gt; <a href="http://tcp.segment_memcap_drop">tcp.segment_memcap_drop</a>   &lt;<a href="http://tcp.segment_memcap_drop">http://tcp.segment_memcap_drop</a>  &gt;; |<br>
&gt; Stream1                   | 0<br>
&gt; <a href="http://tcp.stream_depth_reached">tcp.stream_depth_reached</a>  &lt;<a href="http://tcp.stream_depth_reached">http://tcp.stream_depth_reached</a> &gt;; |<br>
&gt; Stream1                   | 0<br>
&gt; <a href="http://detect.alert">detect.alert</a>              &lt;<a href="http://detect.alert">http://detect.alert</a>             &gt;; |<br>
&gt; Detect                    | 24768<br>
&gt; <br>
&gt; - Josh<br>
&gt; <br>
&gt; On Tuesday, March 08, 2011 04:25:04 am Victor Julien wrote:<br>
&gt; Thanks Luca, I guess we'll find out soon enough if ppl run into perf<br>
&gt; issues... I think we have results for 16 and 24 soon.<br>
&gt; <br>
&gt; Cheers,<br>
&gt; Victor<br>
&gt; <br>
&gt; On 03/08/2011 08:42 AM, Luca Deri wrote:<br>
&gt;&gt; Victor<br>
&gt;&gt; this is just a define you can increase. However note that clusters were<br>
&gt;&gt; designed to handle a few apps, thus if you increase the value to a much<br>
&gt;&gt; higher value, we better review the code and see if it is still efficient<br>
&gt;&gt; enough for your purposes<br>
&gt; <br>
&gt;&gt; Regards Luca<br>
&gt; <br>
&gt;&gt; On Mar 7, 2011, at 9:49 PM, Victor Julien wrote:<br>
&gt; <br>
&gt;&gt; Thanks for figuring that out Will!<br>
&gt; <br>
&gt;&gt; Luca, can we have a higher  (or no) limit? I keep hearing stories of ppl<br>
&gt;&gt; with 24 cores :)<br>
&gt; <br>
&gt;&gt; Cheers,<br>
&gt;&gt; Victor<br>
&gt; <br>
&gt;&gt; On 03/07/2011 07:28 PM, Will Metcalf wrote:<br>
&gt;&gt;&gt;&gt;&gt;&gt; It seems that the maximum is 8 threads here. Not sure if that can be<br>
&gt;&gt;&gt;&gt;&gt;&gt; set higher if the number of slots in pfring are increased. Anyone<br>
&gt;&gt;&gt;&gt;&gt;&gt; try that?<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; This value is hardset in kernel/linux/pf_ring.h<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; #define CLUSTER_LEN 8<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; Modify accordingly, maybe Luca would be kind enough to increase the<br>
&gt;&gt;&gt;&gt;&gt; default value?<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; Regards,<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; Will<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt; On Mon, Mar 7, 2011 at 11:47 AM, Victor Julien<br>
&gt;&gt; &lt;<a href="mailto:victor@inliniac.net">victor@inliniac.net</a> &lt;<a href="mailto:victor@inliniac.net">mailto:victor@inliniac.net</a>&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt; wrote:<br>
&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt; On 03/07/2011 06:15 PM, Chris Wakelin wrote:<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt; On 28/02/11 20:23, Victor Julien wrote:<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; Hey guys,<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; I know a couple of you are running PF_RING in a high speed<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; environment. The attached patch means to improve it's performance.<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; It adds a new option called "pfring.threads" that controls the<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; number of reader threads the pfring code uses. I've tested<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; (lightly) with 1, 4 and 8 which all worked fine. There are some<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; more improvements, including the removal of one memcpy per<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; packet...<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt;&gt; OK, giving it a go with 4 threads ...<br>
&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt; It seems that the maximum is 8 threads here. Not sure if that can be<br>
&gt;&gt;&gt;&gt;&gt;&gt; set higher if the number of slots in pfring are increased. Anyone<br>
&gt;&gt;&gt;&gt;&gt;&gt; try that?<br>
&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt; Cheers,<br>
&gt;&gt;&gt;&gt;&gt;&gt; Victor<br>
&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt; _______________________________________________<br>
&gt;&gt;&gt;&gt;&gt;&gt; Oisf-users mailing list<br>
&gt;&gt;&gt;&gt;&gt;&gt; <a href="mailto:Oisf-users@openinfosecfoundation.org">Oisf-users@openinfosecfoundation.org</a><br>
&gt;&gt; &lt;<a href="mailto:Oisf-users@openinfosecfoundation.org">mailto:Oisf-users@openinfosecfoundation.org</a>&gt;<br>
&gt;&gt;&gt;&gt;&gt;&gt; <a href="http://lists.openinfosecfoundation.org/mailman/listinfo/oisf-users">http://lists.openinfosecfoundation.org/mailman/listinfo/oisf-users</a><br>
&gt; <br>
&gt;&gt; ---<br>
&gt;&gt; Keep looking, don't settle - Steve Jobs<br>
&gt; <br>
_______________________________________________<br>
Oisf-users mailing list<br>
<a href="mailto:Oisf-users@openinfosecfoundation.org">Oisf-users@openinfosecfoundation.org</a><br>
&gt; &lt;<a href="mailto:Oisf-users@openinfosecfoundation.org">mailto:Oisf-users@openinfosecfoundation.org</a>&gt;<br>
<a href="http://lists.openinfosecfoundation.org/mailman/listinfo/oisf-users">http://lists.openinfosecfoundation.org/mailman/listinfo/oisf-users</a><br>
<br>
&gt; _______________________________________________<br>
&gt; Oisf-users mailing list<br>
&gt; <a href="mailto:Oisf-users@openinfosecfoundation.org">Oisf-users@openinfosecfoundation.org</a><br>
&gt; <a href="http://lists.openinfosecfoundation.org/mailman/listinfo/oisf-users">http://lists.openinfosecfoundation.org/mailman/listinfo/oisf-users</a><br>
<br>
<br>
-- <br>
---------------------------------------------<br>
Victor Julien<br>
<a href="http://www.inliniac.net">http://www.inliniac.net</a>/<br>
PGP: <a href="http://www.inliniac.net/victorjulien.asc">http://www.inliniac.net/victorjulien.asc</a><br>
---------------------------------------------<br>
<br>
_______________________________________________<br>
Oisf-users mailing list<br>
<a href="mailto:Oisf-users@openinfosecfoundation.org">Oisf-users@openinfosecfoundation.org</a><br>
<a href="http://lists.openinfosecfoundation.org/mailman/listinfo/oisf-users">http://lists.openinfosecfoundation.org/mailman/listinfo/oisf-users</a><br>

</div>
</blockquote></span></body></html>