Re: [vpp-dev] CPU usage on vpp_main thread is high when using tap cli between vpp and another userspace application #vpp

2019-01-24 Thread Damjan Marion via Lists.Fd.Io

Don't use tapcli code, it is outdated and I just submitted patch to deprecate 
it (as agreed few months ago on the community call).

https://gerrit.fd.io/r/17073 

tapv2 (create interface tap) should be able to run on worker, but don't expect 
magic, it's jus tap


> On 25 Jan 2019, at 08:14, ranadip@gmail.com wrote:
> 
> Hello, 
> 
> I am trying to use vpp with 4 worker threads. 
> Client is sending packet to server through vpp. This packet comes to vpp, and 
> gets picked up from a VF. VPP sends this packet to the another user-space 
> application over a tapcli interface. 
> The user-space application processes the packet, and then sends it back to 
> vpp. Vpp forwards the packet to the server. 
> 
> I am using vpp with 4 worker threads.
> 
> Without the traffic, four worker threads are all showing ~100% cpu usage 
> (which is expected). However, with traffic, the vpp main thread is also 
> showing ~100% cpu usage. I do not want vpp main thread to reach 100% cpu. 
> With the limited knowledge that I have on vpp, it seems like main thread is 
> doing lots of processing in the tapcli-rx node. Is there a way to keep vpp 
> main relatively free? Is tap interface the correct choice to communicate 
> between vpp and another user-space application? If not, what should be used? 
> 
> I have tried this on both vpp 18.07 and 18.10. 
>  
> vpp# show run
> Thread 0 vpp_main (lcore 2)
> Time 916.9, average vectors/node 40.16, last 128 main loops 0.00 per node 0.00
>   vector rates in 1.3178e5, out 1.3178e5, drop 1.3087e-2, punt 0.e0
>  Name State Calls  Vectors
> Suspends Clocks   Vectors/Call
> VirtualFunctionEthernet3/10/1-   active3008704   120840447
>0  1.36e1   40.16
> VirtualFunctionEthernet3/10/1-   active3008704   120840447
>0  1.02e2   40.16
> acl-plugin-fa-cleaner-process  event wait0   0
>1  1.85e40.00
> admin-up-down-process  event wait0   0
>1  1.20e30.00
> api-rx-from-ringany wait 0   0
>   50  7.80e40.00
> arp-inputactive  1   1
>0  2.39e61.00
> avf-processevent wait0   0
>1  2.14e30.00
> bfd-processevent wait0   0
>1  1.84e30.00
> bond-process   event wait0   0
>1  1.44e30.00
> cdp-process any wait 0   0
>1  1.38e70.00
> dhcp-client-process any wait 0   0
>   10  1.02e40.00
> dhcp6-client-cp-process any wait 0   0
>1  1.07e30.00
> dhcp6-pd-client-cp-process  any wait 0   0
>1  9.28e20.00
> dhcp6-pd-reply-publisher-proce event wait0   0
>1  8.88e20.00
> dhcp6-reply-publisher-process  event wait0   0
>1  1.02e30.00
> dns-resolver-processany wait 0   0
>1  2.18e30.00
> dpdk-ipsec-processdone   1   0
>0  1.29e50.00
> dpdk-processany wait 0   0
>  306  5.73e40.00
> error-drop   active 11  12
>0  5.73e31.09
> ethernet-input   active3008710   120840454
>0  3.78e1   40.16
> fib-walkany wait 0   0
>  459  3.03e30.00
> flow-report-process any wait 0   0
>1  6.92e20.00
> flowprobe-timer-process any wait 0   0
>1  3.09e30.00
> igmp-timer-process event wait0   0
>1  2.18e30.00
> ikev2-manager-process   any wait 0   0
>  916  2.46e30.00
> ioam-export-process any wait 0   0

[vpp-dev] CPU usage on vpp_main thread is high when using tap cli between vpp and another userspace application #vpp

2019-01-24 Thread ranadip . das
Hello, 

I am trying to use vpp with 4 worker threads. 
Client is sending packet to server through vpp. This packet comes to vpp, and 
gets picked up from a VF. VPP sends this packet to the another user-space 
application over a tapcli interface. 
The user-space application processes the packet, and then sends it back to vpp. 
Vpp forwards the packet to the server. 

I am using vpp with 4 worker threads.

Without the traffic, four worker threads are all showing ~100% cpu usage (which 
is expected). However, with traffic, the vpp main thread is also showing ~100% 
cpu usage. I do not want vpp main thread to reach 100% cpu. With the limited 
knowledge that I have on vpp, it seems like main thread is doing lots of 
processing in the tapcli-rx node. Is there a way to keep vpp main relatively 
free? Is tap interface the correct choice to communicate between vpp and 
another user-space application? If not, what should be used? 

I have tried this on both vpp 18.07 and 18.10. 
 
vpp# show run
Thread 0 vpp_main (lcore 2)
Time 916.9, average vectors/node 40.16, last 128 main loops 0.00 per node 0.00
  vector rates in 1.3178e5, out 1.3178e5, drop 1.3087e-2, punt 0.e0
             Name                 State         Calls          Vectors        
Suspends         Clocks       Vectors/Call
VirtualFunctionEthernet3/10/1-   active            3008704       120840447      
         0          1.36e1           40.16
VirtualFunctionEthernet3/10/1-   active            3008704       120840447      
         0          1.02e2           40.16
acl-plugin-fa-cleaner-process  event wait                0               0      
         1          1.85e4            0.00
admin-up-down-process          event wait                0               0      
         1          1.20e3            0.00
api-rx-from-ring                any wait                 0               0      
        50          7.80e4            0.00
arp-input                        active                  1               1      
         0          2.39e6            1.00
avf-process                    event wait                0               0      
         1          2.14e3            0.00
bfd-process                    event wait                0               0      
         1          1.84e3            0.00
bond-process                   event wait                0               0      
         1          1.44e3            0.00
cdp-process                     any wait                 0               0      
         1          1.38e7            0.00
dhcp-client-process             any wait                 0               0      
        10          1.02e4            0.00
dhcp6-client-cp-process         any wait                 0               0      
         1          1.07e3            0.00
dhcp6-pd-client-cp-process      any wait                 0               0      
         1          9.28e2            0.00
dhcp6-pd-reply-publisher-proce event wait                0               0      
         1          8.88e2            0.00
dhcp6-reply-publisher-process  event wait                0               0      
         1          1.02e3            0.00
dns-resolver-process            any wait                 0               0      
         1          2.18e3            0.00
dpdk-ipsec-process                done                   1               0      
         0          1.29e5            0.00
dpdk-process                    any wait                 0               0      
       306          5.73e4            0.00
error-drop                       active                 11              12      
         0          5.73e3            1.09
ethernet-input                   active            3008710       120840454      
         0          3.78e1           40.16
fib-walk                        any wait                 0               0      
       459          3.03e3            0.00
flow-report-process             any wait                 0               0      
         1          6.92e2            0.00
flowprobe-timer-process         any wait                 0               0      
         1          3.09e3            0.00
igmp-timer-process             event wait                0               0      
         1          2.18e3            0.00
ikev2-manager-process           any wait                 0               0      
       916          2.46e3            0.00
ioam-export-process             any wait                 0               0      
         1          1.10e3            0.00
ip-neighbor-scan-process        any wait                 0               0      
        16          7.03e3            0.00
ip-route-resolver-process       any wait                 0               0      
        10          8.13e3            0.00
ip4-glean                        active                  2               2      
         0          9.34e3            1.00
ip4-input                        active            3008704       120840447      
         0