[Bro-Dev] #996: CPU pinning

Bro Tracker bro at tracker.bro.org
Mon May 13 08:57:46 PDT 2013


#996: CPU pinning
-----------------------------+------------------------
 Reporter:  seth             |      Owner:  dnthayer
     Type:  Feature Request  |     Status:  new
 Priority:  High             |  Milestone:  Bro2.2
Component:  BroControl       |    Version:  git/master
 Keywords:                   |
-----------------------------+------------------------
 We need a broctl plugin that performs CPU pinning on FreeBSD and Linux.

 The plugin should add a new per-node option in node.cfg "pin_cpu" (with an
 alias "pin_cpus") that takes a comma separated list of numbers to
 represent the cores that someone is making available for Bro processes to
 be pinned to.

 I don't think that we need to do any verification on the numbers right
 now, users shouldn't give cores numbers that don't exist.  Maybe we could
 check the status code from the tools that set cpu pinning? (assuming those
 fail if the core doesn't exist).  The only side effect should be that the
 processes won't be pinned.

 Here's a full worker example:

 {{{
 [worker-1]
 type=worker
 host=host1
 interface=eth0
 lb_method=pf_ring
 lb_procs=4
 pin_cpus=5,6,7,8
 }}}

 I think if a user provides fewer cores than they want to load balance
 across (i.e. lb_procs=10, pin_cpus=2,3) we should just start at the
 beginning of the pin_cpus list over and over so that in the case I just
 gave, cpu 2 and 3 would each have 5 processes pinned.

 At the moment I think we only need to support freebsd and linux with this
 feature.  We have users that have done some work individually in this
 area.

 Linux:
 https://github.com/grigorescu/broctl/commit/114551d0e78b2603cfe5c33d65d1240e67d87846
 FreeBSD: https://gist.github.com/sethhall/5569364

-- 
Ticket URL: <http://tracker.bro.org/bro/ticket/996>
Bro Tracker <http://tracker.bro.org/bro>
Bro Issue Tracker



More information about the bro-dev mailing list