<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
<p>More info. It seems my threads process different amount of packets. It is not evenly distributed. Is there a setting somewhere for that in Suricata or in PFRING? It seems that thread with 100% cpu utilization changes from one to another over time. At that
 time I notice from stats.log that new busy thread is processing more packets.</p>
<br>
<br>
<div style="color: rgb(0, 0, 0);">
<div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="x_divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> Peter Manev <petermanev@gmail.com><br>
<b>Sent:</b> Thursday, June 30, 2016 4:27 PM<br>
<b>To:</b> Yasha Zislin<br>
<b>Cc:</b> oisf-users@lists.openinfosecfoundation.org<br>
<b>Subject:</b> Re: [Oisf-users] number of alerts versus performance</font>
<div> </div>
</div>
</div>
<font size="2"><span style="font-size:10pt;">
<div class="PlainText">On Thu, 2016-06-30 at 15:54 +0000, Yasha Zislin wrote:<br>
> Peter,<br>
> <br>
> <br>
> I found one alert that was causing high alert count. After I've<br>
> disabled it, count went down but packet loss is still around 20%.<br>
> <br>
> <br>
> my stats.log does not contain anything useful such as flow emergency<br>
> mode, or ssn memcap drop. The only thing that is off is kernel drops,<br>
> and tcp reassembly gaps. <br>
> From my understanding kernel drops have nothing to do with Suricata<br>
> and point to OS problems.<br>
> <br>
> <br>
> I do see one of the CPUs peak at 100% when packet loss increases. One<br>
> thing to note. Two other CPUs are working on capturing traffic with<br>
> high IRQs. My guess would be flow manager or detection engine.<br>
> <br>
<br>
<br>
You can see if you get more info from:<br>
top -H -p `pidof suricata`<br>
and<br>
perf top -c cpu_number_here<br>
example: perf top -c 0<br>
<br>
> I dunno.<br>
> <br>
> <br>
> Thanks<br>
> <br>
> <br>
> <br>
> <br>
> ______________________________________________________________________<br>
> From: Peter Manev <petermanev@gmail.com><br>
> Sent: Thursday, June 30, 2016 3:00 PM<br>
> To: Yasha Zislin<br>
> Cc: oisf-users@lists.openinfosecfoundation.org<br>
> Subject: Re: [Oisf-users] number of alerts versus performance <br>
>  <br>
> On Thu, 2016-06-30 at 14:41 +0000, Yasha Zislin wrote:<br>
> > I have been trying to figure out a packet loss on one of my sensors<br>
> > and I am puzzled.<br>
> > <br>
> > It is has 16 gigs of RAM, one quad core AMD CPU, and nic sees about<br>
> 3<br>
> > million packets per minute. Nothing special in my mind. I am using<br>
> > PFRING 6.5.0 and Suricata 3.1.<br>
> > <br>
> > I get about 20% to 40% packet loss.  I have another identical server<br>
> > which sees the same amount of traffic and maybe some of the same<br>
> > traffic as well.<br>
> > <br>
> > I've been messing around with NIC settings, IRQs, PFRING settings,<br>
> > Suricata settings trying to figure out why such a high packet loss.<br>
> > <br>
> > <br>
> > I have just realized one big difference in these two sensors.<br>
> > Problematic one gets 2k to 4k of alerts per minute which sounds<br>
> huge.<br>
> > <br>
> <br>
> Any particular sig that is alerting in excess ?<br>
> <br>
> > Second one gets like 80 alerts per minute. Both have the same<br>
> > rulesets.<br>
> > <br>
> > <br>
> > The difference of course is the home_net variable.<br>
> > <br>
> > <br>
> > Can the fact that Suricata processes more rules due to HOME_NET<br>
> > definition cause high performance strain on the server? <br>
> > <br>
> <br>
> Yes HOME_NET size has effect on performance as well (among other<br>
> things). For example - <br>
> HOME_NET: "any"<br>
> EXTERNAL_NET: "any"<br>
> will certainly degrade your performance.<br>
> <br>
> > <br>
> > If the packet does not match per HOME_NET, it will be discarded<br>
> before<br>
> > being processed in rules. Correct?<br>
> > <br>
> > Versus if packet passes HOME_NET check, it would have to go through<br>
> > all of the rules, hence cause higher CPU utilization.<br>
> > <br>
> > <br>
> > Thank you for the clarification.<br>
> > <br>
> > <br>
> > _______________________________________________<br>
> > Suricata IDS Users mailing list:<br>
> oisf-users@openinfosecfoundation.org<br>
> > Site: <a href="http://suricata-ids.org" id="LPlnk847268">http://suricata-ids.org</a> | Support:
<div id="LPBorder_GT_14673068058340.19563825740811813" style="margin-bottom: 20px; overflow: auto; width: 100%; text-indent: 0px;">
<table id="LPContainer_14673068058300.12957324800541836" cellspacing="0" style="width: 90%; position: relative; overflow: auto; padding-top: 20px; padding-bottom: 20px; margin-top: 20px; border-top-width: 1px; border-top-style: dotted; border-top-color: rgb(200, 200, 200); border-bottom-width: 1px; border-bottom-style: dotted; border-bottom-color: rgb(200, 200, 200); background-color: rgb(255, 255, 255);">
<tbody>
<tr valign="top" style="border-spacing: 0px;">
<td id="ImageCell_14673068058310.006739000569917941" colspan="1" style="width: 250px; position: relative; display: table-cell; padding-right: 20px;">
<div id="LPImageContainer_14673068058310.5297383558948316" style="height: 200px; position: relative; margin: auto; display: table; width: 200px; background-color: rgb(255, 255, 255);">
<a id="LPImageAnchor_14673068058320.37963677957521" href="http://suricata-ids.org/" target="_blank" style="display: table-cell; text-align: center;"><img aria-label="Preview image with link selected. Double-tap to open the link." id="LPThumbnailImageID_14673068058320.6769968730148812" style="display: inline-block; max-width: 250px; max-height: 250px; height: 200px; width: 200px; border-width: 0px; vertical-align: bottom;" width="200" height="200" src="https://secure.gravatar.com/blavatar/b35fe77e09a7541f738f500f4db6b857?s=200&ts=1467306804"></a></div>
</td>
<td id="TextCell_14673068058330.3843123917911655" colspan="2" style="vertical-align: top; position: relative; padding: 0px; display: table-cell;">
<div id="LPRemovePreviewContainer_14673068058330.3772276390572995"></div>
<div id="LPTitle_14673068058330.5527906052657512" style="top: 0px; color: rgb(0, 120, 215); font-weight: normal; font-size: 21px; font-family: wf_segoe-ui_light, "Segoe UI Light", "Segoe WP Light", "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif; line-height: 21px;">
<a id="LPUrlAnchor_14673068058330.7954179821748617" href="http://suricata-ids.org/" target="_blank" style="text-decoration: none;">Suricata</a></div>
<div id="LPMetadata_14673068058330.37354030119673154" style="margin: 10px 0px 16px; color: rgb(102, 102, 102); font-weight: normal; font-family: wf_segoe-ui_normal, "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif; font-size: 14px; line-height: 14px;">
suricata-ids.org</div>
<div id="LPDescription_14673068058340.7746332039636032" style="display: block; color: rgb(102, 102, 102); font-weight: normal; font-family: wf_segoe-ui_normal, "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif; font-size: 14px; line-height: 20px; max-height: 100px; overflow: hidden;">
Open Source IDS / IPS / NSM engine</div>
</td>
</tr>
</tbody>
</table>
</div>
<br>
<br>
> <a href="http://suricata-ids.org/support/">http://suricata-ids.org/support/</a>
<br>
> <br>
> <br>
> Suricata<br>
> suricata-ids.org<br>
> Open Source IDS / IPS / NSM engine<br>
> <br>
> <br>
> > List:<br>
> <a href="https://lists.openinfosecfoundation.org/mailman/listinfo/oisf-users">https://lists.openinfosecfoundation.org/mailman/listinfo/oisf-users</a><br>
> > Suricata User Conference November 9-11 in Washington, DC:<br>
> <a href="http://oisfevents.net">http://oisfevents.net</a><br>
> <br>
> <br>
<br>
-- <br>
Regards,<br>
Peter Manev<br>
<br>
</div>
</span></font></div>
</div>
</body>
</html>