Snort mailing list archives

Re: Question about CPU affinity for interrupts


From: Livio Ricciulli <livio () metaflows com>
Date: Tue, 11 Mar 2014 19:24:33 -0700

Yes, sure.
On 03/11/2014 04:49 PM, Roger Campbell wrote:
Thanks for the response Livio! Should I avoid assigning an IRQ to a hyper-thread for this task?


On Tue, Mar 11, 2014 at 12:57 PM, Livio Ricciulli <livio () metaflows com <mailto:livio () metaflows com>> wrote:

    The driver usually copies the packets from the NIC to the memory
    of the node (or hardware thread) where the IRQ' affinity is mapped.

    If you do
    numactl --hardware

    You will see your memory architecture.
    I am guessing all nodes use the same memory in your case; if so, I
    would map the IRQ to the free CPUs. If not, see below:

    If your NIC driver/chipset can do symmetric RSS, then you would
    want to map each interrupt to a node with the smallest distance to
    the node where Snort will consume the packets from that IRQ. If
    your NIC cannot do RSS, it does not matter since the packets from
    each interrupt will be consumed by all Snort processes.

    Livio.


    On 03/10/2014 07:38 PM, Roger Campbell wrote:
    Hi everyone, had a question about IRQs and PF_RING.

    Currently I'm testing out PF_RING and snort 2.9.6 on a 1Gb/s link
    that usually tops out around 800Mb/s.  The system has 16 physical
    cores (32 Hyper-Threads).

    If I run 8 snort instances in the format below, load is handled
    pretty well.

    snort -R 1 --daq-dir=/usr/local/lib/daq --daq pfring --daq-mode
    passive --daq-var clusterid=10 --daq-var bindcpu=4 -c
    /IDS/snort/etc/snort.conf -l /IDS/snort/log1 -u snort -g snort -i
    eth4 -D
    snort -R 2 --daq-dir=/usr/local/lib/daq --daq pfring --daq-mode
    passive --daq-var clusterid=10 --daq-var bindcpu=6 -c
    /IDS/snort/etc/snort.conf -l /IDS/snort/log2 -u snort -g snort -i
    eth4 -D
    (continues using CPU 8,10,12,14,16,18)

    I know that I should set CPU affinity for interrupts for each rx
    queue to a specific CPU or set of CPUs.  My question is, should I
    bind these to 8 free cores, or should I bind them to cores which
    are already hosting a snort process?

    All of the IRQs are currently being processed by ksoftirqd/0 on
    CPU 0 which is not optimal.



    ------------------------------------------------------------------------------
    Learn Graph Databases - Download FREE O'Reilly Book
    "Graph Databases" is the definitive new guide to graph databases and their
    applications. Written by three acclaimed leaders in the field,
    this first edition is now available. Download your free book today!
    http://p.sf.net/sfu/13534_NeoTech


    _______________________________________________
    Snort-users mailing list
    Snort-users () lists sourceforge net  <mailto:Snort-users () lists sourceforge net>
    Go to this URL to change user options or unsubscribe:
    https://lists.sourceforge.net/lists/listinfo/snort-users
    Snort-users list archive:
    http://sourceforge.net/mailarchive/forum.php?forum_name=snort-users

    Please visithttp://blog.snort.org  to stay current on all the latest Snort news!


    ------------------------------------------------------------------------------
    Learn Graph Databases - Download FREE O'Reilly Book
    "Graph Databases" is the definitive new guide to graph databases
    and their
    applications. Written by three acclaimed leaders in the field,
    this first edition is now available. Download your free book today!
    http://p.sf.net/sfu/13534_NeoTech
    _______________________________________________
    Snort-users mailing list
    Snort-users () lists sourceforge net
    <mailto:Snort-users () lists sourceforge net>
    Go to this URL to change user options or unsubscribe:
    https://lists.sourceforge.net/lists/listinfo/snort-users
    Snort-users list archive:
    http://sourceforge.net/mailarchive/forum.php?forum_name=snort-users

    Please visit http://blog.snort.org to stay current on all the
    latest Snort news!




------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech


_______________________________________________
Snort-users mailing list
Snort-users () lists sourceforge net
Go to this URL to change user options or unsubscribe:
https://lists.sourceforge.net/lists/listinfo/snort-users
Snort-users list archive:
http://sourceforge.net/mailarchive/forum.php?forum_name=snort-users

Please visit http://blog.snort.org to stay current on all the latest Snort news!

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
Snort-users mailing list
Snort-users () lists sourceforge net
Go to this URL to change user options or unsubscribe:
https://lists.sourceforge.net/lists/listinfo/snort-users
Snort-users list archive:
http://sourceforge.net/mailarchive/forum.php?forum_name=snort-users

Please visit http://blog.snort.org to stay current on all the latest Snort news!

Current thread: