networkservicemesh / cmd-forwarder-vpp

Apache License 2.0
2 stars 22 forks source link

Controlplane part of `forwarder-vpp` leaks #1129

Open NikitaSkrynnik opened 4 months ago

NikitaSkrynnik commented 4 months ago

Description

forwarder-vpp has two interface leaks:

  1. timeout chain element doesn't call Close for expired connections. Therefore, vpp interfaces are not deleted
  2. Even if we call Close in forwarder-vpp it doesn't delete vxlan interfaces

Tasks

Total: 54h

NikitaSkrynnik commented 4 months ago

All changes that fix tap interface leaks are in these PRs:

  1. https://github.com/networkservicemesh/sdk/pull/1643
  2. https://github.com/networkservicemesh/sdk-vpp/pull/835
denis-tingaikin commented 1 month ago

It seems like the problem is still existing and the forwarder is leaking.

image

The picture shows mem consumption for forwarder vpp.

forwarder-vpp_goroutineprofiles_20240920082027.tar.gz forwarder-vpp_memprofiles_20240920082112.tar.gz

NikitaSkrynnik commented 1 month ago

Current plan

NikitaSkrynnik commented 3 weeks ago

After fixing context leaks in nsmonitor and timeout chain element forwarder shows the next results on 30 NSCs and 10 NSEs:

3h of testing:

nsm-system    forwarder-vpp-gr729                   135m         363Mi           
nsm-system    forwarder-vpp-zjd5x                   200m         390Mi           
nsm-system    nsmgr-25vvt                           167m         92Mi            
nsm-system    nsmgr-f6rjf                           92m          71Mi

18h of testing:

nsm-system    forwarder-vpp-gr729                   132m         401Mi           
nsm-system    forwarder-vpp-zjd5x                   199m         438Mi           
nsm-system    nsmgr-25vvt                           175m         97Mi            
nsm-system    nsmgr-f6rjf                           92m          74Mi 

3d20h of testing:

nsm-system    forwarder-vpp-gr729                   272m         421Mi           
nsm-system    forwarder-vpp-zjd5x                   310m         443Mi           
nsm-system    nsmgr-25vvt                           197m         103Mi           
nsm-system    nsmgr-f6rjf                           101m         78Mi   

4d5h of testing:

nsm-system    forwarder-vpp-gr729                   228m         417Mi           
nsm-system    forwarder-vpp-zjd5x                   203m         448Mi           
nsm-system    nsmgr-25vvt                           213m         101Mi           
nsm-system    nsmgr-f6rjf                           110m         83Mi  

30m after testing:

nsm-system    forwarder-vpp-gr729                   66m          414Mi           
nsm-system    forwarder-vpp-zjd5x                   63m          428Mi           
nsm-system    nsmgr-25vvt                           49m          87Mi            
nsm-system    nsmgr-f6rjf                           46m          73Mi 

memory and goroutine profiles don't show any leaks 30m after testing. Here are all profiles: traces.zip

denis-tingaikin commented 2 weeks ago

@NikitaSkrynnik attached archive is empty, could you resend it?