Hi Paolo,

Have been mucking around with PF_RING (v8.2) based on your pointer and this is what I am observing:

1. For the same setup as before (that took ~25% of a core), with PF_RING, I observed worse performance (~40%). 2. I found out that PF_RING has its own sampling knobs. There is an api to set sampling rate for each ring, but I couldn't access it (since our interface is pmacctd -> modified libpcap -> PF_RING). Instead, I changed the sampling rate in the pf_ring kernel module directly (default values in the ring_create and ring_alloc_mem functions). 3. Using this, for a sampling rate of 20 in the pf_ring module (and setting the pmacctd sampling_rate to 1 to avoid double-sampling), I observe ~15% of core - so that is great. 4. Even better - when I go down to sampling rates of 200 and 2k, cpu consumption falls to 2% and 1% with this approach. In comparison, using the built-in pmacctd sampling (with no pf_ring) only got me to 15% (from the initial 25%) where it flattened out.

All in all, using pf_ring with in-built sampling seems to be giving amazing results.

1. Does all this sound reasonable, or am I doing something wrong?
2. It would be nice if the sampling rate in pmacctd would internally set the pf_ring sampling value. But, due to the libpcap interface (and this being a specific 3rd party software), I guess this would be out of scope?

Regards,
Chander

On 12/4/22 07:02, Paolo Lucente wrote:

Hi Chander,

I am unable to confirm your figure but i can say that you can give a try to PF_RING-enabled libpcap to see if it brings any advantage to the performance you are currently seeing.

Also, as explained here ( https://github.com/pmacct/pmacct/blob/50c6545275ba8fdf227a248af9982302f1ef25e0/QUICKSTART#L243-#L255 ) with PF_RING and a supported NIC you can scale performance horizontally by hashing flows over NIC queues and then binding pmacctd to a specific NIC queue.

Paolo


On 1/12/22 05:54, Chander Govindarajan wrote:
Hi,

Wanted to check what the expected performance of pmacctd is for the following config. Using pmacctd (v1.7.7 docker image with nfprobe plugin on an Ubuntu 22.04, linux kernel 5.15) with the key portion of the config as follows:

```
aggregate: src_host, dst_host, in_iface, out_iface, timestamp_start, timestamp_end, src_port, dst_port, proto, tos, tcpflags
timestamps_secs: true

plugin_pipe_size: 102400
nfprobe_timeouts: tcp=5:tcp.rst=5:tcp.fin=5:udp=5:icmp=5:general=5:maxlife=5

sampling_rate: 20
```

With iperf2 (-l 1440 -P 1 -b 1G) and around 100k packets per second, I am seeing CPU util of ~25-30% by pmacctd. Is this within expected behaviour?

Regards,
Chander

_______________________________________________
pmacct-discussion mailing list
http://www.pmacct.net/#mailinglists

_______________________________________________
pmacct-discussion mailing list
http://www.pmacct.net/#mailinglists

Reply via email to