PF_Ring and Bro - packet loss

I’m experiencing high packet loss (15% -50%) with Bro 2.4 compiled with PF_Ring. PFcount (pfcount -i eth0 -e 1) shows 0% packet loss while /proc/net/pf_ring/PID shows the same number of dropped packets as broctl netstats. The github link contains all changes and performance steps I’ve taken so far along with output from PFcount, broctl, and ethtool. Has anyone else experienced similar performance issues or have recommendations to get my dropped packets as close to 0% as possible? Thanks

Current config -


Just from initial glance you may want to allocate more slots in pfring…

Min Num Slots : 4096
Bucket Len : 8192
Slot Len : 8224 [bucket+header]
Tot Memory : 33697792
Tot Packets : 153298629
Tot Pkt Lost : 60413245
Tot Insert : 92885384
Tot Read : 92829402
Insert Offset : 3522336
Remove Offset : 3537608
Num Free Slots : 0 <--------------


modprobe pf_ring enable_tx_capture=0 min_num_slots=32768

Your broctl status output shows Bro is in standalone mode and not configured to take advantage of pf_ring. You’ll need to configure a local cluster with the pf_ring specific options set for the monitoring interface/worker.

Something like this might work in your case; notice the lb_method and lb_procs settings for the worker:




I think you need at least 2 lb_procs for pf_ring to provide any performance gain. You can also set cpu affinity for the worker processes; this is recommended for better performance and cluster stability, but not required. If you do be sure to specify only physical cpu/core ID’s. I believe the general rule of thumb is to leave half of your physical cores freed up for the OS and other Bro processes. For example:

pin_cpus=2,3 # assumes a single quad-core with core ID’s 0-3

There are a few more pf_ring specific options available in BroControl’s config file. You can check them out here

You might want to give “broctl capstats” and the capture-loss Bro script a try also; both are really helpful with troubleshooting traffic capture issues.


Which is the maximum slot number that can be handled by Bro?