Hi all, I'm proposing some improvements to CLI commands 'show interface' and 'show error'.
As you might have known, these two commands show the cumulative counters of
interfaces and errors. Unfortunately there are no rate statistics for these
counters, which makes it hard to know how fast vPP workers are working on
packets forwarding or internal error processing. Probably you have to calculate
the rates by running some scripts on vPP CLI or via API. This is quite
inefficient, particularly when you are working on performance tuning.
We added rate statistics for these two CLI commands, but with some hardcoding
embedded. In others words, the code is not perfect but effective. Do you think
it is worth merging it to the master track?
Regards,
Kingwel
See screenshots of these improved commands:
The data show DPDK IPsec encryption. We enabled two pg streams which generate
plain IP/UDP flows. Note at the last column, you can see the packet rate of the
two IPsec interfaces are 2.7Mpps/2.14Gbps and 1.8M/7.3G respectively. All the
traffics are eventually forwarded to VF ethernet interfaces as tx packerts
@4.4Mbps/12Gbps in total.
vpp# show int
Name Idx State MTU (L3/IP4/IP6/MPLS)
Counter Count Rate
VirtualFunctionEthernet81/11/7.1 1 up 0/0/0/0 rx
packets 1811 0.000 pps
rx bytes
85490 0.000 bps
tx
packets 553780750 4.463M pps
tx bytes
187452927008 12.082G bps
drops
1792 0.000
punts
14 0.000
ip4
14 0.000
VirtualFunctionEthernet81/11/7.1 2 up 0/0/0/0 drops
1 0.000
VirtualFunctionEthernet81/11/7 9999 up 1500/0/0/0 rx
packets 1811 0.000 pps
rx bytes
85490 0.000 bps
tx
packets 553780750 4.463M pps
tx bytes
187452927008 12.082G bps
drops
1793 0.000
punts
14 0.000
tx-error
1 0.000
ipsec0 3 up 0/0/0/0 tx
packets 332680709 2.682M pps
tx bytes
33268070900 2.146G bps
ipsec9999 4 up 0/0/0/0 tx
packets 221122821 1.781M pps
tx bytes
113214884352 7.295G bps
local0 0 down 0/0/0/0 rx
packets 553804032 4.463M pps
rx bytes
146483108864 9.440G bps
drops
29949 0.000
ip4
553803530 4.463M
pg0 5 up 9000/0/0/0
vpp# show int verbose
Name Idx State MTU (L3/IP4/IP6/MPLS)
Counter Count Rate
VirtualFunctionEthernet81/11/7.1 1 up 0/0/0/0 rx
packets 1811 0.000 pps
rx bytes
85490 0.000 bps
tx
packets 563321358 4.446M pps
Thread 1 kw_wk_0 : 2.669M
Thread 2 kw_wk_1 : 1.778M
tx bytes
190684525600 12.048G bps
Thread 1 kw_wk_0 : 3.715G
Thread 2 kw_wk_1 : 8.333G
drops
1792 0.000
punts
14 0.000
ip4
14 0.000
VirtualFunctionEthernet81/11/7.1 2 up 0/0/0/0 drops
1 0.000
VirtualFunctionEthernet81/11/7 9999 up 1500/0/0/0 rx
packets 1811 0.000 pps
rx bytes
85490 0.000 bps
tx
packets 563321358 4.446M pps
Thread 1 kw_wk_0 : 2.669M
Thread 2 kw_wk_1 : 1.778M
tx bytes
190684525600 12.048G bps
Thread 1 kw_wk_0 : 3.715G
Thread 2 kw_wk_1 : 8.333G
drops
1793 0.000
punts
14 0.000
tx-error
1 0.000
ipsec0 3 up 0/0/0/0 tx
packets 338406917 2.669M pps
Thread 1 kw_wk_0 : 2.669M
tx bytes
33840691700 2.135G bps
Thread 1 kw_wk_0 : 2.135G
ipsec9999 4 up 0/0/0/0 tx
packets 224937221 1.778M pps
Thread 2 kw_wk_1 : 1.778M
tx bytes
115167857152 7.281G bps
Thread 2 kw_wk_1 : 7.281G
local0 0 down 0/0/0/0 rx
packets 563344640 4.446M pps
Thread 1 kw_wk_0 : 2.669M
Thread 2 kw_wk_1 : 1.778M
rx bytes
149008702464 9.416G bps
Thread 1 kw_wk_0 : 2.135G
Thread 2 kw_wk_1 : 7.281G
drops
29949 0.000
ip4
563344138 4.446M
Thread 1 kw_wk_0 : 2.669M
Thread 2 kw_wk_1 : 1.778M
pg0 5 up 9000/0/0/0
Similarly we made improvement to 'show error', then you can easily understand
how fast packets are processed by the nodes:
vpp# show err
Count Rate Node Reason
1 0.000 VirtualFunctionEthernet81/11/7-output interface is
down 2714
345242623 2.559M dpdk-crypto-input Crypto ops
dequeued 409
345242885 2.559M dpdk-esp-encrypt ESP pkts
received 421
345242885 2.559M ipsec-if-output good packets
transmitted 2136
10236 0.000 ip4-glean address
overflow drops 2457
4099 0.000 ip4-glean ARP requests
sent 2458
14 0.000 ip4-icmp-input unknown type
2531
5 0.000 arp-input ARP replies
sent 2678
1792 0.000 arp-input ARP request IP4
source addre 2685
229474815 1.698M dpdk-crypto-input Crypto ops
dequeued 409
229475077 1.698M dpdk-esp-encrypt ESP pkts
received 421
229475077 1.698M ipsec-if-output good packets
transmitted 2136
12024 0.000 ip4-glean address
overflow drops 2457
3590 0.000 ip4-glean ARP requests
sent 2458
vpp# show err verbose
Count Rate Node Reason
Index
Thread 0 (kw_main):
1 0.000 VirtualFunctionEthernet81/11/7-output interface is
down 2714
Thread 1 (kw_wk_0):
356679934 2.537M dpdk-crypto-input Crypto ops
dequeued 409
356680197 2.537M dpdk-esp-encrypt ESP pkts
received 421
356680197 2.537M ipsec-if-output good packets
transmitted 2136
10236 0.000 ip4-glean address
overflow drops 2457
4099 0.000 ip4-glean ARP requests
sent 2458
14 0.000 ip4-icmp-input unknown type
2531
5 0.000 arp-input ARP replies
sent 2678
1792 0.000 arp-input ARP request IP4
source addre 2685
Thread 2 (kw_wk_1):
237078270 1.687M dpdk-crypto-input Crypto ops
dequeued 409
237078533 1.687M dpdk-esp-encrypt ESP pkts
received 421
237078533 1.687M ipsec-if-output good packets
transmitted 2136
12024 0.000 ip4-glean address
overflow drops 2457
3590 0.000 ip4-glean ARP requests
sent 2458
Total:
593758204 4.224M dpdk-crypto-input Crypto ops
dequeued 409
593758730 4.224M dpdk-esp-encrypt ESP pkts
received 421
593758730 4.224M ipsec-if-output good packets
transmitted 2136
22260 0.000 ip4-glean address
overflow drops 2457
7689 0.000 ip4-glean ARP requests
sent 2458
14 0.000 ip4-icmp-input unknown type
2531
5 0.000 arp-input ARP replies
sent 2678
1792 0.000 arp-input ARP request IP4
source addre 2685
1 0.000 VirtualFunctionEthernet81/11/7-output interface is
down 2714
vpp#
vpp#
vpp#
In the end, here is how we generate packets for performance testing:
vpp# show packet-generator
Name Enabled Count Parameters
ipsec0 Yes 1111168261 limit 0, rate 4.00e6 pps, size
100-100, buffer-size 2048, worker 0,
ipsec1 Yes 737032453 limit 0, rate 4.00e6 pps, size
512-512, buffer-size 2048, worker 1,
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#9712): https://lists.fd.io/g/vpp-dev/message/9712 Mute This Topic: https://lists.fd.io/mt/22721546/21656 Group Owner: [email protected] Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
