To measure the packet rate performance of the Sniffer10G v2 software, you can run snf_pktgen.c on the "server" host system to generate the packets for injection and run snf_simple_recv.c on the "client" host system to receive the packets.
On the Linux test system insure that /opt/snf/bin/tests/ has been added to the current $PATH variable.
On the “server” host system, open a command window and type the following command to generate 1 billion 60-byte packets:
$ snf_pktgen -s 60 -n 1000000000
On the “client” host system, open a command window and type the following command:
$ snf_simple_recv -t 1
and the following output will appear:
14843291 pkts (890597460B) in 1.001 secs (14827884 pps), Avg Pkt: 60, BW (Gbps): 7.117 14843663 pkts (890619780B) in 1.001 secs (14828242 pps), Avg Pkt: 60, BW (Gbps): 7.118 14841101 pkts (890466060B) in 1.001 secs (14825697 pps), Avg Pkt: 60, BW (Gbps): 7.116 14845703 pkts (890742180B) in 1.001 secs (14830250 pps), Avg Pkt: 60, BW (Gbps): 7.119 14842322 pkts (890539320B) in 1.001 secs (14826946 pps), Avg Pkt: 60, BW (Gbps): 7.117 14842292 pkts (890537520B) in 1.001 secs (14826902 pps), Avg Pkt: 60, BW (Gbps): 7.117 14843007 pkts (890580420B) in 1.001 secs (14827601 pps), Avg Pkt: 60, BW (Gbps): 7.117 14842392 pkts (890543520B) in 1.001 secs (14826942 pps), Avg Pkt: 60, BW (Gbps): 7.117
The execution of this test will report for each second the packet rate (pps). The packet rate is 14.8 Mpps, or line rate for 60-byte packets.
Important Notes:
-
Always start the snf_simple_recv process before you start running the packet generator (snf_pktgen).
-
Always stop the packet generator (snf_pktgen) before you stop the snf_simple_recv process.
-
Otherwise, if the packet generator is sending packets, but snf_simple_recv is not running, then you will see the overflow counter (Net overflow drop in the myri_counters output) increasing. This situation occurs because there is no Sniffer10G program consuming the packets through the Sniffer10G API, and the packets are instead being delivered to the ethernet portion of the driver, which will attempt to drop them as fast as possible, but will not be able to sustain the packet rate.